Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt module function check for Environment Modules v4+ #4371

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

xdelaruelle
Copy link
Contributor

Default check_module_function tests that module command is called from module shell function. With EnvironmentModules v4+, module command is usually called from the _module_raw shell function.

This commit adds a specific version of check_module_function for EnvironmentModules class. Module command is first checked within _module_raw shell function definition. If not found, default test (that checks module function) is run.

Adapt "test_module_mismatch" unit test to specifically check module command definition with EnvironmentModules.

Fixes #4368

@boegel boegel added this to the release after 4.8.2 milestone Oct 29, 2023
@boegel boegel added the bug fix label Oct 29, 2023
@xdelaruelle xdelaruelle force-pushed the _module_raw_function_check branch from 85f5f5e to dee03ac Compare October 29, 2023 19:44
@boegel boegel changed the title Adapt module function check for EnvironmentModules Adapt module function check for Environment Modules v4+ Nov 8, 2023
test/framework/modulestool.py Outdated Show resolved Hide resolved
easybuild/tools/modules.py Show resolved Hide resolved
easybuild/tools/modules.py Outdated Show resolved Hide resolved
Default check_module_function tests that module command is called from
module shell function. With EnvironmentModules v4+, module command is
usually called from the _module_raw shell function.

This commit adds a specific version of check_module_function for
EnvironmentModules class. Module command is first checked within
_module_raw shell function definition. If not found, default test (that
checks module function) is run.

Add new unit test "test_environment_modules_specific" to specifically
check module command definition with EnvironmentModules.

Fixes easybuilders#4368
@xdelaruelle xdelaruelle force-pushed the _module_raw_function_check branch from dee03ac to 757b8ee Compare November 8, 2023 19:48
@xdelaruelle
Copy link
Contributor Author

@boegel Thanks for your review. I have added your change suggestions.

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 3fb386c into easybuilders:develop Dec 26, 2023
40 checks passed
@xdelaruelle xdelaruelle deleted the _module_raw_function_check branch December 27, 2023 12:05
@boegel boegel changed the title Adapt module function check for Environment Modules v4+ adapt module function check for Environment Modules v4+ Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

module function check does not support Environment Modules
2 participants