You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to document the required functions and general patterns that subcommand files are expected to follow.
This is from a proposal in 48b0891. I omitted the "Docstring" section since that was based on other unmerged changes in the PR, but some parts (e.g. "each command must start with a module docstring") may still be relevant.
Writing a command
Functions
Each command must include a function register_parser(parent_subparsers, **kwargs). See the docstring of augur.argparse_.add_command_subparsers for more information.
If a command has sub-commands, those should be added with augur.argparse_.add_command_subparsers.
Most commands should define a run(args) function which serves as the indirect entrypoint from the CLI, where args is the value given back by argparse.ArgumentParser.parse_args(). If this function is not defined, the help output will be shown.
The text was updated successfully, but these errors were encountered:
It would be good to document the required functions and general patterns that subcommand files are expected to follow.
This is from a proposal in 48b0891. I omitted the "Docstring" section since that was based on other unmerged changes in the PR, but some parts (e.g. "each command must start with a module docstring") may still be relevant.
The text was updated successfully, but these errors were encountered: