augur.argparse_ moduleο
Custom helpers for the argparse standard library.
- class augur.argparse_.ExtendOverwriteDefault(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)ο
Bases:
Action
Similar to the core argparse
extend
action, but overwrites the argumentdefault
, if any, instead of appending to it.Thus, the
default
value is not included when the option is given and may be a non-list value if desired.
- class augur.argparse_.HideAsFalseAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)ο
Bases:
Action
Custom argparse Action that stores False for arguments passed as βhide* and stores True for all other argument patterns.
- augur.argparse_.add_command_subparsers(subparsers, commands, command_attribute='__command__')ο
Add subparsers for each command module.
- Parameters:
subparsers (argparse._SubParsersAction) β The special subparsers action object created by the parent parser via parser.add_subparsers().
commands (list[types.ModuleType]) β A list of modules that are commands that require their own subparser. Each module is required to have a register_parser function to add its own subparser and arguments.
command_attribute (str, optional) β Optional attribute name for the commands. The default is __command__, which allows top level augur to run commands directly via args.__command__.run().
- augur.argparse_.add_default_command(parser)ο
Sets the default command to run when none is provided.
- augur.argparse_.add_validation_arguments(parser)ο
Add arguments to configure validation mode of node data JSON files.