armi.cli.database module¶
Entry point into ARMI for manipulating output databases.
- class armi.cli.database.ConvertDB[source]¶
Bases:
armi.cli.entryPoint.EntryPointConvert databases between different versions
- name: Optional[str] = 'convert-db'¶
The <command-name> that is used to call the command from the command line
- mode: Optional[int] = 1¶
One of {armi.Mode.BATCH, armi.Mode.INTERACTIVE, armi.Mode.GUI}, optional. Specifies the ARMI mode in which the command is run. Default is armi.Mode.BATCH.
- addOptions()[source]¶
Add additional command line options.
Values of options added to
self.parserwill be available onself.args. Values added withcreateOptionFromSettingwill override the setting values in the settings input file.See also
createOptionFromSettingA method often called from here to creat CLI options from application settings.
argparse.ArgumentParser.add_argumentOften called from here using
self.parser.add_argumentto add custom argparse arguments.
- invoke()[source]¶
Body of the entry point.
This is an abstract method, and must must be overridden in sub-classes.
- Returns
exitcode – Implementations should return an exit code, or
None, which is interpreted the same as zero (successful completion).- Return type
int or None
- settingsArgument: Optional[str] = None¶
One of {‘optional’, ‘required’, None}, or unspecified. Specifies whether a settings file argument is to be added to the command’s argument parser. If settingsArgument == ‘required’, then a settings file is a required positional argument. If settingsArgument == ‘optional’, then it is an optional positional argument. Finally, if settingsArgument is None, then no settings file argument is added.
- class armi.cli.database.ExtractInputs[source]¶
Bases:
armi.cli.entryPoint.EntryPointRecover input files from a database file.
This can come in handy when input files need to be hand-migrated to facilitate loading or migration of the database file itself, or when attempting to re-run a slightly-modified version of a case.
- name: Optional[str] = 'extract-inputs'¶
The <command-name> that is used to call the command from the command line
- mode: Optional[int] = 1¶
One of {armi.Mode.BATCH, armi.Mode.INTERACTIVE, armi.Mode.GUI}, optional. Specifies the ARMI mode in which the command is run. Default is armi.Mode.BATCH.
- addOptions()[source]¶
Add additional command line options.
Values of options added to
self.parserwill be available onself.args. Values added withcreateOptionFromSettingwill override the setting values in the settings input file.See also
createOptionFromSettingA method often called from here to creat CLI options from application settings.
argparse.ArgumentParser.add_argumentOften called from here using
self.parser.add_argumentto add custom argparse arguments.
- invoke()[source]¶
Body of the entry point.
This is an abstract method, and must must be overridden in sub-classes.
- Returns
exitcode – Implementations should return an exit code, or
None, which is interpreted the same as zero (successful completion).- Return type
int or None
- settingsArgument: Optional[str] = None¶
One of {‘optional’, ‘required’, None}, or unspecified. Specifies whether a settings file argument is to be added to the command’s argument parser. If settingsArgument == ‘required’, then a settings file is a required positional argument. If settingsArgument == ‘optional’, then it is an optional positional argument. Finally, if settingsArgument is None, then no settings file argument is added.
- class armi.cli.database.InjectInputs[source]¶
Bases:
armi.cli.entryPoint.EntryPointInsert new inputs into a database file, overwriting any existing inputs.
This is useful for performing hand migrations of inputs to facilitate database migrations.
- name: Optional[str] = 'inject-inputs'¶
The <command-name> that is used to call the command from the command line
- mode: Optional[int] = 1¶
One of {armi.Mode.BATCH, armi.Mode.INTERACTIVE, armi.Mode.GUI}, optional. Specifies the ARMI mode in which the command is run. Default is armi.Mode.BATCH.
- addOptions()[source]¶
Add additional command line options.
Values of options added to
self.parserwill be available onself.args. Values added withcreateOptionFromSettingwill override the setting values in the settings input file.See also
createOptionFromSettingA method often called from here to creat CLI options from application settings.
argparse.ArgumentParser.add_argumentOften called from here using
self.parser.add_argumentto add custom argparse arguments.
- invoke()[source]¶
Body of the entry point.
This is an abstract method, and must must be overridden in sub-classes.
- Returns
exitcode – Implementations should return an exit code, or
None, which is interpreted the same as zero (successful completion).- Return type
int or None
- settingsArgument: Optional[str] = None¶
One of {‘optional’, ‘required’, None}, or unspecified. Specifies whether a settings file argument is to be added to the command’s argument parser. If settingsArgument == ‘required’, then a settings file is a required positional argument. If settingsArgument == ‘optional’, then it is an optional positional argument. Finally, if settingsArgument is None, then no settings file argument is added.