easybuild-framework
easybuild-framework copied to clipboard
Add `--debug-module-cmds` option
This is disabled by default and hides the output of the module command. That is usually just "noise" hiding the relevant part of the log.
With it disabled the output looks like:
== 2025-11-14 10:58:31,197 run.py:511 INFO Running shell command '/opt/lmod/lmod/libexec/lmod python load GCC/4.6.3' in /git/easybuild-framework == 2025-11-14 10:58:31,261 run.py:625 INFO Shell command completed successfully: /opt/lmod/lmod/libexec/lmod python load GCC/4.6.3
I added small refactorings and fixes I've seen:
- The type hint allows auto-completing in IDEs which is quite helpful for writing the test
re.sub('module use [...]', modtxt, re.M)was wrong: The 3rd parameter iscountnotflagsfor key in dict: delete dict[key]is an error, see https://docs.python.org/3/library/stdtypes.html#dict-viewsif any([generator expr])creates the list before iterating it instead of only creating what is required, see https://github.com/easybuilders/easybuild-framework/pull/5043
@Flamefire merge conflict to resolve...
Looks like I identified and fixed the same bug in the tests in multiple occasions.
Rebased