Skip to content

Commit f0b3670

Browse files
pyansys-ci-botrlagharafacanton
authored
Update generated code for DPF 242_rcs_24.2.pre0 on master (#1404)
* update generated code * Revert forward.py * change behavior based on license change * DPFServerException -> RunTimeError * runtimeerror well * With grpc, it still failsà * skip test --------- Co-authored-by: rlagha <[email protected]> Co-authored-by: Rafael Canton <[email protected]> Co-authored-by: Rafael Canton <[email protected]>
1 parent 5f1c99f commit f0b3670

File tree

10 files changed

+41
-20
lines changed

10 files changed

+41
-20
lines changed

doc/source/_static/dpf_operators.html

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

src/ansys/dpf/core/operators/geo/normals_provider_nl.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313

1414
class normals_provider_nl(Operator):
15-
"""Computes the normals on nodes/faces/elements based on integration
16-
points (more accurate for non-linear elements) on a skin mesh.
15+
"""Computes the normals on nodes/elements based on integration points
16+
(more accurate for non-linear elements) on a skin mesh.
1717
1818
Parameters
1919
----------
2020
mesh : MeshedRegion
21-
Skin, face, or shell mesh region.
21+
Skin or shell mesh region.
2222
mesh_scoping : Scoping, optional
2323
Elemental, elementalnodal, or nodal scoping.
2424
location derived from this.
@@ -75,17 +75,16 @@ def __init__(
7575

7676
@staticmethod
7777
def _spec():
78-
description = """Computes the normals on nodes/faces/elements based on integration
79-
points (more accurate for non-linear elements) on a skin
80-
mesh."""
78+
description = """Computes the normals on nodes/elements based on integration points
79+
(more accurate for non-linear elements) on a skin mesh."""
8180
spec = Specification(
8281
description=description,
8382
map_input_pin_spec={
8483
0: PinSpecification(
8584
name="mesh",
8685
type_names=["abstract_meshed_region"],
8786
optional=False,
88-
document="""Skin, face, or shell mesh region.""",
87+
document="""Skin or shell mesh region.""",
8988
),
9089
1: PinSpecification(
9190
name="mesh_scoping",
@@ -183,7 +182,7 @@ def __init__(self, op: Operator):
183182
def mesh(self):
184183
"""Allows to connect mesh input to the operator.
185184
186-
Skin, face, or shell mesh region.
185+
Skin or shell mesh region.
187186
188187
Parameters
189188
----------

src/ansys/dpf/core/operators/utility/server_path.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class server_path(Operator):
2121
0 (default): root of the server, 1:
2222
"dpf/bin/platform", 2:
2323
"aisol/bin(dll)/platform", 3:
24-
"dpf/plugins".
24+
"dpf/plugins", 4: "dpf/workflows".
2525
2626
2727
Examples
@@ -67,7 +67,7 @@ def _spec():
6767
0 (default): root of the server, 1:
6868
"dpf/bin/platform", 2:
6969
"aisol/bin(dll)/platform", 3:
70-
"dpf/plugins".""",
70+
"dpf/plugins", 4: "dpf/workflows".""",
7171
),
7272
},
7373
map_output_pin_spec={
@@ -144,7 +144,7 @@ def subpath(self):
144144
0 (default): root of the server, 1:
145145
"dpf/bin/platform", 2:
146146
"aisol/bin(dll)/platform", 3:
147-
"dpf/plugins".
147+
"dpf/plugins", 4: "dpf/workflows".
148148
149149
Parameters
150150
----------

src/ansys/dpf/gate/collection_grpcapi.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ def collection_get_num_labels(collection):
9595
def collection_get_label(collection, labelIndex):
9696
return CollectionGRPCAPI._list(collection).labels.labels[labelIndex]
9797

98+
@staticmethod
99+
def collection_get_name(collection):
100+
return CollectionGRPCAPI._list(collection).name
101+
102+
@staticmethod
103+
def collection_set_name(collection, name):
104+
from ansys.grpc.dpf import collection_pb2
105+
request = collection_pb2.UpdateCollectionRequest()
106+
request.collection.CopyFrom(collection._internal_obj)
107+
request.string_properties.update({"name": name})
108+
_get_stub(collection._server).Update(request)
109+
98110
@staticmethod
99111
def collection_get_size(collection):
100112
if isinstance(collection._internal_obj, list):
3.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.
5.45 KB
Binary file not shown.
0 Bytes
Binary file not shown.

tests/entry/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def _get_test_files_directory():
4848
] = "/tmp/test_files"
4949

5050

51+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 = meets_version(
52+
get_server_version(core._global_server()), "8.0"
53+
)
5154
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_1 = meets_version(
5255
get_server_version(core._global_server()), "6.1"
5356
)

tests/entry/test_entry.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@
1717
reason="Tests ANSYS_DPF_ACCEPT_LA",
1818
)
1919
def test_license_agr(restore_accept_la_env):
20+
# store the server version beforehand
21+
server_ge_8 = conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0
2022
dpf.server.shutdown_global_server()
2123
config = dpf.AvailableServerConfigs.InProcessServer
2224
init_val = os.environ["ANSYS_DPF_ACCEPT_LA"]
2325
del os.environ["ANSYS_DPF_ACCEPT_LA"]
24-
with pytest.raises(errors.DPFServerException):
26+
if server_ge_8:
2527
dpf.start_local_server(config=config, as_global=True)
26-
with pytest.raises(errors.DPFServerException):
2728
dpf.Operator("stream_provider")
29+
else:
30+
with pytest.raises(errors.DPFServerException):
31+
dpf.start_local_server(config=config, as_global=True)
32+
with pytest.raises(errors.DPFServerException):
33+
dpf.Operator("stream_provider")
2834
os.environ["ANSYS_DPF_ACCEPT_LA"] = init_val
2935
dpf.start_local_server(config=config, as_global=True)
3036
assert "static" in examples.find_static_rst()
@@ -34,7 +40,8 @@ def test_license_agr(restore_accept_la_env):
3440
@pytest.mark.order(2)
3541
@pytest.mark.skipif(
3642
os.environ.get("ANSYS_DPF_ACCEPT_LA", "") == ""
37-
or not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_0,
43+
or not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_0 or
44+
conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0,
3845
reason="Tests ANSYS_DPF_ACCEPT_LA",
3946
)
4047
def test_license_agr_remote(remote_config_server_type, restore_accept_la_env):

0 commit comments

Comments
 (0)