Skip to content
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
25 changes: 25 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
shell: bash -l {0}
run: |
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
conda install -c conda-forge -y aiida-workgraph=0.5.2
pip install --no-deps --no-build-isolation -e qe_xml_parser
verdi presto --profile-name pwd
echo -e 'from aiida import load_profile\nload_profile()\n\nfrom python_workflow_definition.aiida import load_workflow_json\n\n\nif __name__ == "__main__":\n workgraph = load_workflow_json(file_name="workflow.json")\n workgraph.run()' > test_with_aiida.py
Expand All @@ -43,6 +44,7 @@ jobs:
shell: bash -l {0}
run: |
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
conda install -c conda-forge -y jobflow=0.1.19
pip install --no-deps --no-build-isolation -e qe_xml_parser
echo -e 'from jobflow.managers.local import run_locally\nfrom python_workflow_definition.jobflow import load_workflow_json\n\n\nif __name__ == "__main__":\n flow = load_workflow_json(file_name="workflow.json")\n print(run_locally(flow))' > test_with_jobflow.py
python test_with_jobflow.py
Expand All @@ -63,6 +65,29 @@ jobs:
shell: bash -l {0}
run: |
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
conda install -c conda-forge -y pyiron_base=0.11.11
pip install --no-deps --no-build-isolation -e qe_xml_parser
echo -e 'from python_workflow_definition.pyiron_base import load_workflow_json\n\n\nif __name__ == "__main__":\n delayed_object_lst = load_workflow_json(file_name="workflow.json")\n print(delayed_object_lst[-1].pull())' > test_with_pyiron.py
python test_with_pyiron.py

cwl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Conda config
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: environment.yml
- name: Test
shell: bash -l {0}
run: |
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
conda install -c conda-forge -y cwltool=3.1.20250110105449
pip install --no-deps --no-build-isolation -e qe_xml_parser
echo -e 'from python_workflow_definition.cwl import write_workflow\n\n\nif __name__ == "__main__":\n write_workflow(file_name="workflow.json")' > test_with_cwl.py
python test_with_cwl.py
cwltool --preserve-environment=ESPRESSO_PSEUDO workflow.cwl workflow.yml
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ channels:
- conda-forge
dependencies:
- python =3.12
- python-workflow-definition =0.0.1
- python-workflow-definition =0.1.0
- ase=3.24.0
- hatchling =1.27.0
- matplotlib=3.10.1
Expand Down
69 changes: 36 additions & 33 deletions workflow.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
{
"version": "0.1.0",
"nodes": [
{"id": 0, "function": "workflow.get_bulk_structure"},
{"id": 1, "function": "workflow.calculate_qe"},
{"id": 2, "function": "workflow.generate_structures"},
{"id": 3, "function": "workflow.calculate_qe"},
{"id": 4, "function": "workflow.calculate_qe"},
{"id": 5, "function": "workflow.calculate_qe"},
{"id": 6, "function": "workflow.calculate_qe"},
{"id": 7, "function": "workflow.calculate_qe"},
{"id": 8, "function": "workflow.plot_energy_volume_curve"},
{"id": 9, "value": "Al"},
{"id": 10, "value": 4.05},
{"id": 11, "value": true},
{"id": 12, "value": "mini"},
{"id": 13, "function": "python_workflow_definition.shared.get_dict"},
{"id": 14, "value": {"Al": "Al.pbe-n-kjpaw_psl.1.0.0.UPF"}},
{"id": 15, "value": [3, 3, 3]},
{"id": 16, "value": "vc-relax"},
{"id": 17, "value": 0.02},
{"id": 18, "value": [0.9, 0.95, 1.0, 1.05, 1.1]},
{"id": 19, "value": "strain_0"},
{"id": 20, "function": "python_workflow_definition.shared.get_dict"},
{"id": 21, "value": "scf"},
{"id": 22, "value": "strain_1"},
{"id": 23, "function": "python_workflow_definition.shared.get_dict"},
{"id": 24, "value": "strain_2"},
{"id": 25, "function": "python_workflow_definition.shared.get_dict"},
{"id": 26, "value": "strain_3"},
{"id": 27, "function": "python_workflow_definition.shared.get_dict"},
{"id": 28, "value": "strain_4"},
{"id": 29, "function": "python_workflow_definition.shared.get_dict"},
{"id": 30, "function": "python_workflow_definition.shared.get_list"},
{"id": 31, "function": "python_workflow_definition.shared.get_list"}
{"id": 0, "type": "function", "value": "workflow.get_bulk_structure"},
{"id": 1, "type": "function", "value": "workflow.calculate_qe"},
{"id": 2, "type": "function", "value": "workflow.generate_structures"},
{"id": 3, "type": "function", "value": "workflow.calculate_qe"},
{"id": 4, "type": "function", "value": "workflow.calculate_qe"},
{"id": 5, "type": "function", "value": "workflow.calculate_qe"},
{"id": 6, "type": "function", "value": "workflow.calculate_qe"},
{"id": 7, "type": "function", "value": "workflow.calculate_qe"},
{"id": 8, "type": "function", "value": "workflow.plot_energy_volume_curve"},
{"id": 9, "type": "input", "value": "Al", "name": "element"},
{"id": 10, "type": "input", "value": 4.05, "name": "a"},
{"id": 11, "type": "input", "value": true, "name": "cubic"},
{"id": 12, "type": "input", "value": "mini", "name": "working_directory_0"},
{"id": 13, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
{"id": 14, "type": "input", "value": {"Al": "Al.pbe-n-kjpaw_psl.1.0.0.UPF"}, "name": "pseudopotentials"},
{"id": 15, "type": "input", "value": [3, 3, 3], "name": "kpts"},
{"id": 16, "type": "input", "value": "vc-relax", "name": "calculation_0"},
{"id": 17, "type": "input", "value": 0.02, "name": "smearing"},
{"id": 18, "type": "input", "value": [0.9, 0.95, 1.0, 1.05, 1.1], "name": "strain_lst"},
{"id": 19, "type": "input", "value": "strain_0", "name": "working_directory_1"},
{"id": 20, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
{"id": 21, "type": "input", "value": "scf", "name": "calculation_1"},
{"id": 22, "type": "input", "value": "strain_1", "name": "working_directory_2"},
{"id": 23, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
{"id": 24, "type": "input", "value": "strain_2", "name": "working_directory_3"},
{"id": 25, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
{"id": 26, "type": "input", "value": "strain_3", "name": "working_directory_4"},
{"id": 27, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
{"id": 28, "type": "input", "value": "strain_4", "name": "working_directory_5"},
{"id": 29, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
{"id": 30, "type": "function", "value": "python_workflow_definition.shared.get_list"},
{"id": 31, "type": "function", "value": "python_workflow_definition.shared.get_list"},
{"id": 32, "type": "output", "name": "result"}
],
"edges": [
{"target": 0, "targetPort": "element", "source": 9, "sourcePort": null},
Expand Down Expand Up @@ -92,6 +94,7 @@
{"target": 31, "targetPort": "2", "source": 5, "sourcePort": "energy"},
{"target": 31, "targetPort": "3", "source": 6, "sourcePort": "energy"},
{"target": 31, "targetPort": "4", "source": 7, "sourcePort": "energy"},
{"target": 8, "targetPort": "energy_lst", "source": 31, "sourcePort": null}
{"target": 8, "targetPort": "energy_lst", "source": 31, "sourcePort": null},
{"target": 32, "targetPort": null, "source": 8, "sourcePort": null}
]
}
Loading