Skip to content

Commit 25684f4

Browse files
committed
doc: add "other-implementations" document
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 5b68d50 commit 25684f4

File tree

5 files changed

+153
-0
lines changed

5 files changed

+153
-0
lines changed

.hunspell.en.dic

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,3 +1224,14 @@ shopt
12241224
fi
12251225
loginsh
12261226
endif
1227+
facto
1228+
2010s
1229+
XDG
1230+
i18n
1231+
Pmodules
1232+
RSModules
1233+
IPerl
1234+
Jupyter
1235+
environmentmodules
1236+
Mii
1237+
RenvModule

MIGRATING.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ fixes bugs but also introduces new functionalities that are described in this
122122
section. See the :ref:`5.5 release notes<5.5 release notes>` for a complete
123123
list of the changes between Modules v5.4 and v5.5.
124124

125+
.. _Logging activity:
126+
125127
Logging activity
126128
----------------
127129

@@ -361,6 +363,8 @@ when trying to reload Dependent Reload modules that conflict with other loaded
361363
modules. This error may be by-passed with :option:`--force` command-line
362364
option.
363365

366+
.. _Specific modulepath for requirements:
367+
364368
Specific modulepath for requirements
365369
------------------------------------
366370

@@ -616,6 +620,8 @@ amount of I/O operations:
616620
------ ----------- ----------- --------- --------- ----------------
617621
100.00 0.001520 1 946 137 total
618622
623+
.. _Abort on error:
624+
619625
Abort on error
620626
--------------
621627

@@ -1331,6 +1337,8 @@ other value corresponds to the name of a collection to restore.
13311337
Unloading bar/1.0
13321338
Unloading foo/1.0
13331339
1340+
.. _Stashing environment:
1341+
13341342
Stashing environment
13351343
--------------------
13361344

@@ -1704,6 +1712,8 @@ Note that when processing a :mfcmd:`family` command, the
17041712
:envvar:`LMOD_FAMILY_\<NAME\>` environment variable is defined by Modules to
17051713
be compatible with existing modulefiles or scripts relying on such variable.
17061714

1715+
.. _More tagging capabilities:
1716+
17071717
More tagging capabilities
17081718
-------------------------
17091719

@@ -2027,6 +2037,8 @@ fixes bugs but also introduces new functionalities that are described in this
20272037
section. See the :ref:`4.8 release notes<4.8 release notes>` for a complete
20282038
list of the changes between Modules v4.7 and v4.8.
20292039

2040+
.. _Editing modulefiles:
2041+
20302042
Editing modulefiles
20312043
-------------------
20322044

@@ -3184,6 +3196,8 @@ A stack trace is also returned when an unknown error occurs in
31843196
"eval $execcmdlist"
31853197
Please report this issue at :noparse:`https://github.com/envmodules/modules/issues`
31863198
3199+
.. _Automatic default and latest syms:
3200+
31873201
Automatic default and latest symbolic versions
31883202
----------------------------------------------
31893203

@@ -4123,6 +4137,8 @@ fixes bugs but also introduces new functionalities that are described in this
41234137
section. See the :ref:`4.1 release notes<4.1 release notes>` for a complete
41244138
list of the changes between Modules v4.0 and v4.1.
41254139

4140+
.. _Virtual modules:
4141+
41264142
Virtual modules
41274143
---------------
41284144

@@ -4153,6 +4169,8 @@ definitions made in ``modulecmd.tcl`` with site-specific code. A module
41534169
sub-command can for instance be redefined to make it fit local needs
41544170
without having to touch the main ``modulecmd.tcl``.
41554171

4172+
.. _Quarantine mechanism:
4173+
41564174
Quarantine mechanism to protect module execution
41574175
------------------------------------------------
41584176

@@ -4432,6 +4450,8 @@ required Tcl interpreters. Which means a configured Tcl interpreter is
44324450
reused as much as possible between each modulefile interpretation or
44334451
between each modulerc interpretation.
44344452

4453+
.. _Sourcing modulefiles:
4454+
44354455
Sourcing modulefiles
44364456
^^^^^^^^^^^^^^^^^^^^
44374457

NEWS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Modules 5.6.0 (not yet released)
146146
and above.
147147
* Doc: improve :ref:`enable-modules-in-shells` guidelines.
148148
* Doc: add :ref:`man-path` cookbook recipe.
149+
* Doc: add :ref:`other-implementations` document.
149150

150151
.. _Security policy: https://github.com/envmodules/modules/blob/main/SECURITY.md
151152
.. _Modules chat room: https://matrix.to/#/#modules:matrix.org

doc/source/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ automatically configured to the correct architecture.
9494
NEWS
9595
FAQ
9696
changes
97+
other-implementations
9798

9899
.. toctree::
99100
:hidden:
@@ -150,6 +151,8 @@ Links
150151
* Issue tracking system: https://github.com/envmodules/modules/issues
151152
* Download releases: https://github.com/envmodules/modules/releases
152153

154+
.. _Community:
155+
153156
Community
154157
---------
155158

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
.. _other-implementations:
2+
3+
Other ``module`` implementations
4+
================================
5+
6+
Since the inception of the Environment Modules project in 1991, the ``module``
7+
command has become a de facto standard interface for dynamically modifying a
8+
user's environment via modulefiles. Over time, several alternative
9+
implementations of the ``module`` command have been developed.
10+
11+
This document provides an overview of known ``module`` command
12+
implementations, with a particular focus on Lmod, the most widely adopted
13+
alternative. The goal is to inform users and developers of the current
14+
landscape of ``module`` system tools.
15+
16+
Lmod
17+
----
18+
19+
`Lmod`_ is an implementation of Environment Modules written in Lua. Its
20+
development started in 2008 and along a years Lmod has introduced many new
21+
features into the ``module`` world: software hierarchy, cache mechanism, Lua
22+
modulefile support, ``ml`` command, etc.
23+
24+
Lmod gained popularity in the mid-2010s, during a period when the Modules
25+
project was largely inactive. It is now widely adopted, particularly in the
26+
HPC community.
27+
28+
.. _Lmod: https://github.com/TACC/Lmod/
29+
30+
Today, Lmod and Modules offer broadly similar feature sets. The following
31+
table highlights features that are unique to each implementation.
32+
33+
+---------------------------------------------+---------------------------------------------+
34+
| Lmod (``8.8``) | Modules (``5.6``) |
35+
+---------------------------------------------+---------------------------------------------+
36+
| * Integration with *rc* shell and *json* | * Integration with *cmd* and *pwsh* shells |
37+
| structured output | and *Tcl* language |
38+
| * `Lua modulefile support`_ | * :envvar:`Automated module handling |
39+
| * `Module hierarchy`_ | <MODULES_AUTO_HANDLING>` |
40+
| * Save configuration under | * :ref:`Advanced module version specifiers` |
41+
| :envvar:`XDG_CONFIG_HOME` | * :ref:`Module variants` |
42+
| * `i18n`_ | * :ref:`Virtual modules` |
43+
| * `Find best module`_ | * :ref:`Sourcing modulefiles` |
44+
| * `Path entry priorities`_ | * Handle modulefile outside modulepath |
45+
| | * :ref:`Quarantine mechanism` |
46+
| | * :ref:`Case insensitive module |
47+
| | load<Insensitive case>` |
48+
| | * Automatic ``latest`` and ``loaded`` |
49+
| | symbols |
50+
| | * ``alias``, ``command``, ``loaded``, |
51+
| | ``tags``, ``usergroups`` and ``username`` |
52+
| | sub-commands of :mfcmd:`module-info` |
53+
| | * :ref:`Super-sticky modules<Sticky |
54+
| | modules>` |
55+
| | * :option:`Fine-tuned output |
56+
| | configuration<--output>` |
57+
| | * :ref:`Editing modulefiles` |
58+
| | * :ref:`Tag when loading module<More |
59+
| | tagging capabilities>` |
60+
| | * :ref:`Stashing environment` |
61+
| | * :ref:`Extra specifier` |
62+
| | * Configurable :ref:`Abort on error` |
63+
| | behavior |
64+
| | * Integration with *bash-eval* and *fish* |
65+
| | shells in :mfcmd:`source-sh` |
66+
| | * :ref:`Specific modulepath for |
67+
| | requirements` |
68+
| | * :ref:`Logging activity` |
69+
+---------------------------------------------+---------------------------------------------+
70+
71+
.. _Module hierarchy: https://lmod.readthedocs.io/en/latest/080_hierarchy.html
72+
.. _Lua modulefile support: https://lmod.readthedocs.io/en/latest/050_lua_modulefiles.html
73+
.. _Find best module: https://lmod.readthedocs.io/en/latest/060_locating.html
74+
.. _i18n: https://lmod.readthedocs.io/en/latest/185_localization.html
75+
.. _Path entry priorities: https://lmod.readthedocs.io/en/latest/077_ref_counting.html#specifying-priorities-for-path-entries
76+
77+
Other alternatives
78+
------------------
79+
80+
This section intends to reference all other existing alternative ``module``
81+
implementations.
82+
83+
* `Modulecmd.py`_: Environment Modules implementation in Python
84+
* `Pmodules`_: Environment Modules implementation in Bash
85+
* `RSModules`_: Environment Modules implementation in Rust
86+
87+
.. _Modulecmd.py: https://github.com/tjfulle/Modulecmd.py
88+
.. _Pmodules: https://gitlab.psi.ch/Pmodules
89+
.. _RSModules: https://github.com/fretn/rsmodules
90+
91+
If you know of a ``module`` implementation project that's not listed here,
92+
please :ref:`let us know<Community>` so we can include it.
93+
94+
Related projects
95+
----------------
96+
97+
Beyond alternative implementations of the ``module`` command, several projects
98+
have been developed along the years to extend its functionality or provide
99+
additional tools that enhance how modulefiles are handled.
100+
101+
* `Devel::IPerl::Plugin::EnvironmentModules`_: interact with Environment
102+
Modules in a Jupyter IPerl kernel
103+
* `Env::Modulecmd`_: interface to ``modulecmd`` from Perl
104+
* `environmentmodules`_: Python interface for Environment Modules
105+
* `flavours`_: extension built on top of Modules v3 to provide module auto
106+
handling mechanisms
107+
* `Mii`_: a smart search engine for module environments
108+
* `RenvModule`_: interface to Environment Modules within the R environment
109+
110+
.. _Devel\:\:IPerl\:\:Plugin\:\:EnvironmentModules: https://github.com/kiwiroy/Devel-IPerl-Plugin-EnvironmentModules
111+
.. _Env\:\:Modulecmd: https://metacpan.org/pod/Env::Modulecmd
112+
.. _environmentmodules: https://github.com/ben-albrecht/environmentmodules
113+
.. _flavours: https://sourceforge.net/projects/flavours/
114+
.. _Mii: https://github.com/codeandkey/mii
115+
.. _RenvModule: https://cran.r-project.org/web/packages/RenvModule/index.html
116+
117+
If you're aware of a ``module``-related project missing from this list, feel
118+
free to :ref:`contact us<Community>` so we can add it.

0 commit comments

Comments
 (0)