Skip to content

Commit 6b6644a

Browse files
committed
Add support for a RISC-V software overview page
1 parent 2b27991 commit 6b6644a

8 files changed

Lines changed: 94 additions & 6 deletions

File tree

.github/workflows/test_overview_available_software.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ jobs:
3131
mkdir -p ${data_dir}
3232
cd ${data_dir}
3333
curl -OL https://eessi.io/api_data/data/eessi_api_metadata_software.json
34+
curl -OL https://eessi.io/api_data/data/eessi_api_metadata-riscv_software.json
3435
cd -
3536
3637
python scripts/available_software/available_software.py
3738
./scripts/update_generated_time.sh mkdocs.yml
3839
3940
# determine whether pull request would need to be opened:
4041
# if detailed software pages in docs/available_software/detail have been updated, then a PR should be opened
41-
if [[ $(git status --porcelain ./docs/available_software/detail) ]]; then
42+
if [[ -n "$(git status --porcelain ./docs/available_software/detail ./docs/available_software_riscv/detail)" ]]; then
4243
echo "Software pages have been changed, PR should be opened"
4344
git diff ./docs/available_software/detail
4445
else

.github/workflows/update_available_software.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
mkdir -p ${data_dir}
3232
cd ${data_dir}
3333
curl -OL https://eessi.io/api_data/data/eessi_api_metadata_software.json
34+
# Also download RISC-V data
35+
curl -OL https://eessi.io/api_data/data/eessi_api_metadata-riscv_software.json
3436
cd -
3537
3638
python scripts/available_software/available_software.py
@@ -40,7 +42,7 @@ jobs:
4042
4143
# determine whether pull request should be opened:
4244
# if detailed software pages in docs/available_software/detail have been updated, then a PR should be opened
43-
if [[ $(git status --porcelain ./docs/available_software/detail) ]]; then
45+
if [[ -n "$(git status --porcelain ./docs/available_software/detail ./docs/available_software_riscv/detail)" ]]; then
4446
echo "Software pages have been changed, PR should be opened"
4547
echo "json_data_changed=yes" >> $GITHUB_OUTPUT
4648
else
@@ -57,6 +59,7 @@ jobs:
5759
with:
5860
add-paths: |
5961
docs/available_software
62+
docs/available_software_riscv
6063
mkdocs.yml
6164
branch: update-software-overview
6265
branch-suffix: timestamp

docs/available_software/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
Overview of software available in [EESSI's production repository `software.eessi.io`](../repositories/software.eessi.io.md).
77

8+
(For an overview of the currently available RISC-V software see the [RISC-V specific available software page](../available_software_riscv/index.md))
9+
810
<em>{{ data.n_software }} unique software projects (+ {{ data.n_extensions }} unique extensions)</em>
911

1012
<!-- see also docs/available_software/javascripts/software-filter.js -->

docs/available_software/macros.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from pathlib import Path
1111

1212
EESSI_API_SOFTWARE_JSON_URL = 'https://www.eessi.io/api_data/data/eessi_api_metadata_software.json'
13+
EESSI_API_SOFTWARE_RISCV_JSON_URL = 'https://www.eessi.io/api_data/data/eessi_api_metadata-riscv_software.json'
1314

1415
CPU_ARCHS = {
1516
'x86_64': ['AMD', 'Intel'],
@@ -27,19 +28,27 @@
2728
def define_env(env):
2829

2930
@env.macro
30-
def load_json_eessi_software():
31+
def load_json_eessi_software(riscv=False):
3132
"""
3233
Load JSON with metadata for software.eessi.io repository,
3334
and return Python dictionary with relevant info to generate software overview in EESSI documentation.
3435
"""
3536
# https://eessi.io/api_data/data/eessi_api_metadata_software.json is expected to be downloaded to docs/available_software/data/
3637
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
37-
json_path = os.path.join(root_dir, 'docs', 'available_software', 'data', 'eessi_api_metadata_software.json')
38+
if riscv:
39+
data_file='eessi_api_metadata-riscv_software.json'
40+
else:
41+
data_file='eessi_api_metadata_software.json'
42+
json_path = os.path.join(root_dir, 'docs', 'available_software', 'data', data_file)
3843
if os.path.exists(json_path):
3944
with open(json_path) as fp:
4045
data = json.loads(fp.read())
4146
else:
42-
with urllib.request.urlopen(EESSI_API_SOFTWARE_JSON_URL) as response:
47+
if riscv:
48+
data_url = EESSI_API_SOFTWARE_RISCV_JSON_URL
49+
else:
50+
data_url = EESSI_API_SOFTWARE_JSON_URL
51+
with urllib.request.urlopen(data_url) as response:
4352
data = json.loads(response.read().decode('utf-8'))
4453

4554
data_software = data['software']

docs/available_software_riscv/detail/.gitkeep

Whitespace-only changes.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{% set data = load_json_eessi_software(riscv=True) %}
2+
{% set software = data.software %}
3+
4+
# Software available for RISC-V in EESSI
5+
6+
Overview of software available in [EESSI's development repository for RISC-V `dev.eessi.io/riscv`](../repositories/dev.eessi.io.md).
7+
8+
<em>{{ data.n_software }} unique software projects (+ {{ data.n_extensions }} unique extensions)</em>
9+
10+
<!-- see also docs/available_software/javascripts/software-filter.js -->
11+
<input type="search" id="software-search" class="md-input"
12+
placeholder="Filter software..."
13+
style="width:100%; margin-bottom:1rem;">
14+
15+
<div class="grid cards" markdown>
16+
17+
{% for pkg in software %}
18+
{% set pkg_slug = pkg.name | replace(' ', '-') %}
19+
{% if pkg.is_extension -%}
20+
- <span class="software-item software-card"
21+
data-search="name:{{ pkg.name }} extension ext_type:{{ pkg.type }}" >
22+
<span class="software-name">{{ pkg.name }}</span>
23+
<span class="software-more-info"><small>(extension)</small></span>
24+
<br/>
25+
<p class="software-description">
26+
{{ pkg.name }} is a {% if pkg.type == "python" -%} Python package{% elif pkg.type == "r" -%}R library{% elif pkg.type == "perl" -%}Perl module{% endif %}
27+
that is included as extension in the following software installations:
28+
<ul>
29+
{% for parent in pkg.all_parent_names %}
30+
{% set parent_slug = parent | replace(' ', '-') %}
31+
<li><a href="detail/{{ parent_slug }}" target="_blank">{{ parent }}</a></li>
32+
{% endfor %}
33+
</p>
34+
</ul>
35+
</span>
36+
{% else -%}
37+
- <span class="software-item software-card"
38+
data-search="name:{{ pkg.name }} {{ pkg.homepage }} {{ pkg.description }} {{ pkg.cpu_families }} {{ pkg.eessi_versions }} ">
39+
40+
<span class="software-name"><a href="detail/{{ pkg_slug }}" target="_blank">{{ pkg.name }}</a></span>
41+
<!-- <span class="software-versions">{% if pkg.n_versions == 1 -%}({{ pkg.n_versions }} version){% else -%}({{ pkg.n_versions }} versions){% endif %}</span> -->
42+
<span class="software-more-info"><a href="detail/{{ pkg_slug }}" target="_blank">(more details)</a></span>
43+
<br/>
44+
<span class="software-link">{{ pkg.homepages }}</span>
45+
<br/>
46+
<p class="software-description">
47+
{{ pkg.description }}
48+
</p>
49+
<span class="software-eessi-versions">Available in EESSI versions: {% if '2023.06' in pkg.eessi_versions -%}<span class="software-eessi-version-202306">2023.06</span>{% endif %}{% if '2025.06' in pkg.eessi_versions -%}<span class="software-eessi-version-202506">2025.06</span>{% endif %}</span>
50+
<br/>
51+
<span class="software-cpus">Supported CPU families: {% if 'AMD' in pkg.cpu_families -%}<span class="software-cpu-amd">AMD</span>{% endif %}{% if 'Intel' in pkg.cpu_families -%}<span class="software-cpu-intel">Intel</span>{% endif %}{% if 'Arm' in pkg.cpu_families -%}<span class="software-cpu-arm">Arm</span>{% endif %}{% if 'RISC-V' in pkg.cpu_families -%}<span class="software-cpu-riscv">RISC-V</span>{% endif %}</span>
52+
<br/>
53+
<span class="software-gpus">Supported GPU families: {% if pkg.gpu_families == '' -%}<em>(none)</em>{% else -%}{% if 'AMD' in pkg.gpu_families -%}<span class="software-gpu-amd">AMD</span>{% endif %}{% if 'NVIDIA' in pkg.gpu_families -%}<span class="software-gpu-nvidia">NVIDIA</span>{% endif %}{% endif %}</span>
54+
<br/>
55+
</span>
56+
{% endif %}
57+
{% endfor %}
58+
59+
</div>
60+
61+
---
62+
63+
<small><em>Last update: {{ data.timestamp }}</em></small>

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ nav:
2323
- Software layer: software_layer.md
2424
- Supported CPU targets: software_layer/cpu_targets.md
2525
- Supported GPU targets: software_layer/gpu_targets.md
26-
- Available software: available_software/index.md
26+
- Available software:
27+
- Production: available_software/index.md
28+
- RISC-V: available_software_riscv/index.md
2729
- Repositories:
2830
- Production:
2931
- Software: repositories/software.eessi.io.md

scripts/available_software/available_software.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ def main():
4545
print("Generating software-specific pages... ", end="", flush=True)
4646
api_data_software_json = os.path.join(path_data_dir, "eessi_api_metadata_software.json")
4747
generate_software_pages(api_data_software_json, os.path.join(target_directory, "detail"))
48+
49+
print("Done!")
50+
51+
# Also handle RISC-V
52+
print("Generating software-specific pages for RISC-V... ", end="", flush=True)
53+
api_data_software_json = os.path.join(path_data_dir, "eessi_api_metadata-riscv_software.json")
54+
generate_software_pages(api_data_software_json, os.path.join(target_directory + "_riscv", "detail"))
55+
4856
print("Done!")
4957

5058

0 commit comments

Comments
 (0)