sierra.core.cmdline
Core command line parsing and validation 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 usingargparse
.
- class sierra.core.cmdline.ArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True, exit_on_error=True)[source]
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.
Inheritance
- __doc__ = "SIERRA's argument parser overriding default argparse behavior.\n\n Delivers a custom help message without listing options, as the options which\n SIERRA accepts differs dramatically depending on loaded plugins.\n\n "
- __module__ = 'sierra.core.cmdline'
- error(message: string)[source]
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.
- kHelpMsg = "Usage:\n\nsierra-cli [-v | --version] [OPTION]...\n\nWhat command line options SIERRA accepts depends on the loaded\n--project, --platform, --exec-env, and project-specific options.\n'man sierra-cli' will give you the full set of options that\ncomes with SIERRA.\n\n"
- class sierra.core.cmdline.BaseCmdline[source]
The base cmdline definition class for SIERRA for reusability.
Inheritance
- __dict__ = mappingproxy({'__module__': 'sierra.core.cmdline', '__doc__': '\n The base cmdline definition class for SIERRA for reusability.\n\n ', 'stage_usage_doc': <staticmethod object>, 'bc_applicable_doc': <staticmethod object>, 'graphs_applicable_doc': <staticmethod object>, '__dict__': <attribute '__dict__' of 'BaseCmdline' objects>, '__weakref__': <attribute '__weakref__' of 'BaseCmdline' objects>, '__annotations__': {}})
- __doc__ = '\n The base cmdline definition class for SIERRA for reusability.\n\n '
- __module__ = 'sierra.core.cmdline'
- __weakref__
list of weak references to the object (if defined)
- class sierra.core.cmdline.BootstrapCmdline[source]
Defines the arguments that are used to bootstrap SIERRA/load plugins.
Inheritance
- __doc__ = '\n Defines the arguments that are used to bootstrap SIERRA/load plugins.\n '
- __module__ = 'sierra.core.cmdline'
- class sierra.core.cmdline.CoreCmdline(parents: Optional[List[ArgumentParser]], stages: List[int])[source]
Defines the core command line arguments for SIERRA using
argparse
.Inheritance
- __doc__ = 'Defines the core command line arguments for SIERRA using :class:`argparse`.\n\n '
- __module__ = 'sierra.core.cmdline'