Skip to content

Commit 2abd8c1

Browse files
committed
Merge branch 'main' into release/0.2
2 parents b412a17 + 23d11a0 commit 2abd8c1

Some content is hidden

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

96 files changed

+2018
-754
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ updates:
1111
- dependency-name: "grpcio"
1212
assignees:
1313
- "pyansys-ci-bot"
14+
commit-message:
15+
prefix: "MAINT"
1416

1517
- package-ecosystem: "github-actions"
1618
directory: "/"
@@ -20,3 +22,5 @@ updates:
2022
- "maintenance"
2123
assignees:
2224
- "pyansys-ci-bot"
25+
commit-message:
26+
prefix: "MAINT"

.github/workflows/ci_cd.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ env:
1313
PACKAGE_NAME: 'ansys-geometry-core'
1414
PACKAGE_NAMESPACE: 'ansys.geometry.core'
1515
DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com'
16-
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/pyansys/geometry:windows-latest
17-
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/pyansys/geometry:linux-latest
16+
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
17+
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/ansys/geometry:windows-latest
1818
ANSRV_GEO_PORT: 700
1919
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
2020
GEO_CONT_NAME: ans_geo
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: PyAnsys code style checks
35-
uses: pyansys/actions/code-style@v4
35+
uses: ansys/actions/code-style@v4
3636
with:
3737
python-version: ${{ env.MAIN_PYTHON_VERSION }}
3838

@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- name: PyAnsys documentation style checks
44-
uses: pyansys/actions/doc-style@v4
44+
uses: ansys/actions/doc-style@v4
4545
with:
4646
token: ${{ secrets.GITHUB_TOKEN }}
4747

@@ -61,7 +61,7 @@ jobs:
6161
os: macos-latest
6262
steps:
6363
- name: Build wheelhouse and perform smoke test
64-
uses: pyansys/actions/build-wheelhouse@v4
64+
uses: ansys/actions/build-wheelhouse@v4
6565
with:
6666
library-name: ${{ env.PACKAGE_NAME }}
6767
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
@@ -76,6 +76,15 @@ jobs:
7676
name: Testing and coverage (Windows)
7777
needs: [smoke-tests]
7878
runs-on: [self-hosted, pygeometry]
79+
continue-on-error: ${{ matrix.experimental }}
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
include:
84+
- docker-image: "windows-latest"
85+
experimental: false
86+
- docker-image: "windows-latest-unstable"
87+
experimental: true
7988

8089
steps:
8190
- uses: actions/checkout@v3
@@ -108,7 +117,7 @@ jobs:
108117
password: ${{ secrets.GITHUB_TOKEN }}
109118

110119
- name: Download Geometry service container (if needed)
111-
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
120+
run: docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}
112121

113122
- name: Check location of self-hosted runner and define license server accordingly
114123
if: runner.name == 'pygeometry-ci-1'
@@ -118,7 +127,7 @@ jobs:
118127
- name: Start Geometry service and verify start
119128
run: |
120129
.\.venv\Scripts\Activate.ps1
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 }}
130+
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 }}:${{ matrix.docker-image }}
122131
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
123132
124133
- name: Restore images cache
@@ -256,6 +265,15 @@ jobs:
256265
name: Testing and coverage (Linux)
257266
needs: [smoke-tests]
258267
runs-on: ubuntu-latest
268+
continue-on-error: ${{ matrix.experimental }}
269+
strategy:
270+
fail-fast: false
271+
matrix:
272+
include:
273+
- docker-image: "linux-latest"
274+
experimental: false
275+
- docker-image: "linux-latest-unstable"
276+
experimental: true
259277

260278
steps:
261279
- name: Login in Github Container registry
@@ -267,8 +285,8 @@ jobs:
267285

268286
- name: Pull and launch geometry service
269287
run: |
270-
docker pull ${{ env.ANSRV_GEO_IMAGE_LINUX_TAG }}
271-
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_LINUX_TAG }}
288+
docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}
289+
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 }}:${{ matrix.docker-image }}
272290
273291
- name: Checkout repository
274292
uses: actions/checkout@v3
@@ -281,7 +299,7 @@ jobs:
281299
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
282300

283301
- name: Run pytest
284-
uses: pyansys/actions/tests-pytest@v4
302+
uses: ansys/actions/tests-pytest@v4
285303
env:
286304
ALLOW_PLOTTING: true
287305
with:
@@ -319,7 +337,7 @@ jobs:
319337
runs-on: ubuntu-latest
320338
steps:
321339
- name: Build library source and wheel artifacts
322-
uses: pyansys/actions/build-library@v4
340+
uses: ansys/actions/build-library@v4
323341
with:
324342
library-name: ${{ env.PACKAGE_NAME }}
325343
python-version: ${{ env.MAIN_PYTHON_VERSION }}
@@ -359,14 +377,14 @@ jobs:
359377
runs-on: ubuntu-latest
360378
steps:
361379
- name: Release to the private PyPI repository
362-
uses: pyansys/actions/release-pypi-private@v4
380+
uses: ansys/actions/release-pypi-private@v4
363381
with:
364382
library-name: ${{ env.PACKAGE_NAME }}
365383
twine-username: "__token__"
366384
twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
367385

368386
- name: Release to GitHub
369-
uses: pyansys/actions/release-github@v4
387+
uses: ansys/actions/release-github@v4
370388
with:
371389
library-name: ${{ env.PACKAGE_NAME }}
372390
additional-artifacts: windows-binaries.zip linux-binaries.zip
@@ -378,7 +396,7 @@ jobs:
378396
needs: [package]
379397
steps:
380398
- name: Deploy the latest documentation
381-
uses: pyansys/actions/doc-deploy-dev@v4
399+
uses: ansys/actions/doc-deploy-dev@v4
382400
with:
383401
cname: ${{ env.DOCUMENTATION_CNAME }}
384402
token: ${{ secrets.GITHUB_TOKEN }}
@@ -390,7 +408,7 @@ jobs:
390408
needs: [package]
391409
steps:
392410
- name: Deploy the stable documentation
393-
uses: pyansys/actions/doc-deploy-stable@v4
411+
uses: ansys/actions/doc-deploy-stable@v4
394412
with:
395413
cname: ${{ env.DOCUMENTATION_CNAME }}
396414
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_cleanup.yml renamed to .github/workflows/docker_cleanup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Geometry Service - Package cleanup
1+
name: Docker images - Cleanup
22
on:
33
workflow_dispatch:
44
schedule: # UTC at 0200
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323

2424
- name: "Perform versions cleanup - except certain tags"
25-
uses: pyansys/actions/hk-package-clean-except@v4
25+
uses: ansys/actions/hk-package-clean-except@v4
2626
with:
2727
package-name: 'geometry'
2828
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Docker images - Push stable
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
images:
6+
description: 'Generate image'
7+
required: true
8+
default: 'all'
9+
type: choice
10+
options:
11+
- windows-latest
12+
- linux-latest
13+
- all
14+
15+
ansyslab:
16+
description: 'Push to Ansys Lab'
17+
type: boolean
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
packages: write
25+
26+
jobs:
27+
windows:
28+
name: Publish Windows latest image
29+
runs-on: windows-latest
30+
if: inputs.images == 'all' || inputs.images == 'windows-latest'
31+
env:
32+
WINDOWS_UNSTABLE: ghcr.io/ansys/geometry:windows-latest-unstable
33+
WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:windows-latest
34+
WINDOWS_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:windows-latest
35+
steps:
36+
- name: Login in Github Container registry
37+
uses: docker/login-action@v2
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Pull Windows latest unstable container
44+
run: docker pull ${{ env.WINDOWS_UNSTABLE }}
45+
46+
- name: Tag container as latest (stable) for Github Container registry
47+
run: docker tag ${{ env.WINDOWS_UNSTABLE }} ${{ env.WINDOWS_STABLE_GHCR }}
48+
49+
- name: Publish latest stable container in ghcr.io
50+
run: docker push ${{ env.WINDOWS_STABLE_GHCR }}
51+
52+
- name: Login in AnsysLab registry
53+
if: ${{ inputs.ansyslab }}
54+
uses: docker/login-action@v2
55+
with:
56+
registry: azwepsifujiaksacr.azurecr.io
57+
username: ${{ secrets.FUJI_USER }}
58+
password: ${{ secrets.FUJI_TOKEN }}
59+
60+
- name: Tag container as latest (stable) for AnsysLab registry
61+
if: ${{ inputs.ansyslab }}
62+
run: docker tag ${{ env.WINDOWS_UNSTABLE }} ${{ env.WINDOWS_STABLE_FUJI }}
63+
64+
- name: Publish latest stable container in AnsysLab registry
65+
if: ${{ inputs.ansyslab }}
66+
run: docker push ${{ env.WINDOWS_STABLE_FUJI }}
67+
68+
linux:
69+
name: Publish Linux latest image
70+
runs-on: ubuntu-latest
71+
if: inputs.images == 'all' || inputs.images == 'linux-latest'
72+
env:
73+
LINUX_UNSTABLE: ghcr.io/ansys/geometry:linux-latest-unstable
74+
LINUX_STABLE_GHCR: ghcr.io/ansys/geometry:linux-latest
75+
LINUX_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:linux-latest
76+
steps:
77+
- name: Login in Github Container registry
78+
uses: docker/login-action@v2
79+
with:
80+
registry: ghcr.io
81+
username: ${{ github.actor }}
82+
password: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- name: Pull Linux latest unstable container
85+
run: docker pull ${{ env.LINUX_UNSTABLE }}
86+
87+
- name: Tag container as latest (stable) for Github Container registry
88+
run: docker tag ${{ env.LINUX_UNSTABLE }} ${{ env.LINUX_STABLE_GHCR }}
89+
90+
- name: Publish latest stable container in ghcr.io
91+
run: docker push ${{ env.LINUX_STABLE_GHCR }}
92+
93+
- name: Login in AnsysLab registry
94+
if: ${{ inputs.ansyslab }}
95+
uses: docker/login-action@v2
96+
with:
97+
registry: azwepsifujiaksacr.azurecr.io
98+
username: ${{ secrets.FUJI_USER }}
99+
password: ${{ secrets.FUJI_TOKEN }}
100+
101+
- name: Tag container as latest (stable) for AnsysLab registry
102+
if: ${{ inputs.ansyslab }}
103+
run: docker tag ${{ env.LINUX_UNSTABLE }} ${{ env.LINUX_STABLE_FUJI }}
104+
105+
- name: Publish latest stable container in AnsysLab registry
106+
if: ${{ inputs.ansyslab }}
107+
run: docker push ${{ env.LINUX_STABLE_FUJI }}

.github/workflows/build_docker_image.yml renamed to .github/workflows/docker_test_build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: Build Docker images
1+
name: Docker images - Test build
22
on:
33
workflow_dispatch:
44
pull_request:
55
paths:
66
- 'docker/**'
7-
- '.github/workflows/build_docker_image.yml'
7+
- '.github/workflows/docker_test_build.yml'
88
push:
99
branches:
1010
- main
1111
paths:
1212
- 'docker/**'
13-
- '.github/workflows/build_docker_image.yml'
13+
- '.github/workflows/docker_test_build.yml'
1414
release:
1515
types: [published]
1616

1717
env:
1818
MAIN_PYTHON_VERSION: '3.10'
19-
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/pyansys/geometry:windows-latest-tmp
20-
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/pyansys/geometry:linux-latest-tmp
19+
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/ansys/geometry:windows-latest-tmp
20+
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/ansys/geometry:linux-latest-tmp
2121
ANSRV_GEO_PORT: 700
2222
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
2323
GEO_CONT_NAME: ans_geo

.github/workflows/label.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ jobs:
7777
issue-number: ${{ github.event.pull_request.number }}
7878
body: |
7979
Please add one of the following labels to add this contribution to the Release Notes :point_down:
80-
- [bug](https://github.com/pyansys/pygeometry/pulls?q=label%3Abug+)
81-
- [documentation](https://github.com/pyansys/pygeometry/pulls?q=label%3Adocumentation+)
82-
- [enhancement](https://github.com/pyansys/pygeometry/pulls?q=label%3Aenhancement+)
83-
- [good first issue](https://github.com/pyansys/pygeometry/pulls?q=label%3Agood+first+issue)
84-
- [maintenance](https://github.com/pyansys/pygeometry/pulls?q=label%3Amaintenance+)
85-
- [release](https://github.com/pyansys/pygeometry/pulls?q=label%3Arelease+)
80+
- [bug](https://github.com/ansys/pygeometry/pulls?q=label%3Abug+)
81+
- [documentation](https://github.com/ansys/pygeometry/pulls?q=label%3Adocumentation+)
82+
- [enhancement](https://github.com/ansys/pygeometry/pulls?q=label%3Aenhancement+)
83+
- [good first issue](https://github.com/ansys/pygeometry/pulls?q=label%3Agood+first+issue)
84+
- [maintenance](https://github.com/ansys/pygeometry/pulls?q=label%3Amaintenance+)
85+
- [release](https://github.com/ansys/pygeometry/pulls?q=label%3Arelease+)

.github/workflows/nightly_docker_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66

77
env:
88
MAIN_PYTHON_VERSION: '3.10'
9-
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/pyansys/geometry:windows-latest-unstable
10-
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/pyansys/geometry:linux-latest-unstable
9+
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/ansys/geometry:windows-latest-unstable
10+
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/ansys/geometry:linux-latest-unstable
1111
ANSRV_GEO_PORT: 710
1212
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
1313
GEO_CONT_NAME: ans_geo_nightly
@@ -103,7 +103,7 @@ jobs:
103103
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_LINUX_TAG }}
104104
105105
- name: Run pytest
106-
uses: pyansys/actions/tests-pytest@v4
106+
uses: ansys/actions/tests-pytest@v4
107107
env:
108108
ALLOW_PLOTTING: true
109109
with:

.pre-commit-config.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,23 @@ repos:
2121
hooks:
2222
- id: flake8
2323

24+
- repo: https://github.com/PyCQA/docformatter
25+
rev: v1.6.3
26+
hooks:
27+
- id: docformatter
28+
additional_dependencies: [tomli]
29+
2430
- repo: https://github.com/codespell-project/codespell
2531
rev: v2.2.4
2632
hooks:
2733
- id: codespell
2834

29-
# To be activated after quick dev cycles
30-
#
31-
# - repo: https://github.com/pycqa/pydocstyle
32-
# rev: 6.1.1
33-
# hooks:
34-
# - id: pydocstyle
35-
# additional_dependencies: [toml]
36-
# exclude: "tests/"
35+
- repo: https://github.com/pycqa/pydocstyle
36+
rev: 6.3.0
37+
hooks:
38+
- id: pydocstyle
39+
additional_dependencies: [tomli]
40+
exclude: "tests/"
3741

3842
- repo: https://github.com/pre-commit/pre-commit-hooks
3943
rev: v4.4.0

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# These owners will be the default owners for everything in
55
# the repo. Unless a later match takes precedence,
66
# they will be requested for review when someone opens a pull request.
7-
* @RobPasMue @jonahrb
7+
* @ansys/pygeometry-maintainers

0 commit comments

Comments
 (0)