-
Notifications
You must be signed in to change notification settings - Fork 1
Make module information a dict with name, version, and full_module_name
#11
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cbcf373
Store modules as a dict rather than a string
ocaisa e32a3c6
Fix bugs and change toolchain family compatibility to toolchainversio…
ocaisa b3ed9e9
black linting
ocaisa a9bded1
Also store extensions directly alongside the software
ocaisa ae2c55c
Add some minimal CI for PRs
ocaisa fbcab54
Add generated metadata as artifact to PRs
ocaisa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,12 +25,12 @@ | |
| ] | ||
|
|
||
| TOOLCHAIN_FAMILIES = [ | ||
| "foss_2025b", | ||
| "foss_2025a", | ||
| "foss_2024a", | ||
| "foss_2023b", | ||
| "foss_2023a", | ||
| "foss_2022b", | ||
| "2025b_foss", | ||
| "2025a_foss", | ||
| "2024a_foss", | ||
| "2023b_foss", | ||
| "2023a_foss", | ||
| "2022b_foss", | ||
| ] | ||
|
|
||
|
|
||
|
|
@@ -47,7 +47,7 @@ def get_software_information_by_filename(file_metadata, original_path=None, tool | |
| "toolchain_families_compatibility": [ | ||
| key for key in toolchain_families.keys() if file_metadata["toolchain"] in toolchain_families[key] | ||
| ], | ||
| "modulename": file_metadata["short_mod_name"], | ||
| "module": file_metadata["module"], | ||
| "required_modules": file_metadata["required_modules"], | ||
| } | ||
|
|
||
|
|
@@ -65,7 +65,7 @@ def get_software_information_by_filename(file_metadata, original_path=None, tool | |
|
|
||
| # 2) Construct the modulefile path | ||
| before_arch, _, _ = original_path.partition(detected_arch) | ||
| modulefile = before_arch + detected_arch + "/modules/all/" + file_metadata["short_mod_name"] + '.lua' | ||
| modulefile = before_arch + detected_arch + "/modules/all/" + file_metadata["module"]["full_module_name"] + '.lua' | ||
| spider_cache = before_arch + detected_arch + "/.lmod/cache/spiderT.lua" | ||
|
|
||
| # 3) Substitute each architecture and test module file existence in spider cache | ||
|
|
@@ -161,11 +161,11 @@ def get_software_information_by_filename(file_metadata, original_path=None, tool | |
| version_dict = copy.deepcopy(base_version_dict) | ||
| version_dict["version"] = component[1] | ||
| version_dict["versionsuffix"] = "" | ||
| version_dict["type"] = "Component" | ||
| # version_dict["type"] = "Component" | ||
| version_dict["parent_software"] = { | ||
| "name": file_metadata["name"], | ||
| "version": file_metadata["version"], | ||
| "version": file_metadata["versionsuffix"], | ||
| "versionsuffix": file_metadata["versionsuffix"], | ||
| } | ||
| version_dict["description"] = ( | ||
| f"""{component[0]} is a component included in the software module for {version_dict['parent_software']['name']}""" | ||
|
|
@@ -228,6 +228,7 @@ def get_all_software(eessi_files_by_eessi_version): | |
| for version in all_software_information[software]["versions"]: | ||
| if toolchain_family in version["toolchain_families_compatibility"]: | ||
| reference_version = version | ||
| break | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should break here once we have a hit since we want the most recent version. |
||
| if reference_version is None: | ||
| raise ValueError(f"No toolchain compatibility in {all_software_information[software]}") | ||
| for top_level_info in top_level_info_list + ["description"]: | ||
|
|
@@ -305,7 +306,10 @@ def main(): | |
| # - versionsuffix | ||
| # - cpu_arch (list) | ||
| # - gpu_arch (list, empty for now) | ||
| # - module_file | ||
| # - module | ||
| # - module_name | ||
| # - module_version | ||
| # - full_module_name | ||
| # - required_modules (list of modules) | ||
| base_json_metadata = {"timestamp": software_metadata["timestamp"]} | ||
| eessi_versions = software_metadata["eessi_version"].keys() | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nasty little bug