Skip to content

Fix jobflow loading pyiron_base #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pyiron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
pip install -e python_workflow_definition
conda install -c conda-forge jupyter papermill
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
papermill universal_qe_to_pyiron_base.ipynb universal_qe_to_pyiron_base_out.ipynb -k "python3"
papermill universal_qe_to_pyiron_base.ipynb universal_qe_to_pyiron_base_out.ipynb -k "python3"
papermill pyiron_base_to_jobflow.ipynb pyiron_base_to_jobflow_out.ipynb -k "python3"
1 change: 1 addition & 0 deletions pyiron_base_to_jobflow.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def get_attr_helper(obj, source_handle):
obj=memory_dict[vw['source']], source_handle=vw['sourceHandle'])
for kw, vw in total_dict[k].items()
}
print(k, kwargs)
# print(k, kwargs)
memory_dict[k] = fn(**kwargs)
return list(memory_dict.values())

Expand Down Expand Up @@ -193,7 +193,20 @@ def load_workflow_json(file_name):
with open(file_name, "r") as f:
content = json.load(f)

edges_new_lst = content["edges"]
edges_new_lst = []
for edge in content["edges"]:
if edge['sourceHandle'] is None:
edges_new_lst.append(edge)
else:
edges_new_lst.append(
{
'target': edge['target'],
'targetHandle': edge['targetHandle'],
'source': edge['source'],
'sourceHandle': str(edge['sourceHandle']),
}
)

nodes_new_dict = {}
for k, v in content["nodes"].items():
if isinstance(v, str) and "." in v:
Expand Down
Loading