Skip to content

Commit 6a9d9f4

Browse files
Merge branch 'doc/documentation-adjustments-new-layout' of https://github.com/ansys/pydpf-core into doc/documentation-adjustments-new-layout
2 parents 33fade6 + 610a834 commit 6a9d9f4

File tree

289 files changed

+7186
-691
lines changed

Some content is hidden

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

289 files changed

+7186
-691
lines changed

.ci/update_dpf_dependencies.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Script to update ansys-dpf-gate, ansys-dpf-gatebin and ansys-grpc-dpf based on repositories
1+
"""Script to update ansys.dpf.gate.generated, ansys.dpf.gatebin and ansys.grpc.dpf.
22
33
This script should only be used to quickly test changes to any of these dependencies.
44
Actual commit of updated code should not occur.
@@ -12,6 +12,7 @@
1212
It will update the current repo
1313
or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists.
1414
"""
15+
1516
import os
1617
import glob
1718
import pathlib
@@ -45,24 +46,32 @@
4546
file,
4647
path=destination,
4748
)
48-
print("Done updating ansys-grpc-dpf")
49+
print("Done updating ansys.grpc.dpf")
4950
else:
5051
print(f"{grpc_path_key} environment variable is not defined. " "Cannot update ansys-grpc-dpf.")
5152

5253
if gate_path is not None:
5354
# Update ansys-dpf-gate
54-
print("Updating ansys.dpf.gate")
55-
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys")
55+
print("Updating ansys.dpf.gate generated code")
56+
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys", "dpf", "gate", "generated")
5657
print(f"from {dist_path}")
57-
destination = os.path.join(core_path, "src", "ansys")
58+
destination = os.path.join(core_path, "src", "ansys", "dpf", "gate", "generated")
5859
print(f"into {destination}")
5960
shutil.copytree(
6061
src=dist_path,
6162
dst=destination,
6263
dirs_exist_ok=True,
6364
ignore=lambda directory, contents: ["__pycache__"] if directory[-5:] == "gate" else [],
6465
)
65-
print("Done updating ansys-dpf-gate")
66+
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys", "dpf", "gate", "__init__.py")
67+
print(f"from {dist_path}")
68+
destination = os.path.join(core_path, "src", "ansys", "dpf", "gate", "__init__.py")
69+
print(f"into {destination}")
70+
shutil.copy(
71+
src=dist_path,
72+
dst=destination,
73+
)
74+
print("Done updating ansys.dpf.gate generated code")
6675

6776
# Update ansys-dpf-gatebin
6877
print("Updating ansys.dpf.gatebin")
@@ -75,9 +84,9 @@
7584
dst=destination,
7685
dirs_exist_ok=True,
7786
)
78-
print(f"Done updating ansys-dpf-gatebin for {platform.system()}")
87+
print(f"Done updating ansys.dpf.gatebin for {platform.system()}")
7988
else:
8089
print(
8190
f"{gate_path_key} environment variable is not defined. "
82-
"Cannot update ansys-dpf-gate or ansys-dpf-gatebin."
91+
"Cannot update ansys.dpf.gate or ansys.dpf.gatebin."
8392
)

.flake8

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

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
name: "Style Check"
7474
runs-on: ubuntu-latest
7575
steps:
76-
- uses: ansys/actions/code-style@v6
76+
- uses: ansys/actions/code-style@v7
7777
with:
7878
use-python-cache: false
7979

@@ -161,7 +161,7 @@ jobs:
161161
needs: [docs]
162162
steps:
163163
- name: "Upload development documentation"
164-
uses: ansys/actions/doc-deploy-dev@v4
164+
uses: ansys/actions/doc-deploy-dev@v7
165165
with:
166166
cname: ${{ env.DOCUMENTATION_CNAME }}
167167
token: ${{ secrets.GITHUB_TOKEN }}
@@ -174,7 +174,7 @@ jobs:
174174
needs: upload-development-docs
175175
steps:
176176
- name: "Deploy the latest documentation index"
177-
uses: ansys/actions/doc-deploy-index@v4
177+
uses: ansys/actions/doc-deploy-index@v7
178178
with:
179179
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
180180
index-name: pydpf-core-vdev

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: "Running documentation style checks"
54-
uses: ansys/actions/doc-style@v5.0
54+
uses: ansys/actions/doc-style@v7
5555
with:
5656
token: ${{ secrets.GITHUB_TOKEN }}
5757

.github/workflows/releaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
path: HTML-doc-ansys-dpf-core.zip
9090

9191
- name: "Deploy the stable documentation"
92-
uses: ansys/actions/doc-deploy-stable@v5
92+
uses: ansys/actions/doc-deploy-stable@v7
9393
with:
9494
cname: ${{ env.DOCUMENTATION_CNAME }}
9595
token: ${{ secrets.GITHUB_TOKEN }}
@@ -121,7 +121,7 @@ jobs:
121121
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
122122
123123
- name: "Deploy the latest documentation index"
124-
uses: ansys/actions/doc-deploy-index@v5
124+
uses: ansys/actions/doc-deploy-index@v7
125125
with:
126126
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
127127
index-name: pydpf-core-v${{ env.VERSION_MEILI }}

.github/workflows/test_docker.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,15 @@ jobs:
195195
command: |
196196
pytest $DEBUG $COVERAGE $RERUNS --junitxml=tests/junit/test-results9.xml test_service/.
197197
198+
- name: "Test Operators"
199+
uses: nick-fields/retry@v2
200+
with:
201+
timeout_minutes: 3
202+
max_attempts: 2
203+
shell: bash
204+
command: |
205+
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results12.xml tests/operators/.
206+
198207
# - name: "Test API Entry"
199208
# shell: bash
200209
# working-directory: tests

.github/workflows/tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,18 @@ jobs:
348348
- name: "Kill all servers"
349349
uses: ansys/pydpf-actions/[email protected]
350350

351+
- name: "Test Operators"
352+
uses: nick-fields/retry@v2
353+
with:
354+
timeout_minutes: 2
355+
max_attempts: 2
356+
shell: bash
357+
command: |
358+
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results12.xml tests/operators/.
359+
360+
- name: "Kill all servers"
361+
uses: ansys/pydpf-actions/[email protected]
362+
351363
- name: "Upload Test Results"
352364
uses: actions/upload-artifact@v4
353365
with:

.github/workflows/update_operators.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ jobs:
6666
run: |
6767
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gate-*" -type f)
6868
echo $wheel_file
69-
rm -r src/ansys/dpf/gate
70-
unzip -o $wheel_file "ansys/**/*" -d src/
69+
rm -r src/ansys/dpf/gate/generated
70+
unzip -o $wheel_file "ansys/dpf/gate/generated/*" -d src/
71+
unzip -o $wheel_file "ansys/dpf/gate/__init__.py" -d src/
7172
chmod -R 777 src/ansys/dpf/gate
7273
git add -f src/ansys/dpf/gate
7374

.pre-commit-config.yaml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
1-
exclude: |
2-
(?x)^(
3-
doc/source/|
4-
src/ansys/dpf/core/operators/|
5-
examples_notebooks/|
6-
src/ansys/dpf/core/__init__.py|
7-
doc/styles/|
8-
src/ansys/dpf/gate/|
9-
src/ansys/dpf/gatebin/|
10-
src/ansys/grpc/dpf/|
11-
)
1+
exclude: >
2+
(?x)^(
3+
doc/source/
4+
|src/ansys/dpf/core/operators/
5+
|examples_notebooks/
6+
|src/ansys/dpf/core/__init__.py
7+
|doc/styles/
8+
|src/ansys/dpf/gate/
9+
|src/ansys/dpf/gatebin/
10+
|src/ansys/grpc/dpf/
11+
)
1212
repos:
1313

14-
- repo: https://github.com/psf/black
15-
rev: 24.4.2
14+
- repo: https://github.com/charliermarsh/ruff-pre-commit
15+
rev: v0.6.3
1616
hooks:
17-
- id: black
18-
19-
- repo: https://github.com/PyCQA/flake8
20-
rev: 7.0.0
21-
hooks:
22-
- id: flake8
17+
- id: ruff
18+
args: [ --fix ]
19+
- id: ruff-format
2320

2421
- repo: https://github.com/codespell-project/codespell
2522
rev: v2.3.0
2623
hooks:
2724
- id: codespell
28-
args: ["--ignore-words=ignore_words.txt"]
25+
args: ["--ignore-words=./doc/styles/config/vocabularies/ANSYS/accept.txt"]
2926

3027
- repo: https://github.com/pre-commit/pre-commit-hooks
3128
rev: v4.6.0
@@ -34,8 +31,15 @@ repos:
3431
- id: debug-statements
3532
- id: requirements-txt-fixer
3633

34+
- repo: https://github.com/ansys/pre-commit-hooks
35+
rev: v0.4.3
36+
hooks:
37+
- id: add-license-headers
38+
args:
39+
- --start_year=2020
40+
3741
# this validates our github workflow files
3842
- repo: https://github.com/python-jsonschema/check-jsonschema
39-
rev: 0.28.5
43+
rev: 0.29.2
4044
hooks:
41-
- id: check-github-workflows
45+
- id: check-github-workflows

LICENSE

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
MIT License
22

3-
Copyright (c) 2024 ANSYS, Inc. All rights reserved.
3+
Copyright (c) 2020 - 2024 ANSYS, Inc. and/or its affiliates.
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9+
of the Software, and to permit persons to whom the Software is furnished to do
10+
so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in
13-
all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)