-
Notifications
You must be signed in to change notification settings - Fork 36
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
Overview page modules #532
Conversation
@param filter_fn: Filter function on the ouput. | ||
@return: | ||
""" | ||
lmod = os.getenv('LMOD_CMD') |
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.
No need to implement in this PR, but we should add some error handling here.
What if $LMOD_CMD
is not set (or points to a non-existing path)?
What if the exit code of the Lmod command is non-zero?
""" | ||
return data[~np.char.endswith(data, ":") & | ||
~np.char.startswith(data, "env/") & | ||
~np.char.startswith(data, "cluster/default") |
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 is good enough for now, but a better way to filter these would be to:
- for each module, keep track of which location it was found in, so iterate over output of
module avail
line by line, and build up a dict withpath
as key, list of modules as value; - filter based on
/etc/modulefiles/vsc
(which coversenv/*
andcluster/*
) to discriminate between software module andcluster
modules;
Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
@boegel |
md_file = MdUtils(file_name='module_overview.md', title='Overview of available modules per cluster') | ||
data = modules_ugent() | ||
generate_module_table(data, md_file) | ||
md_file.create_md_file() |
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.
also print path to file that was created?
Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
#553
In this PR: