Skip to content

Commit 11ce8aa

Browse files
committed
Merge branch 'main' into release/0.10
2 parents c91291d + 24030d8 commit 11ce8aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+5122
-1625
lines changed

.github/workflows/ci_cd.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: CI-CD
22

33
# run only on main branch. This avoids duplicated actions on PRs
44
on:
5-
workflow_dispatch:
65
pull_request:
76
branches:
87
- main
@@ -18,9 +17,11 @@ concurrency:
1817

1918
env:
2019
DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
21-
MAIN_PYTHON_VERSION: '3.13'
20+
MAIN_PYTHON_VERSION: '3.12'
2221
PACKAGE_NAME: 'ansys-dynamicreporting-core'
2322
PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'
23+
ANSYS_VERSION: '261'
24+
DPF_STANDALONE_SUFFIX: ''
2425

2526
jobs:
2627
style:
@@ -49,11 +50,11 @@ jobs:
4950
fail-fast: false
5051
matrix:
5152
os: [ ubuntu-latest, windows-latest ]
52-
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
53+
python-version: [ '3.10', '3.11', '3.12' ]
5354

5455
steps:
5556
- name: Checkout code
56-
uses: actions/checkout@v4
57+
uses: actions/checkout@v5
5758

5859
- name: Set up Python
5960
uses: actions/setup-python@v5
@@ -79,9 +80,9 @@ jobs:
7980
strategy:
8081
matrix:
8182
os: [ ubuntu-latest ]
82-
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
83+
python-version: [ '3.10', '3.11', '3.12' ]
8384
steps:
84-
- uses: actions/checkout@v4
85+
- uses: actions/checkout@v5
8586

8687
- name: Login to GitHub Container Registry
8788
uses: docker/login-action@v3
@@ -98,6 +99,29 @@ jobs:
9899
with:
99100
python-version: ${{ matrix.python-version }}
100101

102+
- name: Set licensing if necessary
103+
if: ${{ env.ANSYS_VERSION > '231' }}
104+
shell: bash
105+
run: |
106+
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
107+
echo "ANSYSLMD_LICENSE_FILE=1055@${{ secrets.LICENSE_SERVER }}" >> $GITHUB_ENV
108+
109+
- name: Update packages
110+
shell: bash
111+
run: |
112+
sudo apt update && sudo apt install -y \
113+
libx11-dev \
114+
libgl1-mesa-dev \
115+
libxrender1
116+
117+
- name: Install DPF
118+
id: set-server-path
119+
uses: ansys/pydpf-actions/[email protected]
120+
with:
121+
dpf-standalone-TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
122+
standalone_suffix: ${{ env.DPF_STANDALONE_SUFFIX }}
123+
ANSYS_VERSION : ${{ env.ANSYS_VERSION }}
124+
101125
- name: Run pytest
102126
run: make test
103127
env:
@@ -150,7 +174,7 @@ jobs:
150174
steps:
151175

152176
- name: Download all artifacts
153-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
177+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
154178
with:
155179
name: ${{ env.PACKAGE_NAME }}-artifacts
156180
path: ${{ env.PACKAGE_NAME }}-artifacts
@@ -206,7 +230,7 @@ jobs:
206230
needs: [ package ]
207231
runs-on: ubuntu-latest
208232
steps:
209-
- uses: actions/checkout@v4
233+
- uses: actions/checkout@v5
210234
- name: Microsoft Teams Notification
211235
uses: jdcargile/[email protected]
212236
with:

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concurrency:
99

1010
env:
1111
DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
12-
MAIN_PYTHON_VERSION: '3.13'
12+
MAIN_PYTHON_VERSION: '3.12'
1313
PACKAGE_NAME: 'ansys-dynamicreporting-core'
1414
PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'
1515

@@ -45,7 +45,7 @@ jobs:
4545
needs: [ docs, upload_docs_release ]
4646
runs-on: ubuntu-latest
4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v5
4949
- name: Microsoft Teams Notification
5050
uses: jdcargile/[email protected]
5151
with:

.github/workflows/nightly-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
10-
MAIN_PYTHON_VERSION: '3.13'
10+
MAIN_PYTHON_VERSION: '3.12'
1111

1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/nightly.yml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
workflow_dispatch:
77

88
env:
9-
MAIN_PYTHON_VERSION: '3.13'
9+
MAIN_PYTHON_VERSION: '3.12'
1010
PACKAGE_NAME: 'ansys-dynamicreporting-core'
1111
PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'
12+
ANSYS_VERSION: '261'
13+
DPF_STANDALONE_SUFFIX: ''
1214

1315
jobs:
1416

@@ -18,10 +20,10 @@ jobs:
1820
strategy:
1921
matrix:
2022
os: [ ubuntu-latest ]
21-
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
23+
python-version: [ '3.10', '3.11', '3.12' ]
2224

2325
steps:
24-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2527
with:
2628
ref: 'refs/heads/main'
2729

@@ -40,6 +42,29 @@ jobs:
4042
with:
4143
python-version: ${{ matrix.python-version }}
4244

45+
- name: Set licensing if necessary
46+
if: ${{ env.ANSYS_VERSION > '231' }}
47+
shell: bash
48+
run: |
49+
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
50+
echo "ANSYSLMD_LICENSE_FILE=1055@${{ secrets.LICENSE_SERVER }}" >> $GITHUB_ENV
51+
52+
- name: Update packages
53+
shell: bash
54+
run: |
55+
sudo apt update && sudo apt install -y \
56+
libx11-dev \
57+
libgl1-mesa-dev \
58+
libxrender1
59+
60+
- name: Install DPF
61+
id: set-server-path
62+
uses: ansys/pydpf-actions/[email protected]
63+
with:
64+
dpf-standalone-TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
65+
standalone_suffix: ${{ env.DPF_STANDALONE_SUFFIX }}
66+
ANSYS_VERSION: ${{ env.ANSYS_VERSION }}
67+
4368
- name: Run pytest
4469
run: make test
4570
env:
@@ -69,13 +94,41 @@ jobs:
6994
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
7095
TWINE_REPOSITORY_URL: ${{ secrets.PRIVATE_PYPI_URL }}
7196

97+
vulnerabilities:
98+
name: Vulnerabilities
99+
needs: [ nightly_test ]
100+
runs-on: ubuntu-latest
101+
102+
steps:
103+
104+
- name: PyAnsys Vulnerability check (on main)
105+
if: github.ref == 'refs/heads/main'
106+
uses: ansys/actions/[email protected]
107+
with:
108+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
109+
python-package-name: ${{ env.PACKAGE_NAME }}
110+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
111+
run-bandit: false
112+
hide-log: false
113+
114+
- name: PyAnsys Vulnerability check (on dev)
115+
if: github.ref != 'refs/heads/main'
116+
uses: ansys/actions/[email protected]
117+
with:
118+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
119+
python-package-name: ${{ env.PACKAGE_NAME }}
120+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
121+
run-bandit: false
122+
dev-mode: true
123+
hide-log: false
124+
72125
ci-failure:
73126
name: Teams notify on failure
74127
if: failure()
75-
needs: [ nightly_and_upload ]
128+
needs: [ nightly_and_upload, vulnerabilities ]
76129
runs-on: ubuntu-latest
77130
steps:
78-
- uses: actions/checkout@v4
131+
- uses: actions/checkout@v5
79132
- name: Microsoft Teams Notification
80133
uses: jdcargile/[email protected]
81134
with:

.github/workflows/scan_sbom.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Security Scan
2+
3+
env:
4+
MAIN_PYTHON_VERSION: '3.12'
5+
PACKAGE_NAME: 'ansys-dynamicreporting-core'
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- maint/*
12+
- release/*
13+
14+
jobs:
15+
16+
sbom:
17+
name: Generate SBOM
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
29+
30+
- name: Build wheelhouse
31+
uses: ansys/actions/build-wheelhouse@v10
32+
with:
33+
library-name: ${{ env.PACKAGE_NAME }}
34+
operating-system: ubuntu-latest
35+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
36+
37+
- name: Install from wheelhouse
38+
run: python -m pip install --no-index --find-links=wheelhouse ${{ env.PACKAGE_NAME }}
39+
40+
- name: Generate SBOM with Syft
41+
uses: anchore/[email protected]
42+
with:
43+
format: cyclonedx-json
44+
output-file: sbom.cyclonedx.json
45+
upload-artifact: false
46+
47+
- name: Upload SBOM as artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ${{ env.PACKAGE_NAME }}-sbom
51+
path: sbom.cyclonedx.json
52+
53+
54+
vulnerabilities:
55+
name: Vulnerabilities
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
60+
- name: PyAnsys Vulnerability check (on main)
61+
if: github.ref == 'refs/heads/main'
62+
uses: ansys/actions/[email protected]
63+
with:
64+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
65+
python-package-name: ${{ env.PACKAGE_NAME }}
66+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
67+
run-bandit: false
68+
hide-log: false
69+
70+
- name: PyAnsys Vulnerability check (on dev)
71+
if: github.ref != 'refs/heads/main'
72+
uses: ansys/actions/[email protected]
73+
with:
74+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
75+
python-package-name: ${{ env.PACKAGE_NAME }}
76+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
77+
run-bandit: false
78+
dev-mode: true
79+
hide-log: false

MANIFEST.in

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
graft src
2+
graft codegen
3+
include AUTHORS
4+
include CHANGELOG.rst
5+
include CONTRIBUTING.rst
6+
include CONTRIBUTORS.md
7+
include LICENSE
8+
include pyproject.toml
9+
include README.rst
10+
include setup.py
11+
12+
prune .ci
13+
prune .github
14+
prune .venv
15+
prune default_templates
16+
prune doc
17+
prune tests
18+
prune *.egg-info
19+
20+
exclude .flake8
21+
exclude .gitignore
22+
exclude .pre-commit-config.yaml
23+
exclude codecov.yml
24+
exclude Makefile
25+
exclude test_cleanup.py
26+
exclude uv.lock
27+
exclude PKG-INFO
28+
29+
global-exclude *.py[cod]
30+
global-exclude __pycache__/**

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ To reach the project support team, email `[email protected] <pyansys.core@a
6666

6767
Installation
6868
------------
69-
The ``pydynamicreporting`` package supports Python 3.10 through 3.13 on
69+
The ``pydynamicreporting`` package supports Python 3.10 through 3.12 on
7070
Windows and Linux. It is currently available on the PyPi
7171
`repository <https://pypi.org/project/ansys-dynamicreporting-core/>`_.
7272

codecov.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
coverage:
2+
precision: 2
3+
round: down
4+
range: "70...100"
5+
26
status:
7+
patch: off
38
project:
49
default:
5-
informational: true
6-
patch:
7-
default:
8-
informational: true
10+
target: 80%
11+
threshold: 0%

codegen/adr_utils.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def in_ipynb():
4141
return True
4242
if "terminal" in ipy_str:
4343
return False
44-
except Exception: # todo: please specify the possible exceptions here.
44+
except Exception as e: # todo: please specify the possible exceptions here.
4545
return False
4646

4747

doc/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
"json_url": f"https://{cname}/versions.json",
6969
"version_match": switcher_version,
7070
},
71-
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
7271
"github_url": "https://github.com/ansys/pydynamicreporting/",
7372
"show_prev_next": False,
7473
"show_breadcrumbs": True,

0 commit comments

Comments
 (0)