Skip to content

Commit f3669e4

Browse files
RobPasMuepyansys-ci-botpre-commit-ci[bot]
authored
build: bump PyVista and VTK versions (support Python 3.13) (#1924)
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e54ba43 commit f3669e4

File tree

21 files changed

+134
-127
lines changed

21 files changed

+134
-127
lines changed

.github/workflows/ci_cd.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- main
1010

1111
env:
12-
MAIN_PYTHON_VERSION: '3.12'
12+
MAIN_PYTHON_VERSION: '3.13'
1313
PACKAGE_NAME: 'ansys-geometry-core'
1414
DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com'
1515
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
@@ -401,6 +401,12 @@ jobs:
401401
echo "SKIP_UNSTABLE=$Result" >> $GITHUB_ENV
402402
echo "SKIP_UNSTABLE will be: $Result"
403403
404+
- name: Set up headless display
405+
if: env.SKIP_UNSTABLE == 'false'
406+
uses: pyvista/setup-headless-display-action@52bda06d59c0fc422fc2512c9c670bf6b66616f8 # v3.2
407+
with:
408+
pyvista: false
409+
404410
- name: Login in Github Container registry
405411
if: env.SKIP_UNSTABLE == 'false'
406412
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
@@ -474,6 +480,11 @@ jobs:
474480
matrix:
475481
python-version: ['3.10', '3.11', '3.12', '3.13']
476482
steps:
483+
- name: Set up headless display
484+
uses: pyvista/setup-headless-display-action@52bda06d59c0fc422fc2512c9c670bf6b66616f8 # v3.2
485+
with:
486+
pyvista: false
487+
477488
- name: Login in Github Container registry
478489
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
479490
with:
@@ -769,6 +780,11 @@ jobs:
769780
with:
770781
python-version: ${{ env.MAIN_PYTHON_VERSION }}
771782

783+
- name: Set up headless display
784+
uses: pyvista/setup-headless-display-action@52bda06d59c0fc422fc2512c9c670bf6b66616f8 # v3.2
785+
with:
786+
pyvista: false
787+
772788
- name: Download Linux binaries
773789
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
774790
with:
@@ -805,7 +821,6 @@ jobs:
805821
python-version: ${{ env.MAIN_PYTHON_VERSION }}
806822
pytest-extra-args: "--use-existing-service=yes"
807823
checkout: false
808-
requires-xvfb: true
809824
randomize: true
810825

811826
- name: "Compressing Linux Dockerfile"

.github/workflows/nightly_docker_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- v*
2222

2323
env:
24-
MAIN_PYTHON_VERSION: '3.12'
24+
MAIN_PYTHON_VERSION: '3.13'
2525
ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG: ghcr.io/ansys/geometry:core-windows-latest-unstable
2626
ANSRV_GEO_IMAGE_LINUX_CORE_TAG: ghcr.io/ansys/geometry:core-linux-latest-unstable
2727
ANSRV_GEO_PORT: 710
@@ -220,7 +220,6 @@ jobs:
220220
ALLOW_PLOTTING: true
221221
with:
222222
python-version: ${{ env.MAIN_PYTHON_VERSION }}
223-
requires-xvfb: true
224223

225224
- name: Stop the Geometry service
226225
if: always()

doc/changelog.d/1924.dependencies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump PyVista and VTK versions (support Python 3.13)

doc/changelog.d/1925.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docstyle ordering

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ all = [
5858
tests = [
5959
"ansys-platform-instancemanagement==1.1.2",
6060
"ansys-tools-path==0.7.1",
61-
"ansys-tools-visualization-interface==0.8.3",
61+
"ansys-tools-visualization-interface==0.9.1",
6262
"beartype==0.20.2",
6363
"docker==7.1.0",
6464
"geomdl==5.3.1",
@@ -72,24 +72,22 @@ tests = [
7272
"pytest==8.3.5",
7373
"pytest-cov==6.1.1",
7474
"pytest-pyvista==0.1.9",
75-
"pytest-xvfb==3.1.1",
76-
"pyvista[jupyter]==0.44.2",
75+
"pyvista[jupyter]==0.45.0",
7776
"requests==2.32.3",
7877
"scipy==1.15.2",
7978
"semver==3.0.4",
8079
"six==1.17.0",
81-
"vtk==9.3.1",
80+
"vtk==9.4.2",
8281
]
8382
tests-minimal = [
8483
"pytest==8.3.5",
8584
"pytest-cov==6.1.1",
8685
"pytest-pyvista==0.1.9",
87-
"pytest-xvfb==3.1.1",
8886
]
8987
doc = [
9088
"ansys-sphinx-theme[autoapi]==1.4.2",
9189
"ansys-tools-path==0.7.1",
92-
"ansys-tools-visualization-interface==0.8.3",
90+
"ansys-tools-visualization-interface==0.9.1",
9391
"beartype==0.20.2",
9492
"docker==7.1.0",
9593
"geomdl==5.3.1",
@@ -110,7 +108,7 @@ doc = [
110108
"Pint==0.24.4",
111109
"protobuf==5.29.3",
112110
"pygltflib==1.16.3",
113-
"pyvista[jupyter]==0.44.2",
111+
"pyvista[jupyter]==0.45.0",
114112
"quarto-cli==1.6.42",
115113
"requests==2.32.3",
116114
"scipy==1.15.2",
@@ -121,7 +119,7 @@ doc = [
121119
"sphinx-copybutton==0.5.2",
122120
"sphinx-jinja==2.0.2",
123121
"trame-vtk==2.8.15",
124-
"vtk==9.3.1",
122+
"vtk==9.4.2",
125123
]
126124

127125
[project.urls]

src/ansys/geometry/core/_grpc/_services/_service.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ class _GRPCServices:
3535
"""
3636
Placeholder for the gRPC services (i.e. stubs).
3737
38-
Notes
39-
-----
40-
This class provides a unified interface to access the different
41-
gRPC services available in the Geometry API. It allows for easy
42-
switching between different versions of the API by using the
43-
`version` parameter in the constructor. The services are lazy-loaded
44-
to avoid unnecessary imports and to improve performance.
45-
4638
Parameters
4739
----------
4840
channel : grpc.Channel
4941
The gRPC channel to the server.
5042
version : GeometryApiProtos | str | None
5143
The version of the gRPC API protocol to use. If None, the latest
5244
version is used.
45+
46+
Notes
47+
-----
48+
This class provides a unified interface to access the different
49+
gRPC services available in the Geometry API. It allows for easy
50+
switching between different versions of the API by using the
51+
`version` parameter in the constructor. The services are lazy-loaded
52+
to avoid unnecessary imports and to improve performance.
5353
"""
5454

5555
def __init__(self, channel: grpc.Channel, version: GeometryApiProtos | str | None = None):

src/ansys/geometry/core/_grpc/_services/base/conversions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ def from_measurement_to_server_angle(input: Measurement) -> float:
5959
def to_distance(value: float | int) -> Distance:
6060
"""Convert a server value to a Distance object.
6161
62-
Notes
63-
-----
64-
The value is converted to a Distance object using the default server length unit.
65-
The value should represent a length in the server's unit system.
66-
6762
Parameters
6863
----------
6964
value : float | int
@@ -73,5 +68,10 @@ def to_distance(value: float | int) -> Distance:
7368
-------
7469
Distance
7570
Converted distance.
71+
72+
Notes
73+
-----
74+
The value is converted to a Distance object using the default server length unit.
75+
The value should represent a length in the server's unit system.
7676
"""
7777
return Distance(value, DEFAULT_UNITS.SERVER_LENGTH)

src/ansys/geometry/core/_grpc/_version.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ def from_string(version_string: str) -> "GeometryApiProtos":
7171
def verify_supported(self, channel: grpc.Channel) -> bool:
7272
"""Check if the version is supported.
7373
74-
Notes
75-
-----
76-
This method checks if the server supports the gRPC API protocol version.
77-
7874
Parameters
7975
----------
8076
channel : grpc.Channel
@@ -84,6 +80,10 @@ def verify_supported(self, channel: grpc.Channel) -> bool:
8480
-------
8581
bool
8682
True if the server supports the version, otherwise False.
83+
84+
Notes
85+
-----
86+
This method checks if the server supports the gRPC API protocol version.
8787
"""
8888
pb2_grpc = self.value[1]
8989
if pb2_grpc is None:

src/ansys/geometry/core/connection/client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
def _create_geometry_channel(target: str) -> grpc.Channel:
5252
"""Create a Geometry service gRPC channel.
5353
54-
Notes
55-
-----
56-
Contains specific options for the Geometry service.
57-
5854
Parameters
5955
----------
6056
target : str
@@ -65,6 +61,10 @@ def _create_geometry_channel(target: str) -> grpc.Channel:
6561
-------
6662
~grpc.Channel
6763
gRPC channel for the Geometry service.
64+
65+
Notes
66+
-----
67+
Contains specific options for the Geometry service.
6868
"""
6969
return grpc.insecure_channel(
7070
target,
@@ -94,16 +94,16 @@ def wait_until_healthy(channel: grpc.Channel | str, timeout: float) -> grpc.Chan
9494
* If the total elapsed time exceeds the value for the ``timeout`` parameter,
9595
a ``TimeoutError`` is raised.
9696
97-
Raises
98-
------
99-
TimeoutError
100-
Raised when the total elapsed time exceeds the value for the ``timeout`` parameter.
101-
10297
Returns
10398
-------
10499
grpc.Channel
105100
The channel that was passed in. This channel is guaranteed to be healthy.
106101
If a string was passed in, a channel is created using the default insecure channel.
102+
103+
Raises
104+
------
105+
TimeoutError
106+
Raised when the total elapsed time exceeds the value for the ``timeout`` parameter.
107107
"""
108108
t_max = time.time() + timeout
109109
t_out = 0.1

src/ansys/geometry/core/designer/component.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -506,12 +506,6 @@ def set_shared_topology(self, share_type: SharedTopologyType) -> None:
506506
def __build_body_from_response(self, response: dict) -> Body:
507507
"""Build a body from a response dictionary coming out of the gRPC call.
508508
509-
Notes
510-
-----
511-
This is a completely private method and is intended to be
512-
used only within the class. It handles the MasterBody and
513-
Body creation, and addition to the component.
514-
515509
Parameters
516510
----------
517511
response : dict
@@ -521,6 +515,12 @@ def __build_body_from_response(self, response: dict) -> Body:
521515
-------
522516
Body
523517
Body object.
518+
519+
Notes
520+
-----
521+
This is a completely private method and is intended to be
522+
used only within the class. It handles the MasterBody and
523+
Body creation, and addition to the component.
524524
"""
525525
tb = MasterBody(
526526
response["master_id"],
@@ -1102,10 +1102,6 @@ def __create_beams_legacy(
11021102
) -> list[Beam]:
11031103
"""Create beams under the component.
11041104
1105-
Notes
1106-
-----
1107-
This is a legacy method, which is used in versions up to Ansys 25.1.1 products.
1108-
11091105
Parameters
11101106
----------
11111107
segments : list[tuple[Point3D, Point3D]]
@@ -1117,6 +1113,10 @@ def __create_beams_legacy(
11171113
-------
11181114
list[Beam]
11191115
A list of the created Beams.
1116+
1117+
Notes
1118+
-----
1119+
This is a legacy method, which is used in versions up to Ansys 25.1.1 products.
11201120
"""
11211121
request = CreateBeamSegmentsRequest(parent=self.id, profile=profile.id)
11221122

0 commit comments

Comments
 (0)