augur.curate package

A suite of commands to help with data curation.

augur.curate.create_shared_parser()

Creates an argparse.ArgumentParser that is intended to be used as a parent parser¹ for all augur curate subcommands. This should include all options that are intended to be shared across the subcommands.

Note that any options strings used here cannot be used in individual subcommand subparsers unless the subparser specifically sets conflict_handler=’resolve’ ², then the subparser option will override the option defined here.

Based on https://stackoverflow.com/questions/23296695/permit-argparse-global-flags-after-subcommand/23296874#23296874

¹ https://docs.python.org/3/library/argparse.html#parents ² https://docs.python.org/3/library/argparse.html#conflict-handler

augur.curate.register_parser(parent_subparsers)
augur.curate.run(args)
augur.curate.validate_records(records, subcmd_name, is_input)

Validate that the provided records all have the same fields. Uses the keys of the first record to check against all other records.

Parameters:
  • records (iterable of dict)

  • subcmd_name (str) – The name of the subcommand whose output is being validated; used in error messages displayed to the user.

  • is_input (bool) – Whether the provided records come directly from user provided input

Return type:

Iterable[dict]

Submodules