hammer icon indicating copy to clipboard operation
hammer copied to clipboard

Partial argument parsing from CLIDriver

Open edwardcwang opened this issue 5 years ago • 3 comments

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 avatar May 15 '19 22:05 edwardcwang

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

edwardcwang avatar May 15 '19 23:05 edwardcwang

Can you give an example use case for this?

jwright6323 avatar Oct 17 '19 23:10 jwright6323

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.

edwardcwang avatar Oct 19 '19 05:10 edwardcwang