Skip to content

Commit d64d3d3

Browse files
committed
Merge branch 'main' into release/2025.1
2 parents 487db31 + e1ca9be commit d64d3d3

File tree

16 files changed

+777
-1024
lines changed

16 files changed

+777
-1024
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/ci-build.yml

Lines changed: 18 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ env:
1717
PACKAGE_NAMESPACE: pyansys
1818
MAIN_PYTHON_VERSION: '3.11'
1919
DOCUMENTATION_CNAME: "docs.pyansys.com"
20-
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
21-
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
2220

2321
jobs:
2422
check-vulnerabilities:
@@ -27,7 +25,7 @@ jobs:
2725
steps:
2826
- name: PyAnsys Vulnerability Check (on PRs)
2927
if: github.event_name == 'pull_request'
30-
uses: ansys/actions/check-vulnerabilities@v7
28+
uses: ansys/actions/check-vulnerabilities@v8
3129
with:
3230
python-version: ${{ env.MAIN_PYTHON_VERSION }}
3331
python-package-name: ${{ env.PACKAGE_NAME }}
@@ -36,7 +34,7 @@ jobs:
3634

3735
- name: PyAnsys Vulnerability Check (any other case)
3836
if: github.event_name != 'pull_request'
39-
uses: ansys/actions/check-vulnerabilities@v7
37+
uses: ansys/actions/check-vulnerabilities@v8
4038
with:
4139
python-version: ${{ env.MAIN_PYTHON_VERSION }}
4240
python-package-name: ${{ env.PACKAGE_NAME }}
@@ -51,13 +49,14 @@ jobs:
5149
with:
5250
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5351
target: "all"
52+
whitelist-license-check: "attrs" # This has MIT license but fails the check
5453

5554
docs-style:
5655
name: Documentation Style Check
5756
runs-on: ubuntu-latest
5857
steps:
5958
- name: PyAnsys documentation style checks
60-
uses: ansys/actions/doc-style@v7
59+
uses: ansys/actions/doc-style@v8
6160
with:
6261
token: ${{ secrets.GITHUB_TOKEN }}
6362

@@ -127,12 +126,13 @@ jobs:
127126

128127
steps:
129128
- name: Build wheelhouse and perform smoke test
130-
uses: ansys/actions/build-wheelhouse@v7
129+
uses: ansys/actions/build-wheelhouse@v8
131130
with:
132131
library-name: ${{ env.PACKAGE_NAME }}
133132
operating-system: ${{ runner.os }}
134133
python-version: ${{ matrix.python-version }}
135134
target: "all"
135+
whitelist-license-check: "attrs" # This has MIT license but fails the check
136136

137137
- name: List dependencies (pip freeze)
138138
run: |
@@ -153,7 +153,7 @@ jobs:
153153

154154
steps:
155155
- name: Build documentation
156-
uses: ansys/actions/doc-build@v7
156+
uses: ansys/actions/doc-build@v8
157157
with:
158158
python-version: ${{ env.MAIN_PYTHON_VERSION }}
159159
dependencies: "build-essential zip pandoc texlive-latex-extra latexmk texlive-pstricks"
@@ -165,37 +165,25 @@ jobs:
165165
needs: [package]
166166
steps:
167167
- name: Deploy the latest documentation
168-
uses: ansys/actions/doc-deploy-dev@v7
168+
uses: ansys/actions/doc-deploy-dev@v8
169169
with:
170170
cname: ${{ env.DOCUMENTATION_CNAME }}
171-
token: ${{ secrets.GITHUB_TOKEN }}
171+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
172+
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
173+
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
172174

173175
adapt-landing-page-dev:
174176
uses: ./.github/workflows/update-gh-pages.yml
175177
needs: [doc-deploy-dev]
176178
secrets: inherit
177179

178-
doc-index-dev:
179-
name: "Deploy dev docs index"
180-
if: github.ref == 'refs/heads/main'
181-
runs-on: ubuntu-latest
182-
needs: [doc-deploy-dev]
183-
steps:
184-
- name: "Deploy the dev documentation index"
185-
uses: ansys/actions/doc-deploy-index@v7
186-
with:
187-
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
188-
index-name: pyansys-vdev
189-
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
190-
api-key: ${{ env.MEILISEARCH_API_KEY }}
191-
192180
package:
193181
name: Package library
194182
runs-on: ubuntu-latest
195183
needs: [docs-build, smoke-tests-core]
196184
steps:
197185
- name: Build library source and wheel artifacts
198-
uses: ansys/actions/build-library@v7
186+
uses: ansys/actions/build-library@v8
199187
with:
200188
library-name: ${{ env.PACKAGE_NAME }}
201189
python-version: ${{ env.MAIN_PYTHON_VERSION }}
@@ -207,14 +195,14 @@ jobs:
207195
runs-on: ubuntu-latest
208196
steps:
209197
- name: Release to PyPI repository
210-
uses: ansys/actions/release-pypi-public@v7
198+
uses: ansys/actions/release-pypi-public@v8
211199
with:
212200
library-name: ${{ env.PACKAGE_NAME }}
213201
twine-username: __token__
214202
twine-token: ${{ secrets.PYPI_TOKEN }}
215203

216204
- name: Release to GitHub
217-
uses: ansys/actions/release-github@v7
205+
uses: ansys/actions/release-github@v8
218206
with:
219207
library-name: ${{ env.PACKAGE_NAME }}
220208
additional-artifacts: 'all-deps-Linux-3.10 all-deps-Linux-3.11 all-deps-Linux-3.12 all-deps-Windows-3.10 all-deps-Windows-3.11 all-deps-Windows-3.12 all-deps-macOS-3.10 all-deps-macOS-3.11 all-deps-macOS-3.12'
@@ -225,42 +213,14 @@ jobs:
225213
needs: [release]
226214
steps:
227215
- name: Deploy the latest release documentation
228-
uses: ansys/actions/doc-deploy-stable@v7
216+
uses: ansys/actions/doc-deploy-stable@v8
229217
with:
230218
cname: ${{ env.DOCUMENTATION_CNAME }}
231-
token: ${{ secrets.GITHUB_TOKEN }}
219+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
220+
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
221+
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
232222

233223
adapt-landing-page-release:
234224
uses: ./.github/workflows/update-gh-pages.yml
235225
needs: [docs-release]
236226
secrets: inherit
237-
238-
doc-index-release:
239-
name: "Deploy release docs index"
240-
runs-on: ubuntu-latest
241-
needs: docs-release
242-
steps:
243-
- name: "Install Git and clone project"
244-
uses: actions/checkout@v4
245-
246-
- name: "Install the library to get the version"
247-
shell: bash
248-
run: |
249-
python -m pip install -e .
250-
251-
- name: "Get the version of the library"
252-
run: |
253-
VERSION=$(python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print('.'.join(__version__.split('.')[:2]))")
254-
VERSION_MEILI=$(python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print('-'.join(__version__.split('.')[:2]))")
255-
echo "Calculated VERSION: $VERSION"
256-
echo "Calculated VERSION_MEILI: $VERSION_MEILI"
257-
echo "VERSION=$VERSION" >> $GITHUB_ENV
258-
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
259-
260-
- name: "Deploy the latest documentation index"
261-
uses: ansys/actions/doc-deploy-index@v7
262-
with:
263-
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
264-
index-name: pyansys-v${{ env.VERSION_MEILI }}
265-
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
266-
api-key: ${{ env.MEILISEARCH_API_KEY }}

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

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
1-
2-
name: Update index.html in GH Pages
1+
name: Custom Github pages post-processing
32

43
on:
54
workflow_dispatch:
65
workflow_call:
6+
push:
7+
tags:
8+
- "*"
9+
schedule:
10+
- cron: "* 3 * * 5"
11+
12+
env:
13+
MAIN_PYTHON_VERSION: '3.12'
714

815
jobs:
916
update-gh-pages:
1017
runs-on: ubuntu-latest
1118

1219
steps:
20+
- name: Install Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
24+
25+
- name: Install Python dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install requests
29+
1330
- name: Checkout repository
1431
uses: actions/checkout@v4
32+
33+
- name: Copy tools folder to /tmp and run sitemap script
34+
working-directory: /tmp
35+
run: |
36+
cp -r /home/runner/work/pyansys/pyansys/tools/ .
37+
python ./tools/catsitemap.py
38+
39+
- name: Checkout repository gh-pages branch
40+
uses: actions/checkout@v4
1541
with:
1642
ref: gh-pages
1743

@@ -24,8 +50,12 @@ jobs:
2450
# Replace "version/stable" with "version/dev" in the sitemap.xml
2551
sed -i 's/version\/stable/version\/dev/g' sitemap.xml
2652
53+
- name: Move sitemaps/ to gh-pages root
54+
run: |
55+
rm -rf sitemaps/ && mv /tmp/sitemaps/ .
56+
2757
- name: "Commit changes"
2858
uses: EndBug/add-and-commit@v9
2959
with:
3060
default_author: github_actions
31-
message: "update index.html"
61+
message: "update index.html and sitemaps folder"

.pre-commit-config.yaml

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

3-
- repo: https://github.com/psf/black
4-
rev: 24.8.0
3+
- repo: https://github.com/astral-sh/ruff-pre-commit
4+
rev: v0.8.3
55
hooks:
6-
- id: black
7-
8-
- repo: https://github.com/pycqa/isort
9-
rev: 5.13.2
10-
hooks:
11-
- id: isort
12-
13-
- repo: https://github.com/PyCQA/flake8
14-
rev: 7.1.1
15-
hooks:
16-
- id: flake8
6+
- id: ruff
7+
- id: ruff-format
178

189
- repo: https://github.com/codespell-project/codespell
1910
rev: v2.3.0
@@ -29,7 +20,7 @@ repos:
2920
exclude: "tests/"
3021

3122
- repo: https://github.com/pre-commit/pre-commit-hooks
32-
rev: v4.6.0
23+
rev: v5.0.0
3324
hooks:
3425
- id: check-merge-conflict
3526
- id: debug-statements
@@ -38,12 +29,12 @@ repos:
3829

3930
# this validates our github workflow files
4031
- repo: https://github.com/python-jsonschema/check-jsonschema
41-
rev: 0.29.2
32+
rev: 0.30.0
4233
hooks:
4334
- id: check-github-workflows
4435

4536
- repo: https://github.com/ansys/pre-commit-hooks
46-
rev: v0.4.3
37+
rev: v0.4.4
4738
hooks:
4839
- id: add-license-headers
4940
args:

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PyAnsys metapackage
22
===================
3-
|pyansys| |python| |pypi| |downloads| |GH-CI| |MIT| |black| |pre-commit|
3+
|pyansys| |python| |pypi| |downloads| |GH-CI| |MIT| |Ruff| |pre-commit|
44

55
.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
66
:target: https://docs.pyansys.com/
@@ -26,9 +26,9 @@ PyAnsys metapackage
2626
:target: https://opensource.org/licenses/MIT
2727
:alt: MIT
2828

29-
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
30-
:target: https://github.com/psf/black
31-
:alt: Black
29+
.. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
30+
:target: https://github.com/astral-sh/ruff
31+
:alt: Ruff
3232

3333
.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/pyansys/pyansys/main.svg
3434
:target: https://results.pre-commit.ci/latest/github/pyansys/pyansys/main
@@ -55,7 +55,7 @@ The ``pyansys`` metapackage ensures compatibility between these PyAnsys packages
5555
- `PyDPF - Core <https://dpf.docs.pyansys.com/>`_: Pythonic interface to the Data Processing Framework (DPF) for building advanced and customized workflows.
5656
- `PyDPF - Post <https://post.docs.pyansys.com/>`_: Pythonic interface to access and post process Ansys solver result files.
5757
- `PyDPF - Composites <https://composites.dpf.docs.pyansys.com/>`_: Pythonic interface to postprocess layered and short-fiber composite models.
58-
- `PyDyna <https://dyna.docs.pyansys.com/>`_: Pythonic interface to build the Ansys DYNA input deck, submit it to the Ansys LS-DYNA solver, and postprocess its results.
58+
- `PyDYNA <https://dyna.docs.pyansys.com/>`_: Pythonic interface to build the Ansys DYNA input deck, submit it to the Ansys LS-DYNA solver, and postprocess its results.
5959
- `PyDynamicReporting <https://dynamicreporting.docs.pyansys.com/>`_: Pythonic interface to Ansys Dynamic Reporting for service and control of its database and reports.
6060
- `PyEDB <https://edb.docs.pyansys.com/>`_: Pythonic interface to the Ansys Electronics Database (EDB) client library.
6161
- `PyEDB - Core <https://edb.core.docs.pyansys.com/>`_: Pythonic interface to Ansys Electronics Database (EDB).
@@ -113,7 +113,7 @@ By default, the PyAnsys metapackage installs these core modules:
113113
- `PyDPF - Core`_
114114
- `PyDPF - Post`_
115115
- `PyDPF - Composites`_
116-
- `PyDyna`_
116+
- `PyDYNA`_
117117
- `PyDynamicReporting`_
118118
- `PyEDB`_
119119
- `PyEDB - Core`_

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ pdf:
2525
(test -f $(BUILDDIR)/latex/pyansys.pdf && echo pdf exists) || exit 1
2626

2727
clean:
28-
rm -rf build
28+
rm -rf $(BUILDDIR)

0 commit comments

Comments
 (0)