2323from ansys .dpf .core .custom_container_base import CustomContainerBase
2424
2525
26- class WorkflowData (CustomContainerBase ):
26+ class WorkflowTopology (CustomContainerBase ):
2727 def __init__ (self , * args ) -> None :
2828 super ().__init__ (* args )
2929
@@ -38,69 +38,80 @@ def operators(self):
3838 from ansys .dpf .core import OperatorsCollection
3939
4040 if self ._operators is None :
41- self ._operators = self ._container .get_property (
42- "operators" , OperatorsCollection )
41+ self ._operators = self ._container .get_property ("operators" , OperatorsCollection )
4342
4443 return self ._operators
4544
4645 @property
4746 def operator_connections (self ):
4847 from ansys .dpf .core import GenericDataContainersCollection
49- from ansys .dpf .core .workflow_data .operator_connection import OperatorConnectionsCollection
48+ from ansys .dpf .core .workflow_topology .operator_connection import (
49+ OperatorConnectionsCollection ,
50+ )
5051
5152 if self ._operator_connections is None :
5253 self ._operator_connections = OperatorConnectionsCollection (
53- self ._container .get_property ("operator_connections" , GenericDataContainersCollection ))
54+ self ._container .get_property (
55+ "operator_connections" , GenericDataContainersCollection
56+ )
57+ )
5458
5559 return self ._operator_connections
5660
5761 @property
5862 def data_connections (self ):
5963 from ansys .dpf .core import GenericDataContainersCollection
60- from ansys .dpf .core .workflow_data .data_connection import DataConnectionsCollection
64+ from ansys .dpf .core .workflow_topology .data_connection import DataConnectionsCollection
6165
6266 if self ._data_connections is None :
6367 self ._data_connections = DataConnectionsCollection (
64- self ._container .get_property ("data_connections" , GenericDataContainersCollection ))
68+ self ._container .get_property ("data_connections" , GenericDataContainersCollection )
69+ )
6570
6671 return self ._data_connections
6772
6873 @property
6974 def exposed_inputs (self ):
7075 from ansys .dpf .core import GenericDataContainersCollection
71- from ansys .dpf .core .workflow_data .exposed_pin import ExposedPinsCollection
76+ from ansys .dpf .core .workflow_topology .exposed_pin import ExposedPinsCollection
7277
7378 if self ._exposed_inputs is None :
74- self ._exposed_inputs = ExposedPinsCollection (self ._container .get_property (
75- "exposed_inputs" , GenericDataContainersCollection ))
79+ self ._exposed_inputs = ExposedPinsCollection (
80+ self ._container .get_property ("exposed_inputs" , GenericDataContainersCollection )
81+ )
7682
7783 return self ._exposed_inputs
7884
7985 @property
8086 def exposed_outputs (self ):
8187 from ansys .dpf .core import GenericDataContainersCollection
82- from ansys .dpf .core .workflow_data .exposed_pin import ExposedPinsCollection
88+ from ansys .dpf .core .workflow_topology .exposed_pin import ExposedPinsCollection
8389
8490 if self ._exposed_outputs is None :
85- self ._exposed_outputs = ExposedPinsCollection (self ._container .get_property (
86- "exposed_outputs" , GenericDataContainersCollection ))
91+ self ._exposed_outputs = ExposedPinsCollection (
92+ self ._container .get_property ("exposed_outputs" , GenericDataContainersCollection )
93+ )
8794
8895 return self ._exposed_outputs
8996
9097 def __str__ (self ):
9198 from ansys .dpf .core .helpers .utils import indent
9299
93- indents = (" " , " - " )
100+ def indent_operators (operators ):
101+ indents = (" " , " - " )
102+ return "\n " .join ([indent (operator .name , * indents ) for operator in operators ])
103+
104+ indents = " "
94105 return (
95- "WorkflowData with properties:\n "
106+ "WorkflowTopology with properties:\n "
96107 f" - operators (len: { len (self .operators )} ):\n "
97- f"{ " \n " . join ([ indent ( operator . name , * indents ) for operator in self .operators ] )} \n "
108+ f"{ indent_operators ( self .operators )} \n "
98109 f" - operator_connections (len: { len (self .operator_connections )} ):\n "
99- f"{ indent (self .operator_connections , " " )} \n "
110+ f"{ indent (self .operator_connections , indents )} \n "
100111 f" - data_connections (len: { len (self .data_connections )} ):\n "
101- f"{ indent (self .data_connections , " " )} \n "
112+ f"{ indent (self .data_connections , indents )} \n "
102113 f" - exposed_inputs (len: { len (self .exposed_inputs )} ):\n "
103- f"{ indent (self .exposed_inputs , " " )} \n "
114+ f"{ indent (self .exposed_inputs , indents )} \n "
104115 f" - exposed_outputs (len: { len (self .exposed_outputs )} ):\n "
105- f"{ indent (self .exposed_outputs , " " ) } \n "
116+ f"{ indent (self .exposed_outputs , indents ) } "
106117 )
0 commit comments