@@ -142,9 +142,11 @@ class ConfigOptionSpec:
142
142
>>> operator = dpf.operators.math.add()
143
143
>>> config_spec = operator.specification.config_specification
144
144
>>> config_spec.keys()
145
- dict_keys(['binary_operation', 'inplace', 'mutex', 'num_threads', 'permissive', 'run_in_parallel', 'use_cache', 'work_by_index']) # noqa: E501
145
+ dict_keys(['binary_operation', 'inplace', 'mutex', 'num_threads', 'permissive', \
146
+ 'run_in_parallel', 'use_cache', 'work_by_index'])
146
147
>>> config_spec['inplace']
147
- ConfigOptionSpec(name='inplace', type_names=['bool'], default_value_str='false', document='The output is written over the input to save memory if this config is set to true.') # noqa: E501
148
+ ConfigOptionSpec(name='inplace', type_names=['bool'], default_value_str='false', \
149
+ document='The output is written over the input to save memory if this config is set to true.')
148
150
149
151
"""
150
152
@@ -257,18 +259,22 @@ def properties(self):
257
259
>>> from ansys.dpf import core as dpf
258
260
>>> operator = dpf.operators.math.add()
259
261
>>> operator.specification.properties
260
- {'plugin ': 'core ', 'category ': 'math ', 'user_name ': '+ ', 'exposure ': 'public '}
262
+ {'category ': 'math ', 'exposure ': 'public ', 'plugin ': 'core ', 'user_name ': '+ '}
261
263
"""
262
264
if self ._properties is None :
263
- self . _properties = dict ()
265
+ temp_properties = dict ()
264
266
if self ._internal_obj is not None :
265
267
num_properties = self ._api .operator_specification_get_num_properties (self )
266
268
for i_property in range (num_properties ):
267
269
property_key = self ._api .operator_specification_get_property_key (
268
270
self , i_property
269
271
)
270
272
prop = self ._api .operator_specification_get_properties (self , property_key )
271
- self ._properties [property_key ] = prop
273
+ temp_properties [property_key ] = prop
274
+ # Reorder the properties for consistency
275
+ self ._properties = dict ()
276
+ for key in sorted (temp_properties .keys ()):
277
+ self ._properties [key ] = temp_properties [key ]
272
278
return self ._properties
273
279
274
280
@property
@@ -284,7 +290,7 @@ def description(self) -> str:
284
290
>>> from ansys.dpf import core as dpf
285
291
>>> operator = dpf.operators.math.scale_by_field()
286
292
>>> operator.specification.description
287
- "Scales a field (in 0) by a scalar field (in 1). If one field's scoping has 'overall' location, then these field's values are applied on the entire other field." # noqa: E501
293
+ "Scales a field (in 0) by a scalar field (in 1). If one field's ... the entire other field."
288
294
"""
289
295
if self ._internal_obj is not None :
290
296
return self ._api .operator_specification_get_description (self )
@@ -305,7 +311,7 @@ def inputs(self) -> dict:
305
311
>>> 4 in operator.specification.inputs.keys()
306
312
True
307
313
>>> operator.specification.inputs[4]
308
- PinSpecification(name='data_sources', _type_names=['data_sources'], optional=False, document='result file path container, used if no streams are set', ellipsis=False) # noqa: E501
314
+ PinSpecification(name='data_sources', _type_names=['data_sources'], ... set', ellipsis=False)
309
315
"""
310
316
if self ._map_input_pin_spec is None :
311
317
self ._map_input_pin_spec = {}
@@ -325,7 +331,7 @@ def outputs(self) -> dict:
325
331
>>> from ansys.dpf import core as dpf
326
332
>>> operator = dpf.operators.mesh.mesh_provider()
327
333
>>> operator.specification.outputs
328
- {0: PinSpecification(name='mesh', _type_names=['abstract_meshed_region'], optional =False, document='', ellipsis=False)} # noqa: E501
334
+ {0: PinSpecification(name='mesh', _type_names=['abstract_meshed_region'], ... =False)}
329
335
"""
330
336
if self ._map_output_pin_spec is None :
331
337
self ._map_output_pin_spec = {}
0 commit comments