You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented "default_version==false" for TCL (#517)
* Implemented "default_version" for TCL
* refactor to use shared logic for default version template loading
I am also adding tests for both tcl and lmod default versions
* correct default version cases
* refactor to allow default_version to have multiple options
* change order of defaults for default_version
* proposal for handling default version on uninstall
instead of parsing each case, we can simply pretend that the last module installed
(determined by the creation or modify date) was just installed, and for all variants
of default_version this will work as it will either write this version as latest,
or just keep the dummy version. The exception is for first installed, for which we need
to pass a boolean that says "force calling this the first install." of course linux
does not do creation date well, so we do our best with modify date instead. Note I
have not tested this but am pushing the commit to further discuss!
* Clarified the logic in write_version_file and update_version_file
- New _set_default_version method to set the default version
- write_version_file and update_version_file now decide which is
the first/last installed version (no more _default_version_first_installed)
* Expanded _cleanup to delete directories if they only contain ".version"
* TCL is now supported
* Merged update_version_file into write_version_file
* write_version_file can now detect the first/last version on its own
* Renamed the config file value to "module_sys" to match the other option
* Made can_be_deleted more generic, by taking the list of files to ignore as a parameter
* Reintroduced the tag parameter
Made it explicit that the tag write_version_file gets represents the version being installed
* Renamed _sys_module_default_version to _module_sys_default_version for consistency
* We can set default as None since it's not required.
* Use `latest_tag_installed` if possible
Co-authored-by: Matthieu Muffato <[email protected]>
Co-authored-by: vsoch <[email protected]>
Copy file name to clipboardExpand all lines: docs/getting_started/user-guide.rst
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,8 +178,8 @@ variable replacement. A summary table of variables is included below, and then f
178
178
- a timestamp to keep track of when you last saved
179
179
- never
180
180
* - default_version
181
-
- A boolean to indicate generating a .version file (LMOD or lua modules only)
182
-
- true
181
+
- Should a default version be used?
182
+
- module_sys
183
183
* - singularity_module
184
184
- if defined, add to module script to load this Singularity module first
185
185
- null
@@ -360,6 +360,18 @@ you can add or remove entries via the config variable ``registry``
360
360
and "set" is used to set a key value pair.
361
361
362
362
363
+
Default Version
364
+
---------------
365
+
366
+
The default version setting is there to support you telling shpc how you want module versions to be selected.
367
+
There are four options:
368
+
369
+
- ``null`` do not set any kind of default version, it will be manually controlled by the installer (``false`` also supported for backwards compatibility)
370
+
- ``module_sys``: allow the module software to choose (``true`` also supported for backwards compatibility)
371
+
- ``last_installed``: always set default version to the last version installed
372
+
- ``first_installed``: only set default version for the first installed
0 commit comments