Skip to content

Commit f11f385

Browse files
sdelliotmitchnegus
andauthored
docs: Reorganize documentation for better readability (#179)
# Reorganize Documentation ## Description This PR reorganizes the FIREWHEEL documentation to clean up the documentation side bar and ensure all documentation is located with related documentation. This will make extending the documentation significantly easier in the future and enable easier location of needed docs. ## Type of Change Please select the type of change your pull request introduces: - [ ] Bugfix - [ ] New feature - [x] Documentation update - [ ] Other (please describe): ## Checklist - [x] This PR conforms to the process detailed in the [Contributing Guide](https://sandialabs.github.io/firewheel/developer/contributing.html). - [x] I have included no proprietary/sensitive information in my code. - [x] I have performed a self-review of my code. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have made corresponding changes to the documentation. - [x] My changes generate no new warnings. - [x] I have tested my code. ## Additional Notes Documentation was primarily moved and the content was not significantly changed. Mostly grammar/spelling/clarity was addressed. --------- Signed-off-by: Steven Elliott <[email protected]> Co-authored-by: Mitch Negus <[email protected]>
1 parent 7cc3f1f commit f11f385

38 files changed

+447
-460
lines changed

docs/source/cheat_sheet.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*********************
2+
FIREWHEEL Cheat Sheet
3+
*********************
4+
5+
.. raw:: html
6+
7+
<p>You can download the cheat sheet here: <a href="_static/FIREWHEEL_Cheat_Sheet_final.pdf" target="_blank">FIREWHEEL Cheat Sheet</a></p>
8+

docs/source/cli/index.rst

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,64 @@
44
Command Line Interface
55
######################
66

7-
The FIREWHEEL Command Line Interface (CLI) allows interaction with and management of FIREWHEEL.
8-
The CLI (:py:mod:`cli/firewheel_cli.py <firewheel.cli.firewheel_cli>`) uses Python's
9-
:py:mod:`cmd` module.
10-
However, there is one notable difference: the CLI is designed to work with a FIREWHEEL cluster which means that commands may need to be executed on one or many hosts.
11-
To accomplish this, the CLI has been extended with :ref:`cli_helper_section`.
12-
:ref:`cli_helper_section` do not use the standard `Cmd <https://docs.python.org/3/library/cmd.html>`_ format, but they enable us to use Python and Shell scripting to perform various actions across the cluster (see :ref:`cli_executors`).
13-
The CLI automatically distributes Helpers to enable performing actions over the entire cluster.
14-
Therefore, the CLI may be accessed from any node in the cluster.
15-
The distinction between commands and Helpers is not relevant for most users so we will use these terms interchangeably.
16-
CLI commands may output error message to the screen, but remote commands will indicate an error through a non-zero exit code.
7+
Once the Python virtual environment is active, the CLI can be accessed by using the command ``firewheel`` in your terminal or directly using :exc:`firewheel_cli.py <firewheel.cli.firewheel_cli>`.
8+
This will open up the CLI in "interactive" mode which looks like:
9+
10+
.. code-block:: bash
11+
12+
$ firewheel
13+
FIREWHEEL Infrastructure CLI
14+
fw-cli>
15+
16+
The CLI also supports single-command execution (or non-interactive mode).
17+
This is the most common use of the CLI.
18+
Running the CLI with arguments results in those arguments being treated as a single entered command (and associated arguments).
19+
For example, the following examples are equivalent:
20+
21+
.. code-block:: bash
22+
23+
$ firewheel vm mix
24+
25+
.. code-block:: bash
26+
27+
fw-cli> vm mix
28+
29+
Helpers can be invoked by name as a command or using the :ref:`command_run` command.
30+
31+
.. code-block:: bash
32+
33+
fw-cli> run vm mix
34+
35+
While it is most common that users will invoke a Helper via its name, using the :ref:`command_run` command also disambiguates a Helper's name from built-in command names.
36+
Additionally in interactive mode, the :ref:`command_run` command provides the ability to tab-complete Helpers.
37+
38+
Available Helpers can be enumerated using the :ref:`command_list` or :ref:`command_help` commands or they can found here: :ref:`cli_helpers`.
39+
40+
For complete help on any command, use: ``firewheel help <command | Helper>``.
41+
42+
Some commands may take arguments.
43+
Everything on the command line after the name of the command is treated as an argument to that command.
44+
Some commands use `Argparse <https://docs.python.org/3/library/argparse.html>`_ to handle arguments.
45+
In this case, using ``-h`` or ``--help`` flag may also work.
46+
However, this information *should* also be available by using: ``firewheel help <command | Helper>``.
47+
48+
All CLI commands *should* report success/failure via the exit code.
49+
Many commands also output useful information directly to the screen.
50+
For example:
51+
52+
.. code-block:: bash
53+
54+
$ firewheel repository list
55+
Installed Model Component Repositories:
56+
/opt/firewheel/model_components
57+
58+
As with other FIREWHEEL components, the CLI logs to ``firewheel.log``.
59+
However, because the CLI is verbose, it has an additional log file (``cli.log``) which contains more in-depth logging information, including the output.
60+
Additionally, the history of CLI commands is located in ``cli_history.log`` (or it can be accessed via the :ref:`command_history` command).
61+
62+
The location of the CLI-specific log files can be set using FIREWHEEL's configuration.
1763

1864
.. toctree::
19-
:hidden:
2065

21-
usage.rst
22-
cli_design.rst
23-
cli_extention.rst
2466
commands.rst
2567
helper_docs.rst

docs/source/cli/usage.rst

Lines changed: 0 additions & 61 deletions
This file was deleted.

docs/source/concepts.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ def make_index(self, basepath):
340340
# Get the list of model components
341341
index = """.. _available_model_components:
342342
343-
#############################
344-
Model Component Documentation
345-
#############################
343+
##########################
344+
Available Model Components
345+
##########################
346346
347347
"""
348348

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)