Skip to content

Commit 9f8474c

Browse files
committed
Merge branch 'master' into mhanmer/operator_doc_template
2 parents 568a46b + a538455 commit 9f8474c

File tree

376 files changed

+19605
-4811
lines changed

Some content is hidden

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

376 files changed

+19605
-4811
lines changed

.ci/build_wheel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
# Input can be one of ["any", "win", "manylinux1", "manylinux_2_17"]
33

44
import argparse
5-
import subprocess
6-
from pathlib import Path
75
import os
8-
import sys
6+
from pathlib import Path
97
import shutil
8+
import subprocess
9+
import sys
1010
import tempfile
1111

12-
1312
supported_platforms = {
1413
"any": "any",
1514
"win": "win_amd64",

.ci/code_generation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# import subprocess
22

3-
from ansys.dpf import core
4-
from ansys.dpf.core.operators import build
5-
import os
63
import glob
4+
import os
75
from pathlib import Path
86
import shutil
97

8+
from ansys.dpf import core
9+
from ansys.dpf.core.operators import build
1010

1111
local_dir = Path(__file__).parent
1212
TARGET_PATH = local_dir.parent / "src" / "ansys" / "dpf" / "core" / "operators"

.ci/run_examples.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import os
21
import glob
2+
import os
33
from pathlib import Path
44
import subprocess
55
import sys
66

77
import ansys.dpf.core as dpf
88
from ansys.dpf.core.examples import get_example_required_minimum_dpf_version
99

10-
1110
os.environ["PYVISTA_OFF_SCREEN"] = "true"
1211
os.environ["MPLBACKEND"] = "Agg"
1312

.ci/run_non_regression_examples.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import os
21
import glob
3-
from ansys.dpf import core
2+
import os
43
import pathlib
54
import subprocess
65
import sys
76

7+
from ansys.dpf import core
8+
89
os.environ["PYVISTA_OFF_SCREEN"] = "true"
910
os.environ["MPLBACKEND"] = "Agg"
1011

.ci/update_dpf_dependencies.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists.
1414
"""
1515

16-
import os
1716
import glob
17+
import os
1818
from pathlib import Path
1919
import platform
2020
import shutil
2121
import zipfile
2222

23-
2423
grpc_path_key = "DPFDV_ROOT"
2524
gate_path_key = "ANSYSDPFPYGATE_ROOT"
2625
core_path = Path(__file__).parent.parent

.github/workflows/ci_release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
standalone_branch_suffix:
1616
description: 'Suffix of the branch on standalone'
1717
required: false
18-
default: '.pre0'
18+
default: ''
1919

2020
#┌───────────── minute (0 - 59)
2121
#│ ┌───────────── hour (0 - 23)
@@ -80,7 +80,7 @@ jobs:
8080
python_versions: '["3.9"]'
8181
wheel: true
8282
wheelhouse: true
83-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
83+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
8484
secrets: inherit
8585

8686
tests:
@@ -91,7 +91,7 @@ jobs:
9191
DOCSTRING: false
9292
wheel: false
9393
wheelhouse: true
94-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
94+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
9595
secrets: inherit
9696

9797
tests_any_3_9:
@@ -101,7 +101,7 @@ jobs:
101101
python_versions: '["3.9"]'
102102
wheel: true
103103
wheelhouse: false
104-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
104+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
105105
test_any: true
106106
secrets: inherit
107107

@@ -113,15 +113,15 @@ jobs:
113113
DOCSTRING: false
114114
wheel: false
115115
wheelhouse: false
116-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
116+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
117117
test_any: true
118118
secrets: inherit
119119

120120
docs:
121121
uses: ./.github/workflows/docs.yml
122122
with:
123123
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
124-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
124+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
125125
event_name: ${{ github.event_name }}
126126
secrets: inherit
127127

@@ -130,7 +130,7 @@ jobs:
130130
with:
131131
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
132132
python_versions: '["3.9", "3.10", "3.11"]'
133-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
133+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
134134
secrets: inherit
135135

136136
retro_242:
@@ -184,7 +184,7 @@ jobs:
184184
uses: ./.github/workflows/pydpf-post.yml
185185
with:
186186
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
187-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
187+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
188188
test_docstrings: "true"
189189
secrets: inherit
190190

@@ -228,7 +228,7 @@ jobs:
228228
uses: ./.github/workflows/test_docker.yml
229229
with:
230230
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
231-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
231+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
232232
secrets: inherit
233233

234234
docker_examples:
@@ -237,7 +237,7 @@ jobs:
237237
with:
238238
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
239239
python_versions: '["3.9", "3.10", "3.11"]'
240-
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
240+
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
241241
secrets: inherit
242242

243243
draft_release:

.github/workflows/docs.yml

Lines changed: 6 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -73,34 +73,16 @@ jobs:
7373
with:
7474
python-version: ${{ inputs.python_version }}
7575

76-
- name: "Create virtual environment in the current workspace"
77-
shell: pwsh
78-
run: python -m venv .venv --system-site-packages
79-
80-
- name: "Update PATH for virtual environment"
81-
run: |
82-
echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH
83-
84-
- name: "Update pip to the latest version"
76+
- name: "Update pip to the latest version and install tox"
8577
shell: pwsh
8678
run: |
8779
python -m pip install -U pip
88-
89-
- name: "Install requirements"
90-
shell: pwsh
91-
run: |
92-
python -m pip install -r requirements/requirements_build.txt
80+
python -m pip install tox tox-uv
9381
9482
- name: "Build the wheel"
9583
shell: pwsh
9684
run: |
97-
$os = "${{ matrix.os }}"
98-
if ($os -eq "ubuntu-latest") {
99-
$platform = "manylinux_2_17"
100-
} else {
101-
$platform = "win"
102-
}
103-
python .ci/build_wheel.py -p $platform -w
85+
tox -e build-wheel
10486
10587
- name: "Expose the wheel"
10688
shell: bash
@@ -111,11 +93,6 @@ jobs:
11193
echo ${name}
11294
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT
11395
114-
- name: "Install package wheel"
115-
shell: pwsh
116-
run: |
117-
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting]
118-
11996
- name: "Install DPF"
12097
id: set-server-path
12198
uses: ansys/pydpf-actions/[email protected]
@@ -128,9 +105,9 @@ jobs:
128105
uses: ansys/pydpf-actions/[email protected]
129106

130107
- name: "Test import"
131-
shell: pwsh
132-
working-directory: tests
108+
shell: bash
133109
run: |
110+
python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}
134111
python -c "from ansys.dpf import core"
135112
136113
- name: "Setup headless display"
@@ -143,53 +120,10 @@ jobs:
143120
run: |
144121
choco install pandoc
145122
146-
- name: "Install documentation packages for Python"
147-
shell: pwsh
148-
run: |
149-
python -m pip install -r requirements/requirements_docs.txt
150-
151-
- name: "Kill all servers"
152-
uses: ansys/pydpf-actions/[email protected]
153-
154-
- name: "Ensure VTK compatibility"
155-
shell: pwsh
156-
run: |
157-
python -m pip uninstall --yes vtk
158-
python -m pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==${{ env.VTK_OSMESA_VERSION }}
159-
160-
- name: "List installed packages"
161-
shell: pwsh
162-
run: |
163-
python -m pip list
164-
165123
- name: "Build HTML Documentation"
166-
shell: cmd /D /E:ON /V:OFF /C "CALL "{0}""
167-
working-directory: .ci
168-
run: |
169-
build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1
170-
timeout-minutes: 60
171-
env:
172-
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
173-
174-
- name: "Check for success"
175124
shell: bash
176-
working-directory: doc
177125
run: |
178-
case `grep -F "build succeeded" log.txt >/dev/null; echo $?` in
179-
0)
180-
echo "Build succeeded!"
181-
exit 0;;
182-
1)
183-
echo "Documentation generation failed, please check previous step!"
184-
exit 1;;
185-
*)
186-
echo "An error occurred while checking success of the previous step!"
187-
exit 1;;
188-
esac
189-
190-
- name: "Kill all servers"
191-
uses: ansys/pydpf-actions/[email protected]
192-
if: always()
126+
tox -e doc-html --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:doc-html.setenv+='VIRTUALENV_SYSTEM_SITE_PACKAGES=true'
193127
194128
- name: "Retrieve package version"
195129
shell: bash

0 commit comments

Comments
 (0)