sierra.core.cmdline#

Core command line parsing and validation classes.

Classes#

ArgumentParser

SIERRA's argument parser overriding default argparse behavior.

BaseCmdline

The base cmdline definition class for SIERRA for reusability.

BootstrapCmdline

Defines the arguments that are used to bootstrap SIERRA/load plugins.

CoreCmdline

Defines the core command line arguments for SIERRA using argparse.

Module Contents#

class sierra.core.cmdline.ArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True, exit_on_error=True)[source]#
Inheritance diagram of sierra.core.cmdline.ArgumentParser

SIERRA's argument parser overriding default argparse behavior.

Delivers a custom help message without listing options, as the options which SIERRA accepts differs dramatically depending on loaded plugins.

error(message)[source]#

error(message: string)

Prints a usage message incorporating the message to stderr and exits.

If you override this in a subclass, it should not return -- it should either exit or raise an exception.

class sierra.core.cmdline.BaseCmdline[source]#

The base cmdline definition class for SIERRA for reusability.

class sierra.core.cmdline.BootstrapCmdline[source]#
Inheritance diagram of sierra.core.cmdline.BootstrapCmdline

Defines the arguments that are used to bootstrap SIERRA/load plugins.

class sierra.core.cmdline.CoreCmdline(parents: list[ArgumentParser] | None, stages: list[int])[source]#
Inheritance diagram of sierra.core.cmdline.CoreCmdline

Defines the core command line arguments for SIERRA using argparse.

init_cli(stages: list[int]) None[source]#

Define cmdline arguments for stages 1-5.

init_multistage() None[source]#

Define cmdline arguments which are used in multiple pipeline stages.

init_shortforms() None[source]#

Define cmdline shortform arguments for all pipeline stages.

init_stage1() None[source]#

Define cmdline arguments for stage 1.

init_stage2() None[source]#

Define cmdline arguments for stage 2.

init_stage3() None[source]#

Define cmdline arguments for stage 3.

init_stage4() None[source]#

Define cmdline arguments for stage 4.

init_stage5() None[source]#

Define cmdline arguments for stage 5.

scaffold_cli(parents: list[ArgumentParser] | None) None[source]#

Scaffold CLI by defining the parser and common argument groups.