Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 18, 2025
1 parent 4c94bed commit 2cd87cb
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 55 deletions.
2 changes: 1 addition & 1 deletion main/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 31d284971147883b8fe99bbfeaefa904
config: 7404a9aafb8811b035da8ce28a5d727a
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified main/.doctrees/developers_guide/adding_new_machine.doctree
Binary file not shown.
Binary file modified main/.doctrees/developers_guide/api.doctree
Binary file not shown.
Binary file modified main/.doctrees/developers_guide/building_docs.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified main/.doctrees/developers_guide/quick_start.doctree
Binary file not shown.
Binary file modified main/.doctrees/environment.pickle
Binary file not shown.
Binary file modified main/.doctrees/index.doctree
Binary file not shown.
14 changes: 4 additions & 10 deletions main/_modules/mache/sync/diags.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,10 @@ <h1>Source code for mache.sync.diags</h1><div class="highlight"><pre>
<span class="k">else</span><span class="p">:</span>
<span class="n">tunnel</span> <span class="o">=</span> <span class="kc">None</span>

<span class="k">if</span> <span class="n">direction</span> <span class="o">==</span> <span class="s1">&#39;to&#39;</span> <span class="ow">and</span> <span class="n">tunnel</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s1">&#39;You can only use &quot;mache sync diags to ...&quot; to sync diags to a</span><span class="se">\n</span><span class="s1">&#39;</span>
<span class="s1">&#39;machine with a tunnel. Other machines should only use </span><span class="se">\n</span><span class="s1">&#39;</span>
<span class="s1">&#39;&quot;mache sync diags from ...&quot; so permissions can be updated.&#39;</span><span class="p">)</span>

<span class="k">if</span> <span class="n">machine</span> <span class="ow">in</span> <span class="n">lcrc_machines</span> <span class="ow">and</span> <span class="n">tunnel</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">machine</span> <span class="o">!=</span> <span class="n">other</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;You should sync </span><span class="si">{</span><span class="n">machine</span><span class="si">}</span><span class="s1"> with itself since &#39;</span>
<span class="sa">f</span><span class="s1">&#39;files are local&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">machine</span> <span class="ow">in</span> <span class="n">lcrc_machines</span> <span class="ow">and</span> <span class="n">other</span> <span class="ow">in</span> <span class="n">lcrc_machines</span> <span class="ow">and</span> \
<span class="n">machine</span> <span class="o">!=</span> <span class="n">other</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;You should sync </span><span class="si">{</span><span class="n">machine</span><span class="si">}</span><span class="s1"> with itself since &#39;</span>
<span class="sa">f</span><span class="s1">&#39;files are local&#39;</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">username</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">direction</span> <span class="o">==</span> <span class="s1">&#39;from&#39;</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;For syncing to work properly, your LCRC &#39;</span>
Expand Down
45 changes: 16 additions & 29 deletions main/_sources/developers_guide/quick_start.md.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Quick Start

`mache` (Machines for E3SM) is a package for providing configuration data
`mache` (Machines for E3SM) is a package for providing configuration data
related to E3SM supported machines.

(dev-installing-mache)=
Expand Down Expand Up @@ -38,33 +38,33 @@ python -m pip install --no-deps --no-build-isolation -e .

## Code styling and linting

`mache` uses `pre-commit` to lint incoming code when you make a commit (as
`mache` uses `pre-commit` to lint incoming code when you make a commit (as
long as you have your environment set up correctly), and on GitHub whenever you
make a pull request to the `mache` repository. Linting makes sure your code
make a pull request to the `mache` repository. Linting makes sure your code
follows the formatting guidelines of PEP8, and cleans up additional things like
whitespace at the end of files.

The first time you set up the `mache_dev` environment, you will need to set up
The first time you set up the `mache_dev` environment, you will need to set up
`pre-commit`. This is done by running:

```bash
pre-commit install
```

You only need to do this once when you create the `mache_dev` environment. If
You only need to do this once when you create the `mache_dev` environment. If
you create a new version of `mache_dev`, then you will need to run it again.

When you run `git commit <filename>`, `pre-commit` will automatically lint your
code before committing. Some formatting will be updated by `pre-commit`
code before committing. Some formatting will be updated by `pre-commit`
automatically, in which case it will terminate the commit and inform you of the
change. Then you can run `git commit <filename>` again to continue the linting
process until your commit is successful. Some changes need to be made manually,
such as inconsistent variable types. When this happens, you must update the
such as inconsistent variable types. When this happens, you must update the
file to `pre-commit`'s standards, and then attempt to re-commit the file.

Internally, `pre-commit` uses [flake8](https://flake8.pycqa.org/en/latest/) to
check PEP8 compliance, [isort](https://pycqa.github.io/isort/) to sort, check
and format imports, [flynt](https://github.com/ikamensh/flynt) to change any
check PEP8 compliance, [isort](https://pycqa.github.io/isort/) to sort, check
and format imports, [flynt](https://github.com/ikamensh/flynt) to change any
format strings to f-strings, and [mypy](https://mypy-lang.org/) to check for
consistent variable types. An example error might be:

Expand Down Expand Up @@ -172,7 +172,7 @@ config : configparser.ConfigParser

e3sm_supported : bool

: Whether this machine supports running E3SM itself, and therefore has a list
: Whether this machine supports running E3SM itself, and therefore has a list
of compilers, MPI libraries, and the modules needed to load them

compilers : list
Expand All @@ -193,12 +193,12 @@ e3sm_unified_mpi : {'nompi', 'system', None}

e3sm_unified_base : str

: The base path where E3SM-Unified and its activation scripts are installed if
: The base path where E3SM-Unified and its activation scripts are installed if
`e3sm_unified` is not `None`

e3sm_unified_activation : str

: The activation script used to activate E3SM-Unified if `e3sm_unified` is not
: The activation script used to activate E3SM-Unified if `e3sm_unified` is not
`None`

diagnostics_base : str
Expand All @@ -215,8 +215,8 @@ web_portal_url : str

username : str

: The name of the current user, for use in web-portal directories. This value
is also added to the `web_portal` and `username` option of the `config`
: The name of the current user, for use in web-portal directories. This value
is also added to the `web_portal` and `username` option of the `config`
attribute.

## Syncing diagnostics
Expand Down Expand Up @@ -246,7 +246,8 @@ data with a shared diagnostics directory on each supported machine.
Whenever possible, we log on to the E3SM machine and download the data
from LCRC because this allows the synchronization tool to also update
permissions once the data has been synchronized. This is the approach
for all machines except for Los Alamos National Laboratory's Badger,
for all machines except for Frontier and Andes, which doesn't allow connections
to LCRC because of Duo Mobile, and Los Alamos National Laboratory's Chicoma,
which is behind a firewall that prevents this approach.

### One-time setup
Expand All @@ -265,20 +266,6 @@ This is the same procedure as for creating an SSH key for GitHub so if
you have already done that process, you will not need a new SSH key for
LCRC.

### Setup on Andes

Andes at OLCF requires special treatment. You need to create or edit the
file `~/.ssh/config` with the following:

```
Host blues.lcrc.anl.gov
User <ac.user>
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519
```

where, again `<ac.user>` is your username on LCRC.

### Syncing from LCRC

To synchronize diagnostics data from LCRC, simply run:
Expand Down
16 changes: 2 additions & 14 deletions main/developers_guide/quick_start.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
<li class="toctree-l2"><a class="reference internal" href="#attributes">Attributes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#syncing-diagnostics">Syncing diagnostics</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#one-time-setup">One-time setup</a></li>
<li class="toctree-l3"><a class="reference internal" href="#setup-on-andes">Setup on Andes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#syncing-from-lcrc">Syncing from LCRC</a></li>
</ul>
</li>
Expand Down Expand Up @@ -284,7 +283,8 @@ <h2>Syncing diagnostics<a class="headerlink" href="#syncing-diagnostics" title="
<p>Whenever possible, we log on to the E3SM machine and download the data
from LCRC because this allows the synchronization tool to also update
permissions once the data has been synchronized. This is the approach
for all machines except for Los Alamos National Laboratory’s Badger,
for all machines except for Frontier and Andes, which doesn’t allow connections
to LCRC because of Duo Mobile, and Los Alamos National Laboratory’s Chicoma,
which is behind a firewall that prevents this approach.</p>
<section id="one-time-setup">
<h3>One-time setup<a class="headerlink" href="#one-time-setup" title="Link to this heading"></a></h3>
Expand All @@ -300,18 +300,6 @@ <h3>One-time setup<a class="headerlink" href="#one-time-setup" title="Link to th
you have already done that process, you will not need a new SSH key for
LCRC.</p>
</section>
<section id="setup-on-andes">
<h3>Setup on Andes<a class="headerlink" href="#setup-on-andes" title="Link to this heading"></a></h3>
<p>Andes at OLCF requires special treatment. You need to create or edit the
file <code class="docutils literal notranslate"><span class="pre">~/.ssh/config</span></code> with the following:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Host</span> <span class="n">blues</span><span class="o">.</span><span class="n">lcrc</span><span class="o">.</span><span class="n">anl</span><span class="o">.</span><span class="n">gov</span>
<span class="n">User</span> <span class="o">&lt;</span><span class="n">ac</span><span class="o">.</span><span class="n">user</span><span class="o">&gt;</span>
<span class="n">PreferredAuthentications</span> <span class="n">publickey</span>
<span class="n">IdentityFile</span> <span class="o">~/.</span><span class="n">ssh</span><span class="o">/</span><span class="n">id_ed25519</span>
</pre></div>
</div>
<p>where, again <code class="docutils literal notranslate"><span class="pre">&lt;ac.user&gt;</span></code> is your username on LCRC.</p>
</section>
<section id="syncing-from-lcrc">
<h3>Syncing from LCRC<a class="headerlink" href="#syncing-from-lcrc" title="Link to this heading"></a></h3>
<p>To synchronize diagnostics data from LCRC, simply run:</p>
Expand Down
Loading

0 comments on commit 2cd87cb

Please sign in to comment.