Skip to content

Commit f35e707

Browse files
committed
fix dictionary conversion
1 parent 3fccc36 commit f35e707

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

python_workflow_definition/src/python_workflow_definition/aiida.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323

2424
def load_workflow_json(file_name: str) -> WorkGraph:
25-
data = PythonWorkflowDefinitionWorkflow.load_json_file(file_name=file_name)
25+
data = remove_result(
26+
workflow_dict=PythonWorkflowDefinitionWorkflow.load_json_file(
27+
file_name=file_name
28+
)
29+
)
2630

2731
wg = WorkGraph()
2832
task_name_mapping = {}

python_workflow_definition/src/python_workflow_definition/executorlib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ def _get_value(result_dict: dict, nodes_new_dict: dict, link_dict: dict, exe: Ex
3838

3939

4040
def load_workflow_json(file_name: str, exe: Executor):
41-
content = PythonWorkflowDefinitionWorkflow.load_json_file(file_name=file_name)
41+
content = remove_result(
42+
workflow_dict=PythonWorkflowDefinitionWorkflow.load_json_file(
43+
file_name=file_name
44+
)
45+
)
4246

4347
edges_new_lst = content[EDGES_LABEL]
4448
nodes_new_dict = {}

python_workflow_definition/src/python_workflow_definition/jobflow.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ def _get_item_from_tuple(input_obj, index, index_lst):
272272

273273

274274
def load_workflow_json(file_name: str) -> Flow:
275-
content = PythonWorkflowDefinitionWorkflow.load_json_file(file_name=file_name)
275+
content = remove_result(
276+
workflow_dict=PythonWorkflowDefinitionWorkflow.load_json_file(
277+
file_name=file_name
278+
)
279+
)
276280

277281
edges_new_lst = []
278282
for edge in content[EDGES_LABEL]:

python_workflow_definition/src/python_workflow_definition/purepython.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ def _get_value(result_dict: dict, nodes_new_dict: dict, link_dict: dict):
6767

6868

6969
def load_workflow_json(file_name: str):
70-
content = PythonWorkflowDefinitionWorkflow.load_json_file(file_name=file_name)
70+
content = remove_result(
71+
workflow_dict=PythonWorkflowDefinitionWorkflow.load_json_file(
72+
file_name=file_name
73+
)
74+
)
7175

7276
edges_new_lst = content[EDGES_LABEL]
7377
nodes_new_dict = {}

python_workflow_definition/src/python_workflow_definition/pyiron_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ def load_workflow_json(file_name: str, project: Optional[Project] = None):
230230
if project is None:
231231
project = Project(".")
232232

233-
content = PythonWorkflowDefinitionWorkflow.load_json_file(file_name=file_name)
233+
content = remove_result(
234+
workflow_dict=PythonWorkflowDefinitionWorkflow.load_json_file(
235+
file_name=file_name
236+
)
237+
)
234238

235239
edges_new_lst = content[EDGES_LABEL]
236240
nodes_new_dict = {}

0 commit comments

Comments
 (0)