hammer
hammer copied to clipboard
Partial argument parsing from CLIDriver
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.
Actually this is most of the way there, just need to pull CLIDriver.args_to_driver
and some supporting logic out
Can you give an example use case for this?
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.