PyPop.CommandLineInterface#

Command-line interface for PyPop scripts.

Classes#

CitationAction

A custom argparse Citation action to read the appropriate citation file format.

Functions#

get_parent_cli([version, copyright_message])

Command-line options common to all scripts.

get_pypop_cli([version, copyright_message])

Command-line options for pypop script.

get_popmeta_cli([version, copyright_message])

Command-line options for popmeta script.

Module Contents#

class CitationAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)#

Bases: argparse.Action

Inheritance diagram of PyPop.CommandLineInterface.CitationAction

A custom argparse Citation action to read the appropriate citation file format.

get_parent_cli(version='', copyright_message='')#

Command-line options common to all scripts.

Parameters:
  • version (str) – Software version.

  • copyright_message (str) – Override the copyright message.

Returns:

A tuple of:
  • parent_parser (argparse.ArgumentParser): The base parser.

  • ihwg_args (tuple): Options for the IHWG module.

  • phylip_args (tuple): Options for the Phylip module.

  • common_args (tuple): Common options.

  • prefix_tsv_args (tuple): TSV prefix options.

Return type:

tuple

get_pypop_cli(version='', copyright_message='')#

Command-line options for pypop script.

Parameters:
  • version (str) – software version

  • copyright_message (str) – override the copyright message

Returns:

parser for pypop

Return type:

argparse.ArgumentParser

get_popmeta_cli(version='', copyright_message='')#

Command-line options for popmeta script.

Parameters:
  • version (str) – software version

  • copyright_message (str) – override the copyright message

Returns:

parser for popmeta

Return type:

argparse.ArgumentParser