Closed jo-basevi closed 3 months ago
Hello @jo-basevi! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
last week there was an issue with multiple modules found in /g/data/vk83/modules and /g/data/vk83/modules/access-models, even though they were the same modulefile
That was an implementation bug. We've removed the access-models
subdirectory to fix it. So it isn't a use case we need to care about or support. Does that help?
Thanks for the review!
That was an implementation bug. We've removed the access-models subdirectory to fix it. So it isn't a use case we need to care about or support. Does that help?
Yes, that does help thanks. Ok so don't have to worry about using module paths
or changing the implementation in that case.
Allow checks for "modules: load:" modulefiles to allow when there's an exact match in available modules. This is to fix bug #481 where module avail for
openmpi/4.1.5
includesopenmpi/4.1.5
andopenmpi/4.1.5-debug
.I've also added tests for parsing module avail output.
Closes #481.
@aidanheerdegen last week there was an issue with multiple modules found in
/g/data/vk83/modules
and/g/data/vk83/modules/access-models
, even though they were the same modulefile. I noticed in the modules docs there's amodule paths
command that lists paths of available modulefiles matching a pattern so for the above, it would still evaluate to the same path. There's a couple of differences tomodule avail
:module paths
usingmodulecmd
($MODULESHOME//bin/modulecmd
) generates a bunch of code. So forbash
, it generates a bunch of echo statements, rather than output going tostderr
which is the case formodule avail
. So to get what values are printed, have to run the generated code, and then capture the output.openmpi/
with a/
just matches the default module version (I think), so only one path is returned.If it's unlikely to have a case where
module/version
can be accessed from two different modulepaths and are different, e.g.The check could be changed from
modules_avail.count(modulefile) != 1
tomodulefile not in modules_avail
in this PR. Maybe this be moved to separate to avoid blocking this PR?