Skip to content

Add a module load command to auto load the right env.

Martin Bergemann requested to merge add-modulefiles into master

This MR adds a very simple module load functionality. I am not sure if there are more pythonic ways of doing that. The current approach feels a little clunky. I've also added a config class and a get method that keeps track of the pyslk configuration (like the slk version that should be loaded).

Ideally, if we have multiple slk versions via modules the user could switch the versions.

Also, I've noticed something strange:

from pyslk import pyslk
/home/k/k204230/workspace/pyslk/pyslk/pyslk.py:52: UserWarning: parsing of slk output is based on slk version 3.3.67, parsing for your version 3.3.21 might fail!
  warnings.warn(warning_txt)
/home/k/k204230/workspace/pyslk/pyslk/pyslk.py:60: UserWarning: parsing of slk_helpers output is based on slk_helpers version 1.5.7, parsing for your version 1.2.4 might fail!
  warnings.warn(warning_txt)

This is strange because the mentioned slk version is not even available via modules.

@k204221

Btw sorry, I had forgotten to turn off auto reformatting in vim, there might be way more changes in the code due to the auto reformatter.

Merge request reports