-
Notifications
You must be signed in to change notification settings - Fork 202
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
Support for lowercase module naming scheme #3199
base: develop
Are you sure you want to change the base?
Support for lowercase module naming scheme #3199
Conversation
easybuild/tools/module_naming_scheme/lowercase_module_naming_scheme.py
Outdated
Show resolved
Hide resolved
easybuild/tools/module_naming_scheme/lowercase_module_naming_scheme.py
Outdated
Show resolved
Hide resolved
@lucamar we probably need a test for this new MNS, see |
from easybuild.tools.module_naming_scheme.utilities import det_full_ec_version | ||
|
||
|
||
class LowercaseModuleNamingScheme(ModuleNamingScheme): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucamar Wouldn't it make sense to derive this from EasyBuildMNS
, and rename it to LowercaseEasyBuildMNS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boegel Sure, I can change it to a subclass of EasyBuildMNS
and the rename the file as lowercase_mns.py
: I think that initially we just copied the structure of categorized_mns.py
as a template
:param ec: dict-like object with easyconfig parameter values (e.g. 'name', 'version', etc.) | ||
:return: string with full module name <name>/<installversion>, e.g.: 'gzip/1.5-goolf-1.4.10' | ||
""" | ||
return os.path.join(ec['name'], det_full_ec_version(ec)).lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified to
return super(EB_LowercaseEasyBuildMNS, self).det_full_module_name().lower()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint, however if I change it as you suggested, I keep getting the NameError
below:
NameError: global name 'EB_LowercaseEasyBuildMNS' is not defined
Maybe I'm missing something trivial...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucamar the test should probably be on the same level as |
…into lowercase_module_naming_scheme
As discussed already by @gppezzi with @boegel, I'm submitting a pull request to support the lowercase module naming scheme in EasyBuild (release 4).