armi.cli.entryPoint module

class armi.cli.entryPoint.EntryPoint[source]

Bases: object

Generic command line entry point.

A valid subclass must provide at least a name class attribute, and may also specify the other class attributes described below.

name = None
description = None
settingsArgument = None
mode = None
addOptions()[source]

Hook method for adding additional command line options.

parse_args(args)[source]
parse(args)[source]

Parses the command line arguments, with the command specific arguments.

invoke() → Optional[int][source]

Body of the entry point.

This is an abstract method, and must must be overridden in sub-classes.

Returns

  • Implementations should return an exit code, or None, which is interpreted the

  • same as zero (successful completion).

createOptionFromSetting(settingName, additionalAlias=None, suppressHelp=False)[source]

Function used to add a setting command line option. This will override whatever is in the settings file.

Notes

The method is private so it is not picked up as an ARMI command!

Parameters
  • parser (argparse.ArgumentParser) – parser to add the command line option

  • cs (armi.settings.Settings) – settings instance to manipulate

  • settingName (str) – the setting name

  • additionalAlises (str) – additional alias for the command line option, be careful and make sure they are all distinct!

  • supressHelp (bool) – option to suppress the help message when using the command line --help function. This is particularly beneficial when many options are being added as they can clutter the --help to be almost unusable.

armi.cli.entryPoint.storeBool(boolDefault, ep)[source]
armi.cli.entryPoint.setSetting(ep)[source]
armi.cli.entryPoint.setCaseTitle(cs)[source]
armi.cli.entryPoint.loadSettings(cs)[source]