Skip to content

Commit dde8410

Browse files
authored
Merge branch 'main' into fix/export-facets
2 parents 8063b1d + dd1efda commit dde8410

20 files changed

+333
-126
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ repos:
1515
- "max_line_length=120,retain_line_breaks=true,retain_line_breaks_single=true"
1616

1717
- repo: https://github.com/tox-dev/pyproject-fmt
18-
rev: v2.8.0
18+
rev: v2.10.0
1919
hooks:
2020
- id: pyproject-fmt
2121
args: [--keep-full-version]
2222

2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.13.3
24+
rev: v0.14.0
2525
hooks:
2626
- id: ruff-check
2727
- id: ruff-format
@@ -49,7 +49,7 @@ repos:
4949

5050
# this validates our github workflow files
5151
- repo: https://github.com/python-jsonschema/check-jsonschema
52-
rev: 0.34.0
52+
rev: 0.34.1
5353
hooks:
5454
- id: check-github-workflows
5555

doc/changelog.d/2307.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Implement version based import
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump beartype from 0.21.0 to 0.22.2
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cleanup usage of EntityIdentifier
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump scipy (1.16.2) and numpy (2.3.3)
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+
Bump pytest-pyvista from 0.2.0 to 0.3.1

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ classifiers = [
2828
dependencies = [
2929
"ansys-api-geometry==0.4.81",
3030
"ansys-tools-path>=0.3,<1",
31-
"beartype>=0.11.0,<0.22",
31+
"beartype>=0.11.0,<0.23",
3232
"geomdl>=5,<6",
3333
"grpcio>=1.35.0,<2",
3434
"grpcio-health-checking>=1.45.0,<2",
@@ -99,27 +99,29 @@ general-all = [
9999
"ansys-platform-instancemanagement==1.1.2",
100100
"ansys-tools-path==0.7.3",
101101
"ansys-tools-visualization-interface==0.12.1",
102-
"beartype==0.21.0",
102+
"beartype==0.22.2",
103103
"docker==7.1.0",
104104
"geomdl==5.4.0",
105105
"grpcio==1.75.0",
106106
"grpcio-health-checking==1.75.0",
107107
"matplotlib==3.10.7",
108-
"numpy==2.2.6",
108+
"numpy==2.2.6; python_version<'3.11'",
109+
"numpy==2.3.3; python_version>='3.11'",
109110
"pint==0.24.4",
110111
"protobuf==6.32.1",
111112
"pygltflib==1.16.5",
112113
"pyvista[jupyter]==0.46.3",
113114
"requests==2.32.5",
114-
"scipy==1.15.3",
115+
"scipy==1.15.3; python_version<'3.11'",
116+
"scipy==1.16.2; python_version>='3.11'",
115117
"semver==3.0.4",
116118
"six==1.17.0",
117119
"vtk==9.5.2",
118120
]
119121
tests-minimal = [
120122
"pytest==8.4.2",
121123
"pytest-cov==7.0.0",
122-
"pytest-pyvista==0.2.0",
124+
"pytest-pyvista==0.3.1",
123125
"pyyaml==6.0.3",
124126
]
125127

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ def new(self, **kwargs) -> dict:
4949
"""Create a new design."""
5050
pass
5151

52+
@abstractmethod
53+
def get_assembly(self, **kwargs) -> dict:
54+
"""Create a new design."""
55+
pass
56+
5257
@abstractmethod
5358
def close(self, **kwargs) -> dict:
5459
"""Close the currently open design."""

src/ansys/geometry/core/_grpc/_services/v0/assembly_controls.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from ansys.geometry.core.errors import protect_grpc
2727

2828
from ..base.assembly_controls import GRPCAssemblyControlsService
29+
from .conversions import build_grpc_id
2930

3031

3132
class GRPCAssemblyControlsServiceV0(GRPCAssemblyControlsService):
@@ -49,16 +50,15 @@ def __init__(self, channel: grpc.Channel): # noqa: D102
4950

5051
@protect_grpc
5152
def create_align_condition(self, **kwargs) -> dict: # noqa: D102
52-
from ansys.api.dbu.v0.dbumodels_pb2 import EntityIdentifier
5353
from ansys.api.geometry.v0.commands_pb2 import (
5454
CreateAlignTangentOrientGearConditionRequest,
5555
)
5656

5757
# Create the request - assumes all inputs are valid and of the proper type
5858
request = CreateAlignTangentOrientGearConditionRequest(
59-
parent=EntityIdentifier(id=kwargs["parent_id"]),
60-
geometric_a=EntityIdentifier(id=kwargs["geometric_a_id"]),
61-
geometric_b=EntityIdentifier(id=kwargs["geometric_b_id"]),
59+
parent=build_grpc_id(kwargs["parent_id"]),
60+
geometric_a=build_grpc_id(kwargs["geometric_a_id"]),
61+
geometric_b=build_grpc_id(kwargs["geometric_b_id"]),
6262
)
6363

6464
# Call the gRPC service
@@ -77,16 +77,15 @@ def create_align_condition(self, **kwargs) -> dict: # noqa: D102
7777

7878
@protect_grpc
7979
def create_tangent_condition(self, **kwargs) -> dict: # noqa: D102
80-
from ansys.api.dbu.v0.dbumodels_pb2 import EntityIdentifier
8180
from ansys.api.geometry.v0.commands_pb2 import (
8281
CreateAlignTangentOrientGearConditionRequest,
8382
)
8483

8584
# Create the request - assumes all inputs are valid and of the proper type
8685
request = CreateAlignTangentOrientGearConditionRequest(
87-
parent=EntityIdentifier(id=kwargs["parent_id"]),
88-
geometric_a=EntityIdentifier(id=kwargs["geometric_a_id"]),
89-
geometric_b=EntityIdentifier(id=kwargs["geometric_b_id"]),
86+
parent=build_grpc_id(kwargs["parent_id"]),
87+
geometric_a=build_grpc_id(kwargs["geometric_a_id"]),
88+
geometric_b=build_grpc_id(kwargs["geometric_b_id"]),
9089
)
9190

9291
# Call the gRPC service
@@ -105,16 +104,15 @@ def create_tangent_condition(self, **kwargs) -> dict: # noqa: D102
105104

106105
@protect_grpc
107106
def create_orient_condition(self, **kwargs) -> dict: # noqa: D102
108-
from ansys.api.dbu.v0.dbumodels_pb2 import EntityIdentifier
109107
from ansys.api.geometry.v0.commands_pb2 import (
110108
CreateAlignTangentOrientGearConditionRequest,
111109
)
112110

113111
# Create the request - assumes all inputs are valid and of the proper type
114112
request = CreateAlignTangentOrientGearConditionRequest(
115-
parent=EntityIdentifier(id=kwargs["parent_id"]),
116-
geometric_a=EntityIdentifier(id=kwargs["geometric_a_id"]),
117-
geometric_b=EntityIdentifier(id=kwargs["geometric_b_id"]),
113+
parent=build_grpc_id(kwargs["parent_id"]),
114+
geometric_a=build_grpc_id(kwargs["geometric_a_id"]),
115+
geometric_b=build_grpc_id(kwargs["geometric_b_id"]),
118116
)
119117

120118
# Call the gRPC service

0 commit comments

Comments
 (0)