Skip to content

Commit

Permalink
Adding CLI implementation text (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science authored Jan 24, 2024
1 parent 14c951a commit 09f4464
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
11 changes: 7 additions & 4 deletions armi/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ def print_help(self, file=None):

class ArmiCLI:
"""
ARMI CLI -- The main entry point into ARMI. There are various commands
available. To get help for the individual commands, run again with
`<command> --help`. Typically, the CLI implements functions that already
exist within ARMI.
ARMI CLI -- The main entry point into ARMI. There are various commands available. To get help
for the individual commands, run again with `<command> --help`. Typically, the CLI implements
functions that already exist within ARMI.
.. impl:: The basic ARMI CLI, for running a simulation.
:id: I_ARMI_CLI_CS
:implements: R_ARMI_CLI_CS
Provides a basic command-line interface (CLI) for running an ARMI simulation. Available
commands can be listed with ``-l``. Information on individual commands can be obtained by
running with ``<command> --help``.
"""

def __init__(self):
Expand Down
15 changes: 13 additions & 2 deletions armi/cli/entryPoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,23 @@ class EntryPoint:
"""
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.
A valid subclass must provide at least a ``name`` class attribute, and may also specify the
other class attributes described below.
.. impl:: Generic CLI base class for developers to use.
:id: I_ARMI_CLI_GEN
:implements: R_ARMI_CLI_GEN
Provides a base class for plugin developers to use in creating application-specific CLIs.
Valid subclasses must at least provide a ``name`` class attribute.
Optional class attributes that a subclass may provide include ``description``, a string
describing the command's actions, ``splash``, a boolean specifying whether to display a
splash screen upon execution, and ``settingsArgument``. If ``settingsArgument`` is specified
as ``required``, then a settings files is a required positional argument. If
``settingsArgument`` is set to ``optional``, then a settings file is an optional positional
argument. If None is specified for the ``settingsArgument``, then no settings file argument
is added.
"""

#: The <command-name> that is used to call the command from the command line
Expand Down

0 comments on commit 09f4464

Please sign in to comment.