Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ jobs:
exit 1
fi
# Merge all these results together
module reset
module load EESSI-extend # Loads EasyBuild and we need that for our merge scripts
python scripts/merge_data_files.py out.yaml eessi*.yaml
mv out.yaml docs/data/eessi_software_metadata.yaml

# Also do RISC-V repository
module --force purge
rm eessi*.yaml
# Need to set environment variables to load EESSI module for RISC-V
(
Expand All @@ -76,6 +79,9 @@ jobs:
echo $MODULEPATH
python scripts/generate_data_files.py --eessi-version 2025.06-001 --repository "dev.eessi.io/riscv"
)
# Merge all these results together
module reset
module load EESSI-extend # Loads EasyBuild and we need that for our merge scripts
python scripts/merge_data_files.py out_riscv.yaml eessi*.yaml
mv out_riscv.yaml docs/data/eessi_software_metadata-riscv.yaml

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Generate API data
run: |
echo "Generating data files..."

# Only do 2023.06 for EB 5 since this is just a test
(
module --force purge
Expand All @@ -42,6 +41,8 @@ jobs:
) &
# Merge all these results together
wait
module reset
module load EESSI-extend # Loads EasyBuild and we need that for our merge scripts
python scripts/merge_data_files.py out.yaml eessi*.yaml
mv out.yaml docs/data/eessi_software_metadata.yaml

Expand All @@ -62,6 +63,8 @@ jobs:
echo $MODULEPATH
python scripts/generate_data_files.py --eessi-version 2025.06-001 --repository "dev.eessi.io/riscv"
)
module reset
module load EESSI-extend # Loads EasyBuild and we need that for our merge scripts
python scripts/merge_data_files.py out_riscv.yaml eessi*.yaml
mv out_riscv.yaml docs/data/eessi_software_metadata-riscv.yaml

Expand Down
3 changes: 3 additions & 0 deletions scripts/calculate_hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import json
import yaml
import hashlib
# EB 5.4.0 brought in a change that required the import below
import easybuild.easyblocks.python

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ocaisa How did it fail without this import? 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Traceback (most recent call last):
  File "/home/runner/work/api_data/api_data/docs/data/../../scripts/calculate_hashes.py", line 36, in <module>
    data = yaml.load(f, Loader=yaml.FullLoader)
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
           ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 60, in construct_document
    for dummy in generator:
                 ^^^^^^^^^
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 413, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 218, in construct_mapping
    return super().construct_mapping(node, deep=deep)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 143, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 102, in construct_object
    data = constructor(self, tag_suffix, node)
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 570, in construct_python_name
    return self.find_python_name(suffix, node.start_mark)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/software.eessi.io/versions/2025.06/compat/linux/x86_64/usr/lib/python3.13/site-packages/yaml/constructor.py", line 556, in find_python_name
    raise ConstructorError("while constructing a Python object", mark,
            "module %r is not imported" % module_name, mark)
yaml.constructor.ConstructorError: while constructing a Python object
module 'easybuild.easyblocks.python' is not imported
  in "eessi_software_metadata-riscv.yaml", line 12123, column 23

It's because the yaml now has a line like

exts_formatter: !!python/name:easybuild.easyblocks.python.partial_normalize_pip ''



# Directory to scan
directory = "./" # Change to your target directory
Expand Down
2 changes: 2 additions & 0 deletions scripts/merge_data_files.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
import sys
import yaml
# EB 5.4.0 brought in a change that required the import below
import easybuild.easyblocks.python
from datetime import datetime, timezone


Expand Down
2 changes: 2 additions & 0 deletions scripts/process_eessi_software_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import yaml
import json
import subprocess
# EB 5.4.0 brought in a change that required the import below
import easybuild.easyblocks.python

ARCHITECTURES = [
"aarch64/generic",
Expand Down
Loading