Skip to content

Commit ecc4a61

Browse files
committed
Merge branch 'main' into release/2025.1
2 parents 1160b32 + 0935b5c commit ecc4a61

File tree

12 files changed

+61
-43
lines changed

12 files changed

+61
-43
lines changed

.github/workflows/ci-build.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,15 @@ jobs:
7272
steps:
7373
- uses: actions/checkout@v4
7474

75-
- name: Set up Python ${{ matrix.python-version }}
76-
uses: actions/setup-python@v5
75+
- name: Install the latest version of uv and set the python version
76+
uses: astral-sh/setup-uv@v5
7777
with:
7878
python-version: ${{ matrix.python-version }}
79-
cache: 'pip'
80-
cache-dependency-path: 'pyproject.toml'
79+
cache-dependency-glob: '**/pyproject.toml'
8180

8281
- name: Install core PyAnsys packages
8382
run: |
84-
pip install .
83+
uv pip install .
8584
8685
- name: Smoke test
8786
run: python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print(__version__)"
@@ -100,16 +99,15 @@ jobs:
10099
steps:
101100
- uses: actions/checkout@v4
102101

103-
- name: Set up Python ${{ matrix.python-version }}
104-
uses: actions/setup-python@v5
102+
- name: Install the latest version of uv and set the python version
103+
uses: astral-sh/setup-uv@v5
105104
with:
106105
python-version: ${{ matrix.python-version }}
107-
cache: 'pip'
108-
cache-dependency-path: 'pyproject.toml'
106+
cache-dependency-glob: '**/pyproject.toml'
109107

110108
- name: Install ${{ matrix.extras-version }} PyAnsys packages
111109
run: |
112-
pip install .[${{ matrix.extras-version }}]
110+
uv pip install .[${{ matrix.extras-version }}]
113111
114112
- name: Smoke test
115113
run: python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print(__version__)"

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
cp version/dev/index.html index.html
4848
sed -i 's/href="\([^:"]*\)"/href="version\/dev\/\1"/g' index.html
4949
sed -i 's/src="\([^:"]*\)"/src="version\/dev\/\1"/g' index.html
50+
# Update JS variables pointing to static values
51+
sed -i 's|const SEARCH_FILE = ".*_static/search.json";|const SEARCH_FILE = "version/dev/_static/search.json";|g' index.html
52+
sed -i 's|const PROJECTS_FILE = ".*_static/projects.json";|const PROJECTS_FILE = "version/dev/_static/projects.json";|g' index.html
5053
# Replace "version/stable" with "version/dev" in the sitemap.xml
5154
sed -i 's/version\/stable/version\/dev/g' sitemap.xml
5255
@@ -58,4 +61,4 @@ jobs:
5861
uses: EndBug/add-and-commit@v9
5962
with:
6063
default_author: github_actions
61-
message: "update index.html and sitemaps folder"
64+
message: "update index.html and sitemaps folder"

.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.8.6
4+
rev: v0.9.1
55
hooks:
66
- id: ruff
77
- id: ruff-format
@@ -29,7 +29,7 @@ repos:
2929

3030
# this validates our github workflow files
3131
- repo: https://github.com/python-jsonschema/check-jsonschema
32-
rev: 0.30.0
32+
rev: 0.31.0
3333
hooks:
3434
- id: check-github-workflows
3535

doc/source/_static/css/landing_page.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ html {
7171
border-radius: 8px;
7272
background-color: white;
7373
}
74+
.project-card:hover {
75+
cursor: pointer;
76+
}
7477

7578
.project-thumbnail {
7679
padding: 0;

doc/source/_static/js/landing_page.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -184,25 +184,27 @@ function initializeAllCards() {
184184
});
185185
}
186186

187-
fetch("_static/projects.json")
188-
.then((response) => {
189-
if (!response.ok) {
190-
throw new Error(`HTTP error! Status: ${response.status}`);
191-
}
192-
return response.json();
193-
})
194-
.then((data) => {
195-
// Display families
196-
const familyCounts = collectFamilies(data);
197-
displayFamilies(familyCounts);
198-
199-
// Display tags
200-
const tagCounts = collectTags(data);
201-
displayTags(tagCounts);
202-
203-
// Render all cards
204-
initializeAllCards();
205-
})
206-
.catch((error) => {
207-
console.error("Error fetching the projects data:", error);
208-
});
187+
document.addEventListener("DOMContentLoaded", () => {
188+
fetch(PROJECTS_FILE)
189+
.then((response) => {
190+
if (!response.ok) {
191+
throw new Error(`HTTP error! Status: ${response.status}`);
192+
}
193+
return response.json();
194+
})
195+
.then((data) => {
196+
// Display families
197+
const familyCounts = collectFamilies(data);
198+
displayFamilies(familyCounts);
199+
200+
// Display tags
201+
const tagCounts = collectTags(data);
202+
displayTags(tagCounts);
203+
204+
// Render all cards
205+
initializeAllCards();
206+
})
207+
.catch((error) => {
208+
console.error("Error fetching the projects data:", error);
209+
});
210+
});

doc/source/_templates/landing_page_sidebar.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@
1717
</div>
1818

1919
</div>
20+
21+
<script>
22+
const PROJECTS_FILE = "{{ pathto('_static/projects.json', 1) }}"
23+
</script>
24+
<script src="{{ pathto('_static/js/landing_page.js', 1) }}"></script>

doc/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
templates_path = ["_templates"]
8787
html_static_path = ["_static"]
8888
html_css_files = ["css/landing_page.css"]
89-
html_js_files = ["js/landing_page.js"]
9089

9190
metadata = Path(__file__).parent.parent.parent / "projects.yaml"
9291

doc/source/index.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ it is now a collection of many Python packages for using Ansys products through
2121

2222
.. raw:: html
2323

24-
<div class="projects" style="">
24+
<div class="projects">
2525
{% for project, metadata in projects['projects'].items() %}
2626

2727
{% set family = metadata.get('family', 'other') | lower | replace(' ', '-') %}
2828
{% set tags = metadata.get('tags', 'other') | lower %}
2929

30-
<div class="project-card sd-card sd-shadow-sm sd-card-hover" data-family="{{ family }}" data-tags="{{ tags }}">
30+
<div
31+
class="project-card sd-card sd-shadow-sm sd-card-hover"
32+
data-family="{{ family }}"
33+
data-tags="{{ tags }}"
34+
onclick="window.location.href='{{ metadata['documentation']['base'] }}';"
35+
>
3136
<img class="project-thumbnail" src="{{ metadata['thumbnail'] }}" />
3237
<div class="sd-card-body">
3338
<p class="sd-card-title sd-font-weight-bold"> {{ metadata['name'] }} </p>

doc/source/supported_versions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Below you can find a list of the Python versions supported by each PyAnsys metap
5151
+-----------------+----------------------------+
5252
| `2024.2`_ | Python 3.9 - Python 3.12 |
5353
+-----------------+----------------------------+
54+
| `2025.1`_ | Python 3.10 - Python 3.12 |
55+
+-----------------+----------------------------+
5456
| `development`_ | Python 3.10 - Python 3.12 |
5557
+-----------------+----------------------------+
5658

@@ -62,4 +64,5 @@ Below you can find a list of the Python versions supported by each PyAnsys metap
6264
.. _2023.2: https://pypi.org/project/pyansys/2023.2.11/
6365
.. _2024.1: https://pypi.org/project/pyansys/2024.1.8/
6466
.. _2024.2: https://pypi.org/project/pyansys/2024.2.2/
67+
.. _2025.1: https://pypi.org/project/pyansys/2025.1.0/
6568
.. _development: https://github.com/ansys/pyansys

projects.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ projects:
2222
tags: [Flagship, Composites]
2323
documentation:
2424
base: https://additive.docs.pyansys.com/version/stable
25-
user_guide: https://additive.docs.pyansys.com/version/stable/getting_started/index.html
25+
user_guide: https://additive.docs.pyansys.com/version/stable/getting-started/index.html
2626
examples: https://additive.docs.pyansys.com/version/stable/examples/gallery_examples/index.html
2727
api: https://additive.docs.pyansys.com/version/stable/api/index.html
2828

0 commit comments

Comments
 (0)