armi.cli.entryPoint module¶
-
class
armi.cli.entryPoint.EntryPoint[source]¶ Bases:
objectGeneric command line entry point.
A valid subclass must provide at least a
nameclass attribute, and may also specify the other class attributes described below.-
name= None¶
-
description= None¶
-
settingsArgument= None¶
-
mode= None¶
-
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
--helpfunction. This is particularly beneficial when many options are being added as they can clutter the--helpto be almost unusable.
-