Skip to content

Commit cb7cd1d

Browse files
committed
significant review of the state class: creating many new properties instead of setting sttributes with methods; changes to the connections between nodes
1 parent 457c423 commit cb7cd1d

File tree

5 files changed

+303
-163
lines changed

5 files changed

+303
-163
lines changed

pydra/engine/helpers_state.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _ordering(
5050
node_nm = el[0][1:]
5151
if node_nm not in other_states and state_fields:
5252
raise Exception(
53-
"can't ask for splitter from {}, other nodes that are connected: ".format(
53+
"can't ask for splitter from {}, other nodes that are connected: {}".format(
5454
node_nm, other_states.keys()
5555
)
5656
)
@@ -65,7 +65,7 @@ def _ordering(
6565
node_nm = el[1][1:]
6666
if node_nm not in other_states and state_fields:
6767
raise Exception(
68-
"can't ask for splitter from {}, other nodes that are connected: ".format(
68+
"can't ask for splitter from {}, other nodes that are connected: {}".format(
6969
node_nm, other_states.keys()
7070
)
7171
)
@@ -88,7 +88,7 @@ def _ordering(
8888
node_nm = el[0][1:]
8989
if node_nm not in other_states and state_fields:
9090
raise Exception(
91-
"can't ask for splitter from {}, other nodes that are connected: ".format(
91+
"can't ask for splitter from {}, other nodes that are connected: {}".format(
9292
node_nm, other_states.keys()
9393
)
9494
)
@@ -103,7 +103,7 @@ def _ordering(
103103
node_nm = el[1][1:]
104104
if node_nm not in other_states and state_fields:
105105
raise Exception(
106-
"can't ask for splitter from {}, other nodes that are connected: ".format(
106+
"can't ask for splitter from {}, other nodes that are connected: {}".format(
107107
node_nm, other_states.keys()
108108
)
109109
)
@@ -126,7 +126,7 @@ def _ordering(
126126
node_nm = el[1:]
127127
if node_nm not in other_states and state_fields:
128128
raise Exception(
129-
"can't ask for splitter from {}, other nodes that are connected: ".format(
129+
"can't ask for splitter from {}, other nodes that are connected: {}".format(
130130
node_nm, other_states.keys()
131131
)
132132
)
@@ -673,7 +673,7 @@ def _single_op_splits(
673673
inputs,
674674
inner_inputs,
675675
previous_states_ind,
676-
keys_fromLeftSpl,
676+
keys_fromLeftSpl, # TODO NOW do I need it?
677677
cont_dim=None,
678678
):
679679
if op_single.startswith("_"):
@@ -721,7 +721,9 @@ def _single_op_splits_groups(
721721
return [], {}, [], combiner
722722
else:
723723
raise Exception(
724-
"combiner {} not in splitter_rpn: {}".format(combiner[0], [op_single])
724+
"all fields from the combiner have to be in splitter_rpn: {}, but combiner: {} is set".format(
725+
[op_single], combiner
726+
)
725727
)
726728
else:
727729
return keys, groups, groups_stack, []

0 commit comments

Comments
 (0)