Skip to content

Commit 01318dc

Browse files
committed
Merge branch 'main' into release/0.2
2 parents 8989008 + 79fc47c commit 01318dc

35 files changed

+1004
-202
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
- "dependencies"
1010
ignore:
1111
- dependency-name: "grpcio"
12-
assignees:
12+
assignees:
1313
- "pyansys-ci-bot"
1414

1515
- package-ecosystem: "github-actions"
@@ -18,5 +18,5 @@ updates:
1818
interval: "daily"
1919
labels:
2020
- "maintenance"
21-
assignees:
21+
assignees:
2222
- "pyansys-ci-bot"

.github/workflows/build_docker_image.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
build-windows:
3535
name: Building Geometry Service - Windows
36-
runs-on: [self-hosted, pygeometry-ci-1]
36+
runs-on: [self-hosted, pygeometry]
3737
steps:
3838
- name: Checkout repository
3939
uses: actions/checkout@v3
@@ -56,6 +56,11 @@ jobs:
5656
run: |
5757
docker build -f Dockerfile.windows -t ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }} .
5858
59+
- name: Check location of self-hosted runner and define license server accordingly
60+
if: runner.name == 'pygeometry-ci-1'
61+
run:
62+
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
63+
5964
- name: Launch Geometry service
6065
run: |
6166
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}

.github/workflows/ci_cd.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ jobs:
5353
fail-fast: false
5454
matrix:
5555
os: [ubuntu-latest, windows-latest, macos-latest]
56-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
57-
should-release:
56+
python-version: ['3.8', '3.9', '3.10', '3.11']
57+
should-release:
5858
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
5959
exclude:
6060
- should-release: false
@@ -110,25 +110,17 @@ jobs:
110110
- name: Download Geometry service container (if needed)
111111
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
112112

113-
- name: Check runner type
113+
- name: Check location of self-hosted runner and define license server accordingly
114114
if: runner.name == 'pygeometry-ci-1'
115-
env:
116-
INTERNAL_DOCKER_EXTRA_ENVS: ${{ secrets.INTERNAL_DOCKER_EXTRA_ENVS }}
117-
run: |
118-
$env:INTERNAL_DOCKER_EXTRA_ENVS | Out-File -FilePath env.list -Encoding UTF8
119-
120-
- name: Check runner type (not needed)
121-
if: runner.name != 'pygeometry-ci-1'
122-
run: |
123-
echo "" | Out-File -FilePath env.list -Encoding UTF8
115+
run:
116+
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
124117

125118
- name: Start Geometry service and verify start
126119
run: |
127120
.\.venv\Scripts\Activate.ps1
128-
$env:ANSRV_GEO_PORT_MAP = $env:ANSRV_GEO_PORT + ":50051"
129-
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER --env-file .\env.list -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
121+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
130122
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
131-
123+
132124
- name: Restore images cache
133125
uses: actions/cache@v3
134126
with:
@@ -212,23 +204,15 @@ jobs:
212204
- name: Download Geometry service container (if needed)
213205
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
214206

215-
- name: Check runner type
207+
- name: Check location of self-hosted runner and define license server accordingly
216208
if: runner.name == 'pygeometry-ci-1'
217-
env:
218-
INTERNAL_DOCKER_EXTRA_ENVS: ${{ secrets.INTERNAL_DOCKER_EXTRA_ENVS }}
219-
run: |
220-
$env:INTERNAL_DOCKER_EXTRA_ENVS | Out-File -FilePath env.list -Encoding UTF8
221-
222-
- name: Check runner type (not needed)
223-
if: runner.name != 'pygeometry-ci-1'
224-
run: |
225-
echo "" | Out-File -FilePath env.list -Encoding UTF8
209+
run:
210+
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
226211

227212
- name: Start Geometry service and verify start
228213
run: |
229214
.\.venv\Scripts\Activate.ps1
230-
$env:ANSRV_GEO_PORT_MAP = $env:ANSRV_GEO_PORT + ":50051"
231-
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER --env-file .\env.list -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
215+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
232216
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
233217
234218
- name: Build the documentation (HTML)
@@ -344,7 +328,7 @@ jobs:
344328
name: Fetch release artifacts
345329
needs: [testing-windows, testing-linux, docs]
346330
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
347-
runs-on:
331+
runs-on:
348332
group: ansys-internal
349333
labels: [self-hosted, Windows, signtool]
350334

@@ -353,7 +337,7 @@ jobs:
353337
run: |
354338
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/DockerWindows.zip --output windows-binaries.zip
355339
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/DockerLinux.zip --output linux-binaries.zip
356-
340+
357341
- name: Upload Windows binaries as workflow artifacts
358342
uses: actions/upload-artifact@v3
359343
with:

.github/workflows/label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
# Label based on branch name
4141
- uses: actions-ecosystem/action-add-labels@v1
4242
if: |
43-
startsWith(github.event.pull_request.head.ref, 'doc') ||
43+
startsWith(github.event.pull_request.head.ref, 'doc') ||
4444
startsWith(github.event.pull_request.head.ref, 'docs')
4545
with:
4646
labels: documentation
@@ -70,7 +70,7 @@ jobs:
7070
runs-on: ubuntu-latest
7171
steps:
7272
- name: Suggest to add labels
73-
uses: peter-evans/create-or-update-comment@v2
73+
uses: peter-evans/create-or-update-comment@v3
7474
# Execute only when no labels have been applied to the pull request
7575
if: toJSON(github.event.pull_request.labels.*.name) == '{}'
7676
with:

.github/workflows/nightly_docker_test.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,15 @@ jobs:
5858
docker image rm $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
5959
docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
6060
61-
- name: Check runner type
61+
- name: Check location of self-hosted runner and define license server accordingly
6262
if: runner.name == 'pygeometry-ci-1'
63-
env:
64-
INTERNAL_DOCKER_EXTRA_ENVS: ${{ secrets.INTERNAL_DOCKER_EXTRA_ENVS }}
65-
run: |
66-
$env:INTERNAL_DOCKER_EXTRA_ENVS | Out-File -FilePath env.list -Encoding UTF8
67-
- name: Check runner type (not needed)
68-
if: runner.name != 'pygeometry-ci-1'
69-
run: |
70-
echo "" | Out-File -FilePath env.list -Encoding UTF8
63+
run:
64+
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
7165

7266
- name: Start Geometry service and verify start
7367
run: |
7468
.\.venv\Scripts\Activate.ps1
75-
$env:ANSRV_GEO_PORT_MAP = $env:ANSRV_GEO_PORT + ":50051"
76-
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER --env-file .\env.list -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
69+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }} python -c "from ansys.geometry.core.connection.validate import validate; validate()"
7770
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
7871
7972
- name: Run PyGeometry tests

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
repos:
22

33
- repo: https://github.com/psf/black
4-
rev: 23.1.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
4+
rev: 23.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
55
hooks:
66
- id: black
77

88
- repo: https://github.com/adamchainz/blacken-docs
99
rev: 1.13.0
1010
hooks:
1111
- id: blacken-docs
12-
additional_dependencies: [black==23.1.0]
12+
additional_dependencies: [black==23.3.0]
1313

1414
- repo: https://github.com/pycqa/isort
1515
rev: 5.12.0
@@ -40,6 +40,8 @@ repos:
4040
hooks:
4141
- id: check-merge-conflict
4242
- id: debug-statements
43+
- id: check-yaml
44+
- id: trailing-whitespace
4345

4446
# this validates our github workflow files
4547
- repo: https://github.com/python-jsonschema/check-jsonschema

README.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ Installing PyGeometry in developer mode allows
179179
you to modify the source and enhance it.
180180

181181
.. note::
182-
182+
183183
Before contributing to the project, ensure that you are thoroughly familiar
184184
with the `PyAnsys Developer's Guide`_.
185-
185+
186186
To install PyGeometry in developer mode, perform these steps:
187187

188188
#. Clone the ``pygeometry`` repository:
@@ -222,7 +222,7 @@ To install PyGeometry in developer mode, perform these steps:
222222
#. Install the project in editable mode:
223223

224224
.. code:: bash
225-
225+
226226
# Install the minimum requirements
227227
python -m pip install -e .
228228
@@ -244,14 +244,14 @@ archive from the `Releases Page <https://github.com/pyansys/pygeometry/releases>
244244
corresponding machine architecture.
245245

246246
Each wheelhouse archive contains all the Python wheels necessary to install PyGeometry from scratch on Windows,
247-
Linux, and MacOS from Python 3.7 to 3.11. You can install this on an isolated system with a fresh Python
247+
Linux, and MacOS from Python 3.8 to 3.11. You can install this on an isolated system with a fresh Python
248248
installation or on a virtual environment.
249249

250-
For example, on Linux with Python 3.7, unzip the wheelhouse archive and install it with:
250+
For example, on Linux with Python 3.8, unzip the wheelhouse archive and install it with:
251251

252252
.. code:: bash
253253
254-
unzip ansys-geometry-core-v0.2.3-wheelhouse-Linux-3.7.zip wheelhouse
254+
unzip ansys-geometry-core-v0.2.3-wheelhouse-Linux-3.8.zip wheelhouse
255255
pip install ansys-geometry-core -f wheelhouse --no-index --upgrade --ignore-installed
256256
257257
If you're on Windows with Python 3.9, unzip to a wheelhouse directory and install using the preceding command.
@@ -263,7 +263,7 @@ Testing
263263

264264
This project takes advantage of `tox`_. This tool automate common
265265
development tasks (similar to Makefile), but it is oriented towards Python
266-
development.
266+
development.
267267

268268
Using ``tox``
269269
^^^^^^^^^^^^^
@@ -279,7 +279,7 @@ The following environments commands are provided:
279279
- **tox -e py-coverage**: Checks for unit testing and code coverage.
280280
- **tox -e doc**: Checks for documentation building process.
281281

282-
.. admonition:: pyvista-pytest plugin
282+
.. admonition:: pyvista-pytest plugin
283283

284284
This plugin facilitates the comparison of the images produced in PyGeometry for testing the plots.
285285
If you are changing the images, use flag ``--reset_image_cache`` which is not recommended except
@@ -331,7 +331,7 @@ the building requirements and then executing the build module:
331331

332332
.. code:: bash
333333
334-
python -m pip install -U pip
334+
python -m pip install -U pip
335335
python -m build
336336
python -m twine check dist/*
337337

doc/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ goto end
3636
goto build-examples-py
3737

3838
:clean
39-
rmdir /s /q %BUILDDIR% > /NUL 2>&1
39+
rmdir /s /q %BUILDDIR% > /NUL 2>&1
4040
for /d /r %SOURCEDIR% %%d in (_autosummary) do @if exist "%%d" rmdir /s /q "%%d"
4141
goto end
4242

Loading

doc/source/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Overall guidance on contributing to a PyAnsys library appears in the
66
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
77
with it and all `How-to <https://dev.docs.pyansys.com/how-to/index.html>`_ pages
88
before attempting to contribute to PyGeometry.
9-
9+
1010
The following contribution information is specific to PyGeometry.
1111

1212
Clone the repository

0 commit comments

Comments
 (0)