Skip to content

Commit 4898c28

Browse files
committed
Merge branch 'main' into release/2025.2
2 parents e57a9ae + 1242089 commit 4898c28

File tree

13 files changed

+163
-98
lines changed

13 files changed

+163
-98
lines changed

.github/workflows/ci-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
with:
5151
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5252
target: "all"
53-
whitelist-license-check: "attrs,referencing,jeepney" # This has MIT license but fails the check
53+
whitelist-license-check: "attrs,referencing,jeepney,paramiko,ansys-dpf-post" # This has MIT license but fails the check, paramiko and ansys-dpf-post need to be removed eventually from the whitelist
5454

5555
docs-style:
5656
name: Documentation Style Check
@@ -71,7 +71,7 @@ jobs:
7171
python-version: ['3.10', '3.11', '3.12', '3.13']
7272

7373
steps:
74-
- uses: actions/checkout@v4
74+
- uses: actions/checkout@v5
7575

7676
- name: Install the latest version of uv and set the python version
7777
uses: astral-sh/setup-uv@v6
@@ -99,7 +99,7 @@ jobs:
9999
extras-version: ['fluent-all', 'mapdl-all', 'tools']
100100

101101
steps:
102-
- uses: actions/checkout@v4
102+
- uses: actions/checkout@v5
103103

104104
- name: Install the latest version of uv and set the python version
105105
uses: astral-sh/setup-uv@v6

.github/workflows/create-milestone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
"ansys/pymaterials-manager",
7373
]
7474
steps:
75-
- uses: actions/checkout@v4
75+
- uses: actions/checkout@v5
7676

7777
- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }}
7878
uses: actions/setup-python@v5

.github/workflows/update-gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
python -m pip install requests
2929
3030
- name: Checkout repository
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3232

3333
- name: Copy tools folder to /tmp and run sitemap script
3434
working-directory: /tmp
@@ -37,7 +37,7 @@ jobs:
3737
python ./tools/catsitemap.py
3838
3939
- name: Checkout repository gh-pages branch
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v5
4141
with:
4242
ref: gh-pages
4343

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22

33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.12.3
4+
rev: v0.12.8
55
hooks:
66
- id: ruff
77
- id: ruff-format
@@ -20,7 +20,7 @@ repos:
2020
exclude: "tests/"
2121

2222
- repo: https://github.com/pre-commit/pre-commit-hooks
23-
rev: v5.0.0
23+
rev: v6.0.0
2424
hooks:
2525
- id: check-merge-conflict
2626
- id: debug-statements

doc/source/_static/icons/dme.svg

Lines changed: 23 additions & 0 deletions
Loading

doc/source/_static/js/landing_page.js

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ function collectFamilies(data) {
1111
for (const project of projects) {
1212
if (!project || typeof project !== "object") continue;
1313

14-
const family = project.family;
14+
// Handle families array
15+
const projectFamilies = project.families || ["Other"];
16+
1517
const icon = project.icon || "ansys-icon-light.svg"; // Fallback icon
1618

17-
if (family) {
18-
if (!familyData[family]) {
19-
familyData[family] = { count: 0, icon: icon };
19+
projectFamilies.forEach((family) => {
20+
if (family) {
21+
if (!familyData[family]) {
22+
familyData[family] = { count: 0, icon: icon };
23+
}
24+
familyData[family].count += 1;
2025
}
21-
familyData[family].count += 1;
22-
}
26+
});
2327
}
2428

2529
return familyData;
@@ -239,9 +243,23 @@ function applyFilters() {
239243
const projectCards = document.querySelectorAll(".project-card");
240244

241245
projectCards.forEach((card) => {
242-
const family = card.getAttribute("data-family").toLowerCase();
243-
const rawTags = card.getAttribute("data-tags");
246+
// Handle families from data attributes
247+
const rawFamilies = card.getAttribute("data-families");
248+
let cardFamilies = [];
249+
250+
if (rawFamilies) {
251+
try {
252+
// Parse as JSON array
253+
cardFamilies = JSON.parse(rawFamilies.replace(/'/g, '"')).map(
254+
(family) => family.toLowerCase(),
255+
);
256+
} catch (error) {
257+
// Fallback to treating as single family string
258+
cardFamilies = [rawFamilies.toLowerCase()];
259+
}
260+
}
244261

262+
const rawTags = card.getAttribute("data-tags");
245263
let cardTags = [];
246264
if (rawTags) {
247265
try {
@@ -255,7 +273,10 @@ function applyFilters() {
255273

256274
// Check if the card matches the selected families
257275
const matchesAllFamilies =
258-
selectedFamilies.length === 0 || selectedFamilies.includes(family);
276+
selectedFamilies.length === 0 ||
277+
selectedFamilies.some((selectedFamily) =>
278+
cardFamilies.includes(selectedFamily),
279+
);
259280

260281
// Check if the card matches the selected tags
261282
const matchesAllTags =
149 KB
Loading

doc/source/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PyAnsys packages API reference
2424
:gutter: 3 3 4 4
2525

2626
{% for project, metadata in projects['projects'].items() %}
27-
{% if 'Tools' not in metadata['family'] %}
27+
{% if 'Tools' not in metadata.get('families', []) %}
2828
.. grid-item-card:: {{ metadata['name'] }}
2929
:img-top: {{ metadata['thumbnail'] }}
3030
:link: {{ metadata['documentation']['api'] }}

doc/source/examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PyAnsys packages examples
1919
:gutter: 3 3 4 4
2020

2121
{% for project, metadata in projects['projects'].items() %}
22-
{% if 'Tools' not in metadata['family'] %}
22+
{% if 'Tools' not in metadata.get('families', []) %}
2323
.. grid-item-card:: {{ metadata['name'] }}
2424
:img-top: {{ metadata['thumbnail'] }}
2525
:link: {{ metadata['documentation']['examples'] }}

doc/source/index.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ it is now a collection of many Python packages for using Ansys products through
2222
<div class="projects">
2323
{% for project, metadata in projects['projects'].items() %}
2424

25-
{% set family = metadata.get('family', 'other') | lower | replace(' ', '-') %}
26-
{% set tags = metadata.get('tags', 'other') | lower %}
25+
{% set families = metadata.get('families', ['Other']) %}
26+
{% set family_attr = families | join(',') | lower | replace(' ', '-') %}
27+
{% set family_display = families[0] | lower | replace(' ', '-') %}
28+
{% set tags = metadata.get('tags', []) %}
2729

2830
<div
2931
class="project-card sd-card sd-shadow-sm sd-card-hover"
30-
data-family="{{ family }}"
32+
data-families="{{ families }}"
33+
data-family="{{ family_display }}"
3134
data-tags="{{ tags }}"
3235
onclick="window.location.href='{{ metadata['documentation']['base'] }}';"
3336
>
@@ -36,7 +39,9 @@ it is now a collection of many Python packages for using Ansys products through
3639
<p class="sd-card-title sd-font-weight-bold"> {{ metadata['name'] }} </p>
3740
<p class="sd-card-body-text"> {{ metadata['description'] }} </p>
3841
<p class="sd-card-text">
39-
<span class="sd-sphinx-override sd-badge sd-bg-muted sd-text-primary">{{ family.capitalize() }}</span>
42+
{% for family in families %}
43+
<span class="sd-sphinx-override sd-badge sd-bg-muted sd-text-primary">{{ family }}</span>
44+
{% endfor %}
4045
{% for tag in metadata['tags'] %}
4146
<span class="sd-sphinx-override sd-badge sd-bg-muted sd-text-primary">{{ tag }}</span>
4247
{% endfor %}

0 commit comments

Comments
 (0)