-
Notifications
You must be signed in to change notification settings - Fork 217
move EasyBlock.expand_module_search_path into ModuleEnvironmentVariable.expand_paths
#4859
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
Conversation
…iable.expand_paths
…ariable_expand_paths
EasyBlock.expand_module_search_path into ModuleEnvironmentVariable.expand_paths
2631db1 to
8f0135a
Compare
…d by EasyBlock.module_load_environment.expand_paths
boegel
left a comment
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.
lgtm, went through this in detail together with @lexming, carefully checking whether ModuleEnvironmentVariable.expand_paths method is equivalent to the code that was there in EasyBlock.expand_module_search_path)
mark `EasyBlock.expand_module_search_path` as removed, has been replaced by `EasyBlock.module_load_environment.expand_paths`
boegel
left a comment
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.
lgtm
Follow-up to #4858 with code cleanup.
The logic in
EasyBlock.expand_module_search_pathis very much independent of the EasyBlock itself, only needing the path to the installation directory. Therefore it is simpler to move that code intoModuleEnvironmentVariable, where the attributes of the environment variable are known (e.g. its type) and closer to the rest of the code handling them.