Skip to content

Commit 1a42847

Browse files
authored
Revert "Update generated code for DPF 261_test_stream_provider_nullptr on main" (#2800)
1 parent c0b8b28 commit 1a42847

File tree

6 files changed

+18
-152
lines changed

6 files changed

+18
-152
lines changed

doc/source/_static/dpf_operators.html

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

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

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
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-
3529
3630
Inputs
3731
------
@@ -40,12 +34,7 @@ class mesh_provider(Operator):
4034
streams_container: StreamsContainer, optional
4135
result file container allowed to be kept open to cache data
4236
data_sources: DataSources
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.
37+
result file path container, used if no streams are set
4938
read_cyclic: int, optional
5039
If 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).
5140
region_scoping: Scoping or int, optional
@@ -129,12 +118,6 @@ def __init__(
129118
@staticmethod
130119
def _spec() -> Specification:
131120
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.
138121
"""
139122
spec = Specification(
140123
description=description,
@@ -155,12 +138,7 @@ def _spec() -> Specification:
155138
name="data_sources",
156139
type_names=["data_sources"],
157140
optional=False,
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.""",
141+
document=r"""result file path container, used if no streams are set""",
164142
),
165143
14: PinSpecification(
166144
name="read_cyclic",
@@ -334,12 +312,7 @@ def streams_container(self) -> Input[StreamsContainer]:
334312
def data_sources(self) -> Input[DataSources]:
335313
r"""Allows to connect data_sources input to the operator.
336314
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.
315+
result file path container, used if no streams are set
343316
344317
Returns
345318
-------

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

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ 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-
3529
3630
Inputs
3731
------
@@ -40,12 +34,7 @@ class meshes_provider(Operator):
4034
streams_container: StreamsContainer, optional
4135
result file container allowed to be kept open to cache data
4236
data_sources: DataSources
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.
37+
result file path container, used if no streams are set
4938
read_cyclic: int, optional
5039
if 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).
5140
region_scoping: Scoping or int, optional
@@ -119,12 +108,6 @@ def __init__(
119108
def _spec() -> Specification:
120109
description = r"""Reads meshes from result files. Meshes can be spatially or temporally
121110
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.
128111
"""
129112
spec = Specification(
130113
description=description,
@@ -145,12 +128,7 @@ def _spec() -> Specification:
145128
name="data_sources",
146129
type_names=["data_sources"],
147130
optional=False,
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.""",
131+
document=r"""result file path container, used if no streams are set""",
154132
),
155133
14: PinSpecification(
156134
name="read_cyclic",
@@ -309,12 +287,7 @@ def streams_container(self) -> Input[StreamsContainer]:
309287
def data_sources(self) -> Input[DataSources]:
310288
r"""Allows to connect data_sources input to the operator.
311289
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.
290+
result file path container, used if no streams are set
318291
319292
Returns
320293
-------

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

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

2222

2323
class streams_provider(Operator):
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.
24+
r"""Creates streams (files with cache) from the data sources.
4025
4126
4227
Inputs
4328
------
4429
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.
5130
5231
Outputs
5332
-------
5433
streams_container: StreamsContainer
55-
Streams created from the input data sources, including aggregated streams across namespaces and any upstream streams.
5634
5735
Examples
5836
--------
@@ -87,22 +65,7 @@ def __init__(self, data_sources=None, config=None, server=None):
8765

8866
@staticmethod
8967
def _spec() -> Specification:
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.
68+
description = r"""Creates streams (files with cache) from the data sources.
10669
"""
10770
spec = Specification(
10871
description=description,
@@ -111,20 +74,15 @@ def _spec() -> Specification:
11174
name="data_sources",
11275
type_names=["data_sources"],
11376
optional=False,
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.""",
77+
document=r"""""",
12078
),
12179
},
12280
map_output_pin_spec={
12381
0: PinSpecification(
12482
name="streams_container",
12583
type_names=["streams_container"],
12684
optional=False,
127-
document=r"""Streams created from the input data sources, including aggregated streams across namespaces and any upstream streams.""",
85+
document=r"""""",
12886
),
12987
},
13088
)
@@ -197,13 +155,6 @@ def __init__(self, op: Operator):
197155
def data_sources(self) -> Input[DataSources]:
198156
r"""Allows to connect data_sources input to the operator.
199157
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-
207158
Returns
208159
-------
209160
input:
@@ -243,8 +194,6 @@ def __init__(self, op: Operator):
243194
def streams_container(self) -> Output[StreamsContainer]:
244195
r"""Allows to get streams_container output of the operator
245196
246-
Streams created from the input data sources, including aggregated streams across namespaces and any upstream streams.
247-
248197
Returns
249198
-------
250199
output:
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)