Closed hexylena closed 4 years ago
Ah, perhaps a stylistic choice on our part? In CWL we try to do one-function per description; so that probably got mapped as one CWL description per subparser by @anton-khodak .
Very well could be. I'll probably refactor my half to match y'all's whenever I find time for it.
E.g. there's some significant overlap that could probably be refactored into something cleaner. https://github.com/erasche/argparse2tool/blob/master/argparse/__init__.py#L133 which I borrowed from https://github.com/erasche/argparse2tool/blob/master/argparse/__init__.py#L84
https://github.com/hexylena/argparse2tool/pull/65 writes subparsers to separate xml files if --directory
parameter is given.
foo.py foo --generate
still does not work .. but I would find it not very handy to generate xml this way from the command line since one does not know the names of the subparsers.
@bernt-matthias agreed, with --directory is good enough. I didn't consider the "have to enumerate submodules" case.
they support
foo.py --generate
andfoo.py foo --generate
which does just a single subparser namedfoo
rather than all. Need to figure out what they're doing differently and perhaps unify the code.