Welcome to lmodule documentation!¶
lmodule is a Python API for Lmod module system. lmodule was originally part of buildtest and we decided that it could benefit the entire community for folks interested in using the API but not relying on buildtest. The documentation is built for version 0.1.0 on Jul 19, 2020
What is lmodule?¶
Lmodule is a Python 3 API that allows you to interact with the module command provided by Lmod in a programmatic way. The API comes with three classes:
Module: This class emulates the
module
commandSpider: This class runs the Lmod
spider
command to retrieve all module records in jsonModuleLoadTest: This class automates
module load
of one or more module trees
Why use lmodule?¶
Here are few reasons why you would want to use lmodule
Currently, there is no Python API for Lmod, however there is a python interface
LMOD_CMD python
by Lmod that requires parsing and output is cryptic.Automates
module load
test for each module in one or more module trees (Software Stack). This can be used to spot faulty modules in a large software stack. This type of test is meant to run using CI tool for continuous testing of module stack.
Contents:
- Installation
- Module Class
- Testing Modules
- Enabling Debug
- Testing Modules in Login Shell
- Saving Modules to User Collection
- Show Modules associated to a User Collection
- Get collection command
- Testing a User Collection
- Tweaking Module Purge Behavior
- Enable Force Purge
- Is Module Available?
- Get Lmod Version
- Retrieve User Collections
- Working with Lmod Spider
- Automating Module Load Test
- Lmodule Examples