Skip to content

Commit 94fa838

Browse files
committed
Merge branch 'blitz' of https://github.com/ansys/pyansys-geometry into blitz
2 parents 179686b + c7ec5d8 commit 94fa838

29 files changed

+506
-260
lines changed

.github/workflows/ci_cd.yml

Lines changed: 14 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
PACKAGE_NAME: 'ansys-geometry-core'
1111
DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com'
1212
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
13-
ANSRV_GEO_IMAGE_DOCS_TAG: ghcr.io/ansys/geometry:windows-latest
13+
ANSRV_GEO_IMAGE_DOCS_TAG: ghcr.io/ansys/geometry:core-linux-latest
1414
ANSRV_GEO_PORT: 700
1515
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
1616
GEO_CONT_NAME: ans_geo
@@ -68,16 +68,11 @@ jobs:
6868
name: Check Docker manifests
6969
runs-on: ubuntu-latest
7070
outputs:
71-
skip_dms: ${{ steps.services.outputs.skip_dms }}
7271
skip_core_windows: ${{ steps.services.outputs.skip_core_windows }}
7372
skip_core_linux: ${{ steps.services.outputs.skip_core_linux }}
7473
strategy:
7574
matrix:
7675
include:
77-
- container-stable: "windows-latest"
78-
container-unstable: "windows-latest-unstable"
79-
service: "dms"
80-
service-name: "Windows DMS"
8176
- container-stable: "core-windows-latest"
8277
container-unstable: "core-windows-latest-unstable"
8378
service: "core_windows"
@@ -131,10 +126,6 @@ jobs:
131126
fail-fast: false
132127
matrix:
133128
include:
134-
- docker-image: "windows-latest"
135-
experimental: false
136-
- docker-image: "windows-latest-unstable"
137-
experimental: true
138129
- docker-image: "core-windows-latest"
139130
experimental: false
140131
- docker-image: "core-windows-latest-unstable"
@@ -144,11 +135,8 @@ jobs:
144135
- name: Calculate SKIP_UNSTABLE
145136
if: matrix.experimental
146137
run: |
147-
# Choose the manifests output to consider (for DMS or Core service)
148-
# based on the matrix value
149-
if ("${{ matrix.docker-image }}" -eq "windows-latest-unstable") {
150-
$ImagesAreEqual = ${{ needs.manifests.outputs.skip_dms }}
151-
} elseif ("${{ matrix.docker-image }}" -eq "core-windows-latest-unstable") {
138+
# Choose the manifests output to consider based on the matrix value
139+
if ("${{ matrix.docker-image }}" -eq "core-windows-latest-unstable") {
152140
$ImagesAreEqual = ${{ needs.manifests.outputs.skip_core_windows }}
153141
} else {
154142
Write-Output "Unknown docker image"
@@ -267,7 +255,7 @@ jobs:
267255

268256
- name: Upload coverage to Codecov
269257
uses: codecov/codecov-action@v5
270-
if: matrix.docker-image == 'windows-latest'
258+
if: matrix.docker-image == 'core-windows-latest'
271259
env:
272260
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
273261
with:
@@ -324,19 +312,21 @@ jobs:
324312
id: docs-build-required
325313
run: echo "build_required=${{ env.build_docs }}" >> $GITHUB_OUTPUT
326314

315+
# =================================================================================================
316+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317+
# =================================================================================================
318+
327319
docs:
328320
name: Documentation
329321
needs: [is_docs_pr]
330-
runs-on: [self-hosted, Windows, pygeometry]
322+
runs-on: ubuntu-latest
331323
# Only run if docs build is required
332324
if: ${{ needs.is_docs_pr.outputs.build_required == 'true' }}
333325
env:
334326
PYVISTA_OFF_SCREEN: true
335327
steps:
336328
- name: Set up headless display
337329
uses: pyvista/setup-headless-display-action@v3
338-
with:
339-
pyvista: false
340330

341331
- name: Login to GitHub Container Registry
342332
uses: docker/login-action@v3
@@ -345,31 +335,19 @@ jobs:
345335
username: ${{ github.actor }}
346336
password: ${{ secrets.GITHUB_TOKEN }}
347337

348-
- name: Download Geometry service container (if needed)
349-
run: docker pull ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
350-
351-
- name: Check location of self-hosted runner and define license server accordingly
352-
if: runner.name == 'pygeometry-ci-2'
353-
run:
354-
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
355-
356-
- name: Stop any running containers
338+
- name: Pull and launch geometry service
357339
run: |
358-
$dockerContainers = docker ps -a -q
359-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
360-
docker stop $dockerContainers
361-
docker rm $dockerContainers
362-
}
363-
364-
- name: Start Geometry service and verify start
365-
run: 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_DOCS_TAG }}
340+
docker pull ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
341+
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_DOCS_TAG }}
366342
367343
- name: Run Ansys documentation building action
368344
uses: ansys/actions/doc-build@v8
369345
with:
370346
python-version: ${{ env.MAIN_PYTHON_VERSION }}
371347
add-pdf-html-docs-as-assets: true
372348
needs-quarto: true
349+
dependencies: 'pandoc'
350+
sphinxopts: '-j 1 -W --color'
373351

374352
- name: Stop the Geometry service
375353
if: always()
@@ -378,23 +356,6 @@ jobs:
378356
docker logs ${{ env.GEO_CONT_NAME }}
379357
docker rm ${{ env.GEO_CONT_NAME }}
380358
381-
- name: Stop any remaining containers
382-
if: always()
383-
run: |
384-
$dockerContainers = docker ps -a -q
385-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
386-
docker stop $dockerContainers
387-
docker rm $dockerContainers
388-
}
389-
390-
- name: Clean all Docker dangling images
391-
if: always()
392-
run: docker image prune -f
393-
394-
# =================================================================================================
395-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
396-
# =================================================================================================
397-
398359
testing-linux:
399360
name: Testing and coverage (Linux)
400361
needs: [manifests]

.github/workflows/docker_ansyslab_windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ permissions:
1212
packages: read
1313

1414
env:
15-
WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:windows-latest
16-
WINDOWS_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:windows-latest
15+
WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:core-windows-latest
16+
WINDOWS_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:core-windows-latest
1717

1818
jobs:
1919
windows-ansyslab:

.github/workflows/nightly_docker_test.yml

Lines changed: 3 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222

2323
env:
2424
MAIN_PYTHON_VERSION: '3.12'
25-
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/ansys/geometry:windows-latest-unstable
2625
ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG: ghcr.io/ansys/geometry:core-windows-latest-unstable
2726
ANSRV_GEO_IMAGE_LINUX_CORE_TAG: ghcr.io/ansys/geometry:core-linux-latest-unstable
2827
ANSRV_GEO_PORT: 710
@@ -39,16 +38,11 @@ jobs:
3938
name: Check Docker manifests
4039
runs-on: ubuntu-latest
4140
outputs:
42-
skip_dms: ${{ steps.services.outputs.skip_dms }}
4341
skip_core_windows: ${{ steps.services.outputs.skip_core_windows }}
4442
skip_core_linux: ${{ steps.services.outputs.skip_core_linux }}
4543
strategy:
4644
matrix:
4745
include:
48-
- container-stable: "windows-latest"
49-
container-unstable: "windows-latest-unstable"
50-
service: "dms"
51-
service-name: "Windows DMS"
5246
- container-stable: "core-windows-latest"
5347
container-unstable: "core-windows-latest-unstable"
5448
service: "core_windows"
@@ -90,113 +84,7 @@ jobs:
9084
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9185
# =================================================================================================
9286

93-
windows-dms-tests:
94-
name: Windows DMS
95-
needs: manifests
96-
if: needs.manifests.outputs.skip_dms == 0
97-
runs-on: [self-hosted, Windows, pygeometry]
98-
env:
99-
PYVISTA_OFF_SCREEN: true
100-
steps:
101-
- uses: actions/checkout@v4
102-
103-
- name: Set up Python
104-
uses: actions/setup-python@v5
105-
with:
106-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
107-
108-
- name: Set up headless display
109-
uses: pyvista/setup-headless-display-action@v3
110-
with:
111-
pyvista: false
112-
113-
- name: Create Python venv
114-
run: |
115-
python -m venv .venv
116-
.\.venv\Scripts\Activate.ps1
117-
118-
- name: Install packages for testing
119-
run: |
120-
.\.venv\Scripts\Activate.ps1
121-
pip install --upgrade build
122-
pip install .[tests]
123-
124-
- name: Login to GitHub Container Registry
125-
uses: docker/login-action@v3
126-
with:
127-
registry: ghcr.io
128-
username: ${{ github.actor }}
129-
password: ${{ secrets.GITHUB_TOKEN }}
130-
131-
- name: Download Geometry service container (always latest version)
132-
run: |
133-
docker image rm ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
134-
docker pull ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
135-
136-
- name: Check location of self-hosted runner and define license server accordingly
137-
if: runner.name == 'pygeometry-ci-2'
138-
run:
139-
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
140-
141-
- name: Start Geometry service and verify start
142-
run: |
143-
.\.venv\Scripts\Activate.ps1
144-
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 }}
145-
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
146-
147-
- name: Run PyAnsys Geometry tests
148-
run: |
149-
.\.venv\Scripts\Activate.ps1
150-
pytest -v
151-
152-
- name: Stop the Geometry service
153-
if: always()
154-
run: |
155-
docker stop ${{ env.GEO_CONT_NAME }}
156-
docker logs ${{ env.GEO_CONT_NAME }}
157-
docker rm ${{ env.GEO_CONT_NAME }}
158-
159-
- name: Stop any remaining containers
160-
if: always()
161-
run: |
162-
$dockerContainers = docker ps -a -q
163-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
164-
docker stop $dockerContainers
165-
docker rm $dockerContainers
166-
}
167-
168-
- name: Clean all Docker dangling images
169-
if: always()
170-
run: docker image prune -f
171-
172-
- name: Microsoft Teams Notification
173-
uses: skitionek/notify-microsoft-teams@master
174-
if: failure()
175-
with:
176-
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
177-
# Message to send to Teams as a webhook notification in JSON Payload format
178-
raw: >-
179-
{
180-
"@type": "MessageCard",
181-
"@context": "http://schema.org/extensions",
182-
"summary": "Unstable build tests for Windows DMS failing",
183-
"themeColor": "f44336",
184-
"title": "PyAnsys Geometry unstable build tests - Windows DMS failing",
185-
"sections": [
186-
{
187-
"activityTitle": "Windows DMS unstable build tests are failing",
188-
"activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
189-
"facts": [
190-
{
191-
"name": "Status",
192-
"value": "Failed"
193-
}
194-
]
195-
}
196-
]
197-
}
198-
199-
windows-core-tests:
87+
windows-tests:
20088
name: Windows Core Service
20189
needs: manifests
20290
if: needs.manifests.outputs.skip_core_windows == 0
@@ -368,33 +256,8 @@ jobs:
368256
]
369257
}
370258
371-
promote-windows-dms:
372-
needs: windows-dms-tests
373-
runs-on: windows-latest
374-
name: Promote Windows DMS container
375-
if: ${{ github.event.inputs.promote == 'true' || github.event_name == 'schedule' }}
376-
env:
377-
WINDOWS_UNSTABLE: ghcr.io/ansys/geometry:windows-latest-unstable
378-
WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:windows-latest
379-
steps:
380-
- name: Login in Github Container registry
381-
uses: docker/login-action@v3
382-
with:
383-
registry: ghcr.io
384-
username: ${{ github.actor }}
385-
password: ${{ secrets.GITHUB_TOKEN }}
386-
387-
- name: Pull Windows latest unstable container
388-
run: docker pull ${{ env.WINDOWS_UNSTABLE }}
389-
390-
- name: Tag container as latest (stable) for Github Container registry
391-
run: docker tag ${{ env.WINDOWS_UNSTABLE }} ${{ env.WINDOWS_STABLE_GHCR }}
392-
393-
- name: Publish latest stable container in ghcr.io
394-
run: docker push ${{ env.WINDOWS_STABLE_GHCR }}
395-
396-
promote-windows-core:
397-
needs: windows-core-tests
259+
promote-windows:
260+
needs: windows-tests
398261
runs-on: windows-latest
399262
name: Promote Windows Core Service container
400263
if: ${{ github.event.inputs.promote == 'true' || github.event_name == 'schedule' }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude: "tests/integration/files"
77
repos:
88

99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.9.9
10+
rev: v0.9.10
1111
hooks:
1212
- id: ruff
1313
- id: ruff-format
@@ -35,7 +35,7 @@ repos:
3535

3636
# this validates our github workflow files
3737
- repo: https://github.com/python-jsonschema/check-jsonschema
38-
rev: 0.31.2
38+
rev: 0.31.3
3939
hooks:
4040
- id: check-github-workflows
4141

doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS = -j auto -W --color
5+
SPHINXOPTS = -j 1 -W --color
66
SPHINXBUILD = sphinx-build
77
APIDIR = api
88
SOURCEDIR = source
@@ -28,7 +28,7 @@ clean:
2828
pdf:
2929
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3030
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
31-
(test -f $(BUILDDIR)/latex/*.pdf && echo pdf exists) || exit 1
31+
(test -f $(BUILDDIR)/latex/ansys-geometry-core.pdf && echo pdf exists) || exit 1
3232

3333
# Build HTML files and generate examples as .py files
3434
html:

doc/changelog.d/1781.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
imprint curves without a sketch

doc/changelog.d/1805.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enhanced 3D bounding box implementation
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump ansys-api-geometry from 0.4.44 to 0.4.45
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pre-commit automatic update
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
remove DMS from pipelines and use core service images only

0 commit comments

Comments
 (0)