Skip to content

Commit 33c1e9d

Browse files
committed
set result node
1 parent b0b87d0 commit 33c1e9d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

python_workflow_definition/src/python_workflow_definition/aiida.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
convert_nodes_list_to_dict,
1212
update_node_names,
1313
remove_result,
14+
set_result_node,
1415
NODES_LABEL,
1516
EDGES_LABEL,
1617
SOURCE_LABEL,
@@ -137,6 +138,6 @@ def write_workflow_json(wg: WorkGraph, file_name: str) -> dict:
137138
)
138139
with open(file_name, "w") as f:
139140
# json.dump({"nodes": data[], "edges": edges_new_lst}, f)
140-
json.dump(update_node_names(workflow_dict=data), f, indent=2)
141+
json.dump(set_result_node(workflow_dict=update_node_names(workflow_dict=data)), f, indent=2)
141142

142143
return data

python_workflow_definition/src/python_workflow_definition/jobflow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
update_node_names,
1414
convert_nodes_list_to_dict,
1515
remove_result,
16+
set_result_node,
1617
NODES_LABEL,
1718
EDGES_LABEL,
1819
SOURCE_LABEL,
@@ -333,9 +334,9 @@ def write_workflow_json(flow: Flow, file_name: str = "workflow.json"):
333334

334335
with open(file_name, "w") as f:
335336
json.dump(
336-
update_node_names(
337+
set_result_node(workflow_dict=update_node_names(
337338
workflow_dict={NODES_LABEL: nodes_store_lst, EDGES_LABEL: edges_lst}
338-
),
339+
)),
339340
f,
340341
indent=2,
341342
)

python_workflow_definition/src/python_workflow_definition/pyiron_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
convert_nodes_list_to_dict,
1414
update_node_names,
1515
remove_result,
16+
set_result_node,
1617
NODES_LABEL,
1718
EDGES_LABEL,
1819
SOURCE_LABEL,
@@ -294,9 +295,9 @@ def write_workflow_json(
294295

295296
with open(file_name, "w") as f:
296297
json.dump(
297-
update_node_names(
298+
set_result_node(workflow_dict=update_node_names(
298299
workflow_dict={NODES_LABEL: nodes_store_lst, EDGES_LABEL: edges_new_lst}
299-
),
300+
)),
300301
f,
301302
indent=2,
302303
)

0 commit comments

Comments
 (0)