Skip to content

Commit

Permalink
doc: add examples in more tagging section in MIGRATING
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Apr 28, 2022
1 parent 8df7fba commit bb5ec41
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .aspell.en.pws
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 798
personal_ws-1.1 en 800
ABBRVLIST
ActiveTcl
Adrien
Expand Down Expand Up @@ -648,12 +648,14 @@ sgrf
sgrh
sgrhi
sgrin
sgrkl
sgrl
sgrme
sgrmp
sgrnf
sgrs
sgrse
sgrshi
sgrss
sgrsy
sgrtr
Expand Down
52 changes: 52 additions & 0 deletions MIGRATING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,26 @@ The :option:`--tag` option is available on :subcmd:`load`, :subcmd:`load-any`,
:mfcmd:`always-load`, :mfcmd:`depends-on`, :mfcmd:`module`, :mfcmd:`prereq`,
:mfcmd:`prereq-all` and :mfcmd:`prereq-any` modulefile commands.

Informational messages of module evaluation have been updated to mention in
module denomination the tags applying to it, as it is done in :subcmd:`list`
sub-command output:

.. parsed-literal::
:ps:`$` module load -v --tag=sticky:bar foo/1.0
Loading :sgrshi:`foo/1.0` <bar>
In case the designated module is already loaded, the additional tags are added
to the list of tags already applied to this module.

.. parsed-literal::
:ps:`$` module list
Currently Loaded Modulefiles:
1) foo/1.0
:ps:`$` module load -v --tag=sticky:bar foo/1.0
Tagging :sgrshi:`foo/1.0` <bar>
The ``keep-loaded`` tag is introduced in this version. It avoids an
auto-loaded module to get automatically unloaded when its dependent modules
are unloaded. This new tag can be set with the :mfcmd:`module-tag` modulefile
Expand All @@ -248,11 +265,46 @@ command. Default :mconfig:`tag_abbrev` configuration option has been updated
to add the ``kL`` abbreviation for ``keep-loaded`` tag. Default dark and light
color palettes have been updated too.

.. parsed-literal::
:ps:`$` module show bar/1.0
-------------------------------------------------------------------
:sgrhi:`/path/to/modulefiles/bar/1.0`:
:sgrcm:`always-load` foo/1.0
-------------------------------------------------------------------
:ps:`$` module load bar/1.0
Loading :sgrhi:`bar/1.0`
:sgrin:`Loading requirement`: foo/1.0
:ps:`$` module unload bar/1.0
:ps:`$` module list
Currently Loaded Modulefiles:
1) :sgral:`foo`:sgrkl:`/1.0`
Key:
:sgral:`auto-loaded` :sgrkl:`keep-loaded`
When saving a collection, the tags defined with :option:`--tag` option are
recorded to set them again when collection is restored. Tags resulting from
module load state, like ``auto-loaded`` and ``keep-loaded``, are also
recorded.

.. parsed-literal::
:ps:`$` module load --tag=sticky bar/1.0
Loading :sgrshi:`bar/1.0`
:sgrin:`Loading requirement`: foo/1.0
:ps:`$` module save
:ps:`$` module saveshow
-------------------------------------------------------------------
:sgrhi:`/home/user/.module/default`:
:sgrcm:`module` use --append /path/to/modulefiles
:sgrcm:`module` load --tag=auto-loaded:keep-loaded foo
:sgrcm:`module` load --tag=sticky bar
-------------------------------------------------------------------
The :mconfig:`collection_pin_tag` configuration option is added to record in
collection all tags set on loaded modules. This configuration option is
disabled by default.
Expand Down
9 changes: 9 additions & 0 deletions doc/source/_static/terminal_output.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@
background-color: #06989a;
}

.sgrshi {
background-color: #06989a;
font-weight: bold;
}

.sgrss {
background-color: #3465a4;
}

.sgrkl {
background-color: #688f8f;
}
4 changes: 3 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ def get_version_release_from_git():
.. role:: sgrf
.. role:: sgrnf
.. role:: sgrs
.. role:: sgrss"""
.. role:: sgrshi
.. role:: sgrss
.. role:: sgrkl"""


# -- Options for manual page output ---------------------------------------
Expand Down

0 comments on commit bb5ec41

Please sign in to comment.