Skip to content

Commit a2bdd51

Browse files
authored
Update to Version 0.1.0 (#3)
1 parent d5a67f2 commit a2bdd51

File tree

3 files changed

+62
-34
lines changed

3 files changed

+62
-34
lines changed

.github/workflows/pipeline.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
shell: bash -l {0}
2323
run: |
2424
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
25+
conda install -c conda-forge -y aiida-workgraph=0.5.2
2526
pip install --no-deps --no-build-isolation -e qe_xml_parser
2627
verdi presto --profile-name pwd
2728
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
@@ -43,6 +44,7 @@ jobs:
4344
shell: bash -l {0}
4445
run: |
4546
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
47+
conda install -c conda-forge -y jobflow=0.1.19
4648
pip install --no-deps --no-build-isolation -e qe_xml_parser
4749
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
4850
python test_with_jobflow.py
@@ -63,6 +65,29 @@ jobs:
6365
shell: bash -l {0}
6466
run: |
6567
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
68+
conda install -c conda-forge -y pyiron_base=0.11.11
6669
pip install --no-deps --no-build-isolation -e qe_xml_parser
6770
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
6871
python test_with_pyiron.py
72+
73+
cwl:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@v4
77+
- name: Conda config
78+
run: echo -e "channels:\n - conda-forge\n" > .condarc
79+
- uses: conda-incubator/setup-miniconda@v3
80+
with:
81+
python-version: "3.12"
82+
miniforge-version: latest
83+
condarc-file: .condarc
84+
environment-file: environment.yml
85+
- name: Test
86+
shell: bash -l {0}
87+
run: |
88+
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
89+
conda install -c conda-forge -y cwltool=3.1.20250110105449
90+
pip install --no-deps --no-build-isolation -e qe_xml_parser
91+
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
92+
python test_with_cwl.py
93+
cwltool --preserve-environment=ESPRESSO_PSEUDO workflow.cwl workflow.yml

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ channels:
22
- conda-forge
33
dependencies:
44
- python =3.12
5-
- python-workflow-definition =0.0.1
5+
- python-workflow-definition =0.1.0
66
- ase=3.24.0
77
- hatchling =1.27.0
88
- matplotlib=3.10.1

workflow.json

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
{
2+
"version": "0.1.0",
23
"nodes": [
3-
{"id": 0, "function": "workflow.get_bulk_structure"},
4-
{"id": 1, "function": "workflow.calculate_qe"},
5-
{"id": 2, "function": "workflow.generate_structures"},
6-
{"id": 3, "function": "workflow.calculate_qe"},
7-
{"id": 4, "function": "workflow.calculate_qe"},
8-
{"id": 5, "function": "workflow.calculate_qe"},
9-
{"id": 6, "function": "workflow.calculate_qe"},
10-
{"id": 7, "function": "workflow.calculate_qe"},
11-
{"id": 8, "function": "workflow.plot_energy_volume_curve"},
12-
{"id": 9, "value": "Al"},
13-
{"id": 10, "value": 4.05},
14-
{"id": 11, "value": true},
15-
{"id": 12, "value": "mini"},
16-
{"id": 13, "function": "python_workflow_definition.shared.get_dict"},
17-
{"id": 14, "value": {"Al": "Al.pbe-n-kjpaw_psl.1.0.0.UPF"}},
18-
{"id": 15, "value": [3, 3, 3]},
19-
{"id": 16, "value": "vc-relax"},
20-
{"id": 17, "value": 0.02},
21-
{"id": 18, "value": [0.9, 0.95, 1.0, 1.05, 1.1]},
22-
{"id": 19, "value": "strain_0"},
23-
{"id": 20, "function": "python_workflow_definition.shared.get_dict"},
24-
{"id": 21, "value": "scf"},
25-
{"id": 22, "value": "strain_1"},
26-
{"id": 23, "function": "python_workflow_definition.shared.get_dict"},
27-
{"id": 24, "value": "strain_2"},
28-
{"id": 25, "function": "python_workflow_definition.shared.get_dict"},
29-
{"id": 26, "value": "strain_3"},
30-
{"id": 27, "function": "python_workflow_definition.shared.get_dict"},
31-
{"id": 28, "value": "strain_4"},
32-
{"id": 29, "function": "python_workflow_definition.shared.get_dict"},
33-
{"id": 30, "function": "python_workflow_definition.shared.get_list"},
34-
{"id": 31, "function": "python_workflow_definition.shared.get_list"}
4+
{"id": 0, "type": "function", "value": "workflow.get_bulk_structure"},
5+
{"id": 1, "type": "function", "value": "workflow.calculate_qe"},
6+
{"id": 2, "type": "function", "value": "workflow.generate_structures"},
7+
{"id": 3, "type": "function", "value": "workflow.calculate_qe"},
8+
{"id": 4, "type": "function", "value": "workflow.calculate_qe"},
9+
{"id": 5, "type": "function", "value": "workflow.calculate_qe"},
10+
{"id": 6, "type": "function", "value": "workflow.calculate_qe"},
11+
{"id": 7, "type": "function", "value": "workflow.calculate_qe"},
12+
{"id": 8, "type": "function", "value": "workflow.plot_energy_volume_curve"},
13+
{"id": 9, "type": "input", "value": "Al", "name": "element"},
14+
{"id": 10, "type": "input", "value": 4.05, "name": "a"},
15+
{"id": 11, "type": "input", "value": true, "name": "cubic"},
16+
{"id": 12, "type": "input", "value": "mini", "name": "working_directory_0"},
17+
{"id": 13, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
18+
{"id": 14, "type": "input", "value": {"Al": "Al.pbe-n-kjpaw_psl.1.0.0.UPF"}, "name": "pseudopotentials"},
19+
{"id": 15, "type": "input", "value": [3, 3, 3], "name": "kpts"},
20+
{"id": 16, "type": "input", "value": "vc-relax", "name": "calculation_0"},
21+
{"id": 17, "type": "input", "value": 0.02, "name": "smearing"},
22+
{"id": 18, "type": "input", "value": [0.9, 0.95, 1.0, 1.05, 1.1], "name": "strain_lst"},
23+
{"id": 19, "type": "input", "value": "strain_0", "name": "working_directory_1"},
24+
{"id": 20, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
25+
{"id": 21, "type": "input", "value": "scf", "name": "calculation_1"},
26+
{"id": 22, "type": "input", "value": "strain_1", "name": "working_directory_2"},
27+
{"id": 23, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
28+
{"id": 24, "type": "input", "value": "strain_2", "name": "working_directory_3"},
29+
{"id": 25, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
30+
{"id": 26, "type": "input", "value": "strain_3", "name": "working_directory_4"},
31+
{"id": 27, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
32+
{"id": 28, "type": "input", "value": "strain_4", "name": "working_directory_5"},
33+
{"id": 29, "type": "function", "value": "python_workflow_definition.shared.get_dict"},
34+
{"id": 30, "type": "function", "value": "python_workflow_definition.shared.get_list"},
35+
{"id": 31, "type": "function", "value": "python_workflow_definition.shared.get_list"},
36+
{"id": 32, "type": "output", "name": "result"}
3537
],
3638
"edges": [
3739
{"target": 0, "targetPort": "element", "source": 9, "sourcePort": null},
@@ -92,6 +94,7 @@
9294
{"target": 31, "targetPort": "2", "source": 5, "sourcePort": "energy"},
9395
{"target": 31, "targetPort": "3", "source": 6, "sourcePort": "energy"},
9496
{"target": 31, "targetPort": "4", "source": 7, "sourcePort": "energy"},
95-
{"target": 8, "targetPort": "energy_lst", "source": 31, "sourcePort": null}
97+
{"target": 8, "targetPort": "energy_lst", "source": 31, "sourcePort": null},
98+
{"target": 32, "targetPort": null, "source": 8, "sourcePort": null}
9699
]
97100
}

0 commit comments

Comments
 (0)