ucb-bar / hammer

Hammer: Highly Agile Masks Made Effortlessly from RTL
BSD 3-Clause "New" or "Revised" License
253 stars 56 forks source link

Partial argument parsing from CLIDriver #394

Open edwardcwang opened 5 years ago

edwardcwang commented 5 years ago

When building other tools that use Hammer programmatically, it may be nice to use Hammer's standard conventions of -p, -e etc but not necessarily all the actions. Currently it's possible to just copy out those argparse lines but it's not efficient/DRY.

edwardcwang commented 5 years ago

Actually this is most of the way there, just need to pull CLIDriver.args_to_driver and some supporting logic out

jwright6323 commented 4 years ago

Can you give an example use case for this?

edwardcwang commented 4 years ago

Say if I'm building a new program or generator that uses Hammer libraries, I'd like to be able to easily re-use parts of the Hammer driver interface e.g. -p foo.yml etc. without having to pull in the whole driver.