Make command line arguments more better
Original MR
This is my attempt to clean up the command line interface a bit. There were a few unused arguments, and a few others that were too verbose given how often they are used.
I like reusing Athena common option parsing, but I think breaking off the argument parser creation is justified for a few reasons.
- There should always be input files, so it's weird that this argument was optional. I've made it positional for now, but I could be convinced to go back to making it a "required optional argument".
- The threads and processes arguments weren't used anywhere in our code, so I hid them.
- Our required
--runConfig
argument was listed way down the help, I moved it earlier. - There were some obvious places that the standard Athena parser could use help, e.g. using
choices
could be used more, which I should port to Athena. - There are some options that are just weirdly implemented, but which we probably can't change for backward compatibility reasons. In particular
--config-only
takes an argument which ends up being the name of a pickle file that stores the configuration. There's no obvious way to use this file. I renamed it--stop-after-config
and made it write the file to/dev/null
.
Note that I keep the same names for the args namespace object, so it's still compatible with the Athena flag filling.
I'm also wanting to make the --runConfig
option optional, since I always use the same one for quick tests and get annoyed with having to specify it.
Todo:
-
Remove unused arguments from the help string -
Make filesInput
mandatory -
Make --runConfig
optional
Things that should be in another MR
Since I need a few things to work in the same branch I started piling in stuff that might have been better in other merge requests:
- I'm removing the
--allow-missing-ptag
option: I don't see it used anywhere anyway. This should close #26 (closed). - Make the
--outFile
argument optional-
Make sure this is still being produced in the unit tests.
-
- Remove unused
--allow-no-ptag
- Everything from !134 (closed)
Edited by Dan Guest