Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
add the nested examples
  • Loading branch information
JaGeo committed Oct 23, 2025
commit 3bbda19814ae5abcd8bbee8d7af13dad370e10e9
35 changes: 35 additions & 0 deletions example_workflows/nested/jobflow.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "initial_id",
"metadata": {
"collapsed": true
},
"outputs": [],
"source": "from python_workflow_definition.aiida import load_workflow_json"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
14 changes: 14 additions & 0 deletions example_workflows/nested/main.pwd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.1.1",
"nodes": [
{ "id": 0, "type": "workflow", "value": "prod_div.json" },
{ "id": 1, "value": 1, "type": "input", "name": "a" },
{ "id": 2, "value": 2, "type": "input", "name": "b" },
{ "id": 3, "type": "output", "name": "final_result" }
],
"edges": [
{ "target": 0, "targetPort": "x", "source": 1, "sourcePort": null },
{ "target": 0, "targetPort": "y", "source": 2, "sourcePort": null },
{ "target": 3, "targetPort": "null", "source": 0, "sourcePort": "result" }
]
}
19 changes: 19 additions & 0 deletions example_workflows/nested/prod_div.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.1.1",
"nodes": [
{ "id": 0, "type": "function", "value": "workflow.get_prod_and_div" },
{ "id": 1, "type": "function", "value": "workflow.get_sum" },
{ "id": 2, "type": "function", "value": "workflow.get_square" },
{ "id": 3, "type": "input", "value": 1, "name": "x" },
{ "id": 4, "type": "input", "value": 2, "name": "y" },
{ "id": 5, "type": "output", "name": "result" }
],
"edges": [
{ "target": 0, "targetPort": "x", "source": 3, "sourcePort": null },
{ "target": 0, "targetPort": "y", "source": 4, "sourcePort": null },
{ "target": 1, "targetPort": "x", "source": 0, "sourcePort": "prod" },
{ "target": 1, "targetPort": "y", "source": 0, "sourcePort": "div" },
{ "target": 2, "targetPort": "x", "source": 1, "sourcePort": null },
{ "target": 5, "targetPort": null, "source": 2, "sourcePort": null }
]
}
Loading