Skip to content

Commit e75e33e

Browse files
Update generated code for DPF 261_daily on main (#2806)
Co-authored-by: PProfizi <100710998+PProfizi@users.noreply.github.com>
1 parent dad9ba0 commit e75e33e

File tree

7 files changed

+155
-18
lines changed

7 files changed

+155
-18
lines changed

doc/source/_static/dpf_operators.html

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

src/ansys/dpf/core/operators/mesh/mesh_provider.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
class mesh_provider(Operator):
2727
r"""Reads a mesh from result files.
2828
29+
The operator attempts to read mesh data from the provided data sources.
30+
When the ``permissive`` configuration is enabled, the operator silently
31+
skips result files that cannot be opened or have unsupported namespaces.
32+
If ``permissive`` is disabled (default), errors are thrown for invalid
33+
files.
34+
2935
3036
Inputs
3137
------
@@ -34,7 +40,12 @@ class mesh_provider(Operator):
3440
streams_container: StreamsContainer, optional
3541
result file container allowed to be kept open to cache data
3642
data_sources: DataSources
37-
result file path container, used if no streams are set
43+
Data sources describing one or more result files.
44+
45+
**Error conditions when `permissive` config is disabled:**
46+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
47+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
48+
- If all result files are invalid, throws an error even in permissive mode.
3849
read_cyclic: int, optional
3950
If 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).
4051
region_scoping: Scoping or int, optional
@@ -118,6 +129,12 @@ def __init__(
118129
@staticmethod
119130
def _spec() -> Specification:
120131
description = r"""Reads a mesh from result files.
132+
133+
The operator attempts to read mesh data from the provided data sources.
134+
When the ``permissive`` configuration is enabled, the operator silently
135+
skips result files that cannot be opened or have unsupported namespaces.
136+
If ``permissive`` is disabled (default), errors are thrown for invalid
137+
files.
121138
"""
122139
spec = Specification(
123140
description=description,
@@ -138,7 +155,12 @@ def _spec() -> Specification:
138155
name="data_sources",
139156
type_names=["data_sources"],
140157
optional=False,
141-
document=r"""result file path container, used if no streams are set""",
158+
document=r"""Data sources describing one or more result files.
159+
160+
**Error conditions when `permissive` config is disabled:**
161+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
162+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
163+
- If all result files are invalid, throws an error even in permissive mode.""",
142164
),
143165
14: PinSpecification(
144166
name="read_cyclic",
@@ -312,7 +334,12 @@ def streams_container(self) -> Input[StreamsContainer]:
312334
def data_sources(self) -> Input[DataSources]:
313335
r"""Allows to connect data_sources input to the operator.
314336
315-
result file path container, used if no streams are set
337+
Data sources describing one or more result files.
338+
339+
**Error conditions when `permissive` config is disabled:**
340+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
341+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
342+
- If all result files are invalid, throws an error even in permissive mode.
316343
317344
Returns
318345
-------

src/ansys/dpf/core/operators/mesh/meshes_provider.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ class meshes_provider(Operator):
2626
r"""Reads meshes from result files. Meshes can be spatially or temporally
2727
varying.
2828
29+
The operator attempts to read mesh data from the provided data sources.
30+
When the ``permissive`` configuration is enabled, the operator silently
31+
skips result files that cannot be opened or have unsupported namespaces.
32+
If ``permissive`` is disabled (default), errors are thrown for invalid
33+
files.
34+
2935
3036
Inputs
3137
------
@@ -34,7 +40,12 @@ class meshes_provider(Operator):
3440
streams_container: StreamsContainer, optional
3541
result file container allowed to be kept open to cache data
3642
data_sources: DataSources
37-
result file path container, used if no streams are set
43+
Data sources describing one or more result files.
44+
45+
**Error conditions when `permissive` config is disabled:**
46+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
47+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
48+
- If all result files are invalid, throws an error even in permissive mode.
3849
read_cyclic: int, optional
3950
if 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).
4051
region_scoping: Scoping or int, optional
@@ -108,6 +119,12 @@ def __init__(
108119
def _spec() -> Specification:
109120
description = r"""Reads meshes from result files. Meshes can be spatially or temporally
110121
varying.
122+
123+
The operator attempts to read mesh data from the provided data sources.
124+
When the ``permissive`` configuration is enabled, the operator silently
125+
skips result files that cannot be opened or have unsupported namespaces.
126+
If ``permissive`` is disabled (default), errors are thrown for invalid
127+
files.
111128
"""
112129
spec = Specification(
113130
description=description,
@@ -128,7 +145,12 @@ def _spec() -> Specification:
128145
name="data_sources",
129146
type_names=["data_sources"],
130147
optional=False,
131-
document=r"""result file path container, used if no streams are set""",
148+
document=r"""Data sources describing one or more result files.
149+
150+
**Error conditions when `permissive` config is disabled:**
151+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
152+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
153+
- If all result files are invalid, throws an error even in permissive mode.""",
132154
),
133155
14: PinSpecification(
134156
name="read_cyclic",
@@ -287,7 +309,12 @@ def streams_container(self) -> Input[StreamsContainer]:
287309
def data_sources(self) -> Input[DataSources]:
288310
r"""Allows to connect data_sources input to the operator.
289311
290-
result file path container, used if no streams are set
312+
Data sources describing one or more result files.
313+
314+
**Error conditions when `permissive` config is disabled:**
315+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
316+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
317+
- If all result files are invalid, throws an error even in permissive mode.
291318
292319
Returns
293320
-------

src/ansys/dpf/core/operators/metadata/streams_provider.py

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,38 @@
2121

2222

2323
class streams_provider(Operator):
24-
r"""Creates streams (files with cache) from the data sources.
24+
r"""Create streams (cached file handles) based on provided data sources.
25+
26+
- When the data sources contain a single result key, an internal
27+
provider is instantiated for that namespace to create streams.
28+
- When multiple result keys are present, streams are aggregated from
29+
each namespace-specific internal provider.
30+
- Upstream data sources (if defined) are opened and attached to the
31+
output as upstream streams.
32+
33+
When the ``permissive`` configuration is enabled, the operator silently
34+
skips result files that cannot be opened or have unsupported namespaces,
35+
continuing with valid files. If ``permissive`` is disabled (default),
36+
errors are thrown for invalid files.
37+
38+
Throws a runtime error if data sources are missing or if all result
39+
files are invalid.
2540
2641
2742
Inputs
2843
------
2944
data_sources: DataSources
45+
Data sources describing one or more result files. Supports single or multiple result keys; may include upstream data sources.
46+
47+
**Error conditions when `permissive` config is disabled:**
48+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
49+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
50+
- If all result files are invalid, throws an error even in permissive mode.
3051
3152
Outputs
3253
-------
3354
streams_container: StreamsContainer
55+
Streams created from the input data sources, including aggregated streams across namespaces and any upstream streams.
3456
3557
Examples
3658
--------
@@ -65,7 +87,22 @@ def __init__(self, data_sources=None, config=None, server=None):
6587

6688
@staticmethod
6789
def _spec() -> Specification:
68-
description = r"""Creates streams (files with cache) from the data sources.
90+
description = r"""Create streams (cached file handles) based on provided data sources.
91+
92+
- When the data sources contain a single result key, an internal
93+
provider is instantiated for that namespace to create streams.
94+
- When multiple result keys are present, streams are aggregated from
95+
each namespace-specific internal provider.
96+
- Upstream data sources (if defined) are opened and attached to the
97+
output as upstream streams.
98+
99+
When the ``permissive`` configuration is enabled, the operator silently
100+
skips result files that cannot be opened or have unsupported namespaces,
101+
continuing with valid files. If ``permissive`` is disabled (default),
102+
errors are thrown for invalid files.
103+
104+
Throws a runtime error if data sources are missing or if all result
105+
files are invalid.
69106
"""
70107
spec = Specification(
71108
description=description,
@@ -74,15 +111,20 @@ def _spec() -> Specification:
74111
name="data_sources",
75112
type_names=["data_sources"],
76113
optional=False,
77-
document=r"""""",
114+
document=r"""Data sources describing one or more result files. Supports single or multiple result keys; may include upstream data sources.
115+
116+
**Error conditions when `permissive` config is disabled:**
117+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
118+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
119+
- If all result files are invalid, throws an error even in permissive mode.""",
78120
),
79121
},
80122
map_output_pin_spec={
81123
0: PinSpecification(
82124
name="streams_container",
83125
type_names=["streams_container"],
84126
optional=False,
85-
document=r"""""",
127+
document=r"""Streams created from the input data sources, including aggregated streams across namespaces and any upstream streams.""",
86128
),
87129
},
88130
)
@@ -155,6 +197,13 @@ def __init__(self, op: Operator):
155197
def data_sources(self) -> Input[DataSources]:
156198
r"""Allows to connect data_sources input to the operator.
157199
200+
Data sources describing one or more result files. Supports single or multiple result keys; may include upstream data sources.
201+
202+
**Error conditions when `permissive` config is disabled:**
203+
- Throws `std::runtime_error` with message "StreamProvider: empty namespace for result key '<key>'" if a result file has no namespace.
204+
- Throws `std::runtime_error` with message "StreamProvider: operator <namespace>::stream_provider not found." if the namespace is not supported.
205+
- If all result files are invalid, throws an error even in permissive mode.
206+
158207
Returns
159208
-------
160209
input:
@@ -194,6 +243,8 @@ def __init__(self, op: Operator):
194243
def streams_container(self) -> Output[StreamsContainer]:
195244
r"""Allows to get streams_container output of the operator
196245
246+
Streams created from the input data sources, including aggregated streams across namespaces and any upstream streams.
247+
197248
Returns
198249
-------
199250
output:
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 KB
Binary file not shown.

0 commit comments

Comments
 (0)