python-workflow-definition 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. python_workflow_definition-0.1.2/.condarc +3 -0
  2. python_workflow_definition-0.1.2/.github/workflows/deploy.yml +35 -0
  3. python_workflow_definition-0.1.2/.github/workflows/pipeline.yml +161 -0
  4. python_workflow_definition-0.1.2/.github/workflows/pypi.yml +31 -0
  5. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/.gitignore +2 -2
  6. python_workflow_definition-0.1.2/CITATION.cff +40 -0
  7. python_workflow_definition-0.1.2/LICENSE +29 -0
  8. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/PKG-INFO +12 -8
  9. python_workflow_definition-0.1.2/README.md +119 -0
  10. python_workflow_definition-0.1.2/binder/apt.txt +2 -0
  11. python_workflow_definition-0.1.2/binder/environment.yml +17 -0
  12. python_workflow_definition-0.1.2/binder/postBuild +8 -0
  13. python_workflow_definition-0.1.2/binder/setup-miniconda-patched-environment.yml +18 -0
  14. python_workflow_definition-0.1.2/documentation/_config.yml +13 -0
  15. python_workflow_definition-0.1.2/documentation/_toc.yml +20 -0
  16. python_workflow_definition-0.1.2/documentation/arithmetic.md +44 -0
  17. python_workflow_definition-0.1.2/documentation/conclusion.md +3 -0
  18. python_workflow_definition-0.1.2/documentation/environment.yml +4 -0
  19. python_workflow_definition-0.1.2/documentation/evcurve.md +4 -0
  20. python_workflow_definition-0.1.2/documentation/intro.md +21 -0
  21. python_workflow_definition-0.1.2/documentation/nfdi.md +4 -0
  22. python_workflow_definition-0.1.2/example_workflows/arithmetic/aiida.ipynb +270 -0
  23. python_workflow_definition-0.1.2/example_workflows/arithmetic/cwl.ipynb +97 -0
  24. python_workflow_definition-0.1.2/example_workflows/arithmetic/jobflow.ipynb +410 -0
  25. python_workflow_definition-0.1.2/example_workflows/arithmetic/pyiron_base.ipynb +322 -0
  26. python_workflow_definition-0.1.2/example_workflows/arithmetic/pyiron_workflow.ipynb +920 -0
  27. python_workflow_definition-0.1.2/example_workflows/arithmetic/universal_workflow.ipynb +357 -0
  28. python_workflow_definition-0.1.2/example_workflows/arithmetic/workflow.json +19 -0
  29. python_workflow_definition-0.1.2/example_workflows/arithmetic/workflow.py +10 -0
  30. python_workflow_definition-0.1.2/example_workflows/nfdi/aiida.ipynb +398 -0
  31. python_workflow_definition-0.1.2/example_workflows/nfdi/cwl.ipynb +159 -0
  32. python_workflow_definition-0.1.2/example_workflows/nfdi/jobflow.ipynb +370 -0
  33. python_workflow_definition-0.1.2/example_workflows/nfdi/pyiron_base.ipynb +355 -0
  34. python_workflow_definition-0.1.2/example_workflows/nfdi/pyiron_workflow.ipynb +1 -0
  35. python_workflow_definition-0.1.2/example_workflows/nfdi/source/envs/postprocessing.yaml +5 -0
  36. python_workflow_definition-0.1.2/example_workflows/nfdi/source/envs/preprocessing.yaml +5 -0
  37. python_workflow_definition-0.1.2/example_workflows/nfdi/source/envs/processing.yaml +5 -0
  38. python_workflow_definition-0.1.2/example_workflows/nfdi/source/macros.tex.template +3 -0
  39. python_workflow_definition-0.1.2/example_workflows/nfdi/source/paper.tex +22 -0
  40. python_workflow_definition-0.1.2/example_workflows/nfdi/source/poisson.py +108 -0
  41. python_workflow_definition-0.1.2/example_workflows/nfdi/source/postprocessing.py +54 -0
  42. python_workflow_definition-0.1.2/example_workflows/nfdi/source/prepare_paper_macros.py +43 -0
  43. python_workflow_definition-0.1.2/example_workflows/nfdi/source/unit_square.geo +9 -0
  44. python_workflow_definition-0.1.2/example_workflows/nfdi/universal_workflow.ipynb +357 -0
  45. python_workflow_definition-0.1.2/example_workflows/nfdi/workflow.json +33 -0
  46. python_workflow_definition-0.1.2/example_workflows/nfdi/workflow.py +135 -0
  47. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/aiida.ipynb +5799 -0
  48. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/cwl.ipynb +117 -0
  49. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/environment.yml +9 -0
  50. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/espresso/pseudo/Al.pbe-n-kjpaw_psl.1.0.0.UPF +18497 -0
  51. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/jobflow.ipynb +5747 -0
  52. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/pyiron_base.ipynb +4993 -0
  53. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/pyiron_workflow.ipynb +6015 -0
  54. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/qe_xml_parser/pyproject.toml +13 -0
  55. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/qe_xml_parser/src/qe_xml_parser/parsers.py +70 -0
  56. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/qe_xml_parser/src/qe_xml_parser/schemas/__init__.py +0 -0
  57. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/qe_xml_parser/src/qe_xml_parser/schemas/qes_230310.xsd +1384 -0
  58. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/universal_workflow.ipynb +505 -0
  59. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/workflow.json +100 -0
  60. python_workflow_definition-0.1.2/example_workflows/quantum_espresso/workflow.py +88 -0
  61. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/pyproject.toml +16 -10
  62. python_workflow_definition-0.1.2/src/python_workflow_definition/__init__.py +0 -0
  63. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/aiida.py +30 -24
  64. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/executorlib.py +1 -1
  65. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/pyiron_base.py +2 -2
  66. python_workflow_definition-0.1.2/src/python_workflow_definition/pyiron_workflow.py +407 -0
  67. {python_workflow_definition-0.1.0/src/python_workflow_definition → python_workflow_definition-0.1.2/example_workflows/quantum_espresso/qe_xml_parser/src/qe_xml_parser}/__init__.py +0 -0
  68. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/cwl/__init__.py +0 -0
  69. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/cwl/__main__.py +0 -0
  70. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/jobflow.py +0 -0
  71. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/models.py +0 -0
  72. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/plot.py +0 -0
  73. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/purepython.py +0 -0
  74. {python_workflow_definition-0.1.0 → python_workflow_definition-0.1.2}/src/python_workflow_definition/shared.py +0 -0
@@ -0,0 +1,3 @@
1
+ channels:
2
+ - conda-forge
3
+
@@ -0,0 +1,35 @@
1
+ name: Deploy
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+ documentation:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Conda config
13
+ run: echo -e "channels:\n - conda-forge\n" > .condarc
14
+ - uses: conda-incubator/setup-miniconda@v3
15
+ with:
16
+ python-version: "3.12"
17
+ miniforge-version: latest
18
+ condarc-file: .condarc
19
+ environment-file: documentation/environment.yml
20
+ - name: Install Jupyterbook
21
+ shell: bash -l {0}
22
+ run: |
23
+ cp documentation/_config.yml .
24
+ cp documentation/_toc.yml .
25
+ cp documentation/*.md .
26
+ jupyter-book build . --path-output public
27
+ mv public/_build/html public_html
28
+ touch public_html/.nojekyll
29
+ - name: Deploy 🚀
30
+ uses: JamesIves/github-pages-deploy-action@3.7.1
31
+ with:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+ BRANCH: gh-pages # The branch the action should deploy to.
34
+ FOLDER: public_html # The folder the action should deploy.
35
+ CLEAN: true
@@ -0,0 +1,161 @@
1
+ name: Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+
8
+ jobs:
9
+ black:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: psf/black@stable
14
+ with:
15
+ options: "--check --diff"
16
+ src: ./src/python_workflow_definition
17
+ - uses: psf/black@stable
18
+ with:
19
+ options: "--check --diff"
20
+ src: ./example_workflows/quantum_espresso/qe_xml_parser/src/qe_xml_parser
21
+
22
+ pip_check:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Conda config
27
+ run: echo -e "channels:\n - conda-forge\n" > .condarc
28
+ - name: Setup Mambaforge
29
+ uses: conda-incubator/setup-miniconda@v3
30
+ with:
31
+ python-version: "3.12"
32
+ miniforge-version: latest
33
+ condarc-file: .condarc
34
+ environment-file: binder/environment.yml
35
+ - name: Pip check
36
+ shell: bash -l {0}
37
+ run: |
38
+ pip install --no-deps --no-build-isolation -e .
39
+ pip check
40
+
41
+ nfdi4ing:
42
+ runs-on: ubuntu-22.04
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - name: Conda config
46
+ run: echo -e "channels:\n - conda-forge\n" > .condarc
47
+ - uses: conda-incubator/setup-miniconda@v3
48
+ with:
49
+ python-version: "3.12"
50
+ miniforge-version: latest
51
+ condarc-file: .condarc
52
+ environment-file: binder/environment.yml
53
+ - name: Installation and setup
54
+ shell: bash -l {0}
55
+ run: |
56
+ pip install --no-deps --no-build-isolation -e .
57
+ conda install -c conda-forge jupyter papermill
58
+ verdi presto --profile-name pwd
59
+ sudo apt-get install -y $(cat binder/apt.txt)
60
+ - name: Create Additional Conda Environments
61
+ shell: bash -l {0}
62
+ run: |
63
+ conda env create -n preprocessing -f example_workflows/nfdi/source/envs/preprocessing.yaml -y
64
+ conda env create -n processing -f example_workflows/nfdi/source/envs/processing.yaml -y
65
+ conda env create -n postprocessing -f example_workflows/nfdi/source/envs/postprocessing.yaml -y
66
+ - name: Tests
67
+ shell: bash -l {0}
68
+ run: |
69
+ cd example_workflows/nfdi/
70
+ papermill aiida.ipynb aiida_out.ipynb -k "python3"
71
+ papermill cwl.ipynb cwl_out.ipynb -k "python3"
72
+ papermill jobflow.ipynb jobflow_out.ipynb -k "python3"
73
+ papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3"
74
+ papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3"
75
+ papermill universal_workflow.ipynb universal_workflow_out.ipynb -k "python3"
76
+
77
+ quantumespresso:
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - uses: actions/checkout@v4
81
+ - name: Setup environment
82
+ shell: bash -l {0}
83
+ run: |
84
+ echo -e "channels:\n - conda-forge\n" > .condarc
85
+ tail --lines=+4 example_workflows/quantum_espresso/environment.yml >> binder/environment.yml
86
+ - uses: conda-incubator/setup-miniconda@v3
87
+ with:
88
+ python-version: "3.12"
89
+ miniforge-version: latest
90
+ condarc-file: .condarc
91
+ environment-file: binder/environment.yml
92
+ - name: Installation and setup
93
+ shell: bash -l {0}
94
+ run: |
95
+ pip install --no-deps --no-build-isolation -e example_workflows/quantum_espresso/qe_xml_parser
96
+ pip install --no-deps --no-build-isolation -e .
97
+ conda install -c conda-forge jupyter papermill
98
+ verdi presto --profile-name pwd
99
+ - name: Tests
100
+ shell: bash -l {0}
101
+ run: |
102
+ export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
103
+ cp -r example_workflows/quantum_espresso/espresso .
104
+ cd example_workflows/quantum_espresso
105
+ papermill aiida.ipynb aiida_out.ipynb -k "python3"
106
+ papermill cwl.ipynb cwl_out.ipynb -k "python3"
107
+ papermill jobflow.ipynb jobflow_out.ipynb -k "python3"
108
+ papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3"
109
+ papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3"
110
+ papermill universal_workflow.ipynb universal_workflow_out.ipynb -k "python3"
111
+
112
+ arithmetic:
113
+ runs-on: ubuntu-latest
114
+ steps:
115
+ - uses: actions/checkout@v4
116
+ - name: Conda config
117
+ run: echo -e "channels:\n - conda-forge\n" > .condarc
118
+ - uses: conda-incubator/setup-miniconda@v3
119
+ with:
120
+ python-version: "3.12"
121
+ miniforge-version: latest
122
+ condarc-file: .condarc
123
+ environment-file: binder/environment.yml
124
+ - name: Installation and setup
125
+ shell: bash -l {0}
126
+ run: |
127
+ pip install --no-deps --no-build-isolation -e .
128
+ conda install -c conda-forge jupyter papermill
129
+ verdi presto --profile-name pwd
130
+ - name: Tests
131
+ shell: bash -l {0}
132
+ run: |
133
+ cd example_workflows/arithmetic
134
+ papermill aiida.ipynb aiida_out.ipynb -k "python3"
135
+ papermill cwl.ipynb cwl_out.ipynb -k "python3"
136
+ papermill jobflow.ipynb jobflow_out.ipynb -k "python3"
137
+ papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3"
138
+ papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3"
139
+ papermill universal_workflow.ipynb universal_workflow_out.ipynb -k "python3"
140
+
141
+ documentation:
142
+ runs-on: ubuntu-latest
143
+ steps:
144
+ - uses: actions/checkout@v4
145
+ - name: Conda config
146
+ run: echo -e "channels:\n - conda-forge\n" > .condarc
147
+ - uses: conda-incubator/setup-miniconda@v3
148
+ with:
149
+ python-version: "3.12"
150
+ miniforge-version: latest
151
+ condarc-file: .condarc
152
+ environment-file: documentation/environment.yml
153
+ - name: Install Jupyterbook
154
+ shell: bash -l {0}
155
+ run: |
156
+ cp documentation/_config.yml .
157
+ cp documentation/_toc.yml .
158
+ cp documentation/*.md .
159
+ jupyter-book build . --path-output public
160
+ mv public/_build/html public_html
161
+ touch public_html/.nojekyll
@@ -0,0 +1,31 @@
1
+ name: Pypi
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ release:
10
+ if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
11
+ runs-on: ubuntu-latest
12
+ environment:
13
+ name: pypi
14
+ url: https://pypi.org/p/python_workflow_definition
15
+ permissions:
16
+ id-token: write
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Conda config
20
+ run: echo -e "channels:\n - conda-forge\n" > .condarc
21
+ - uses: conda-incubator/setup-miniconda@v3
22
+ with:
23
+ python-version: "3.12"
24
+ miniforge-version: latest
25
+ condarc-file: .condarc
26
+ environment-file: binder/environment.yml
27
+ - name: Build
28
+ shell: bash -l {0}
29
+ run: hatchling build -t sdist -t wheel
30
+ - name: Publish distribution 📦 to PyPI
31
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -178,7 +178,7 @@ cython_debug/
178
178
  input_tmp.in
179
179
  pyiron.log
180
180
  pyiron_draw.png
181
- python_workflow_definition/src/python_workflow_definition/__pycache__/
181
+ src/python_workflow_definition/__pycache__/
182
182
  test/
183
183
  mini/
184
184
  evcurve.png
@@ -199,4 +199,4 @@ jobflow_to_aiida_qe.json
199
199
  aiida_to_jobflow_qe.json
200
200
  pyiron_base_to_aiida_simple.json
201
201
  pyiron_base_to_jobflow_qe.json
202
-
202
+ **/*.h5
@@ -0,0 +1,40 @@
1
+ cff-version: "1.2.0"
2
+ authors:
3
+ - family-names: Janssen
4
+ given-names: Jan
5
+ orcid: "https://orcid.org/0000-0001-9948-7119"
6
+ - family-names: George
7
+ given-names: Janine
8
+ orcid: "https://orcid.org/0000-0001-8907-0336"
9
+ - family-names: Geiger
10
+ given-names: Julian
11
+ orcid: "https://orcid.org/0000-0003-0023-1960"
12
+ - family-names: Bercx
13
+ given-names: Marnik
14
+ orcid: "https://orcid.org/0000-0001-8470-1012"
15
+ - family-names: Wang
16
+ given-names: Xing
17
+ - family-names: Ertural
18
+ given-names: Christina
19
+ orcid: "https://orcid.org/0000-0002-7696-5824"
20
+ - family-names: Schaarschmidt
21
+ given-names: Joerg
22
+ orcid: "https://orcid.org/0000-0002-4389-2366"
23
+ - family-names: Ganose
24
+ given-names: Alex
25
+ orcid: "https://orcid.org/0000-0002-4486-3321"
26
+ - family-names: Pizzi
27
+ given-names: Giovanni
28
+ orcid: "https://orcid.org/0000-0002-3583-4377"
29
+ - family-names: Hickel
30
+ given-names: Tilmann
31
+ orcid: "https://orcid.org/0000-0003-0698-4891"
32
+ - family-names: Neugebauer
33
+ given-names: Joerg
34
+ orcid: "https://orcid.org/0000-0002-7903-2472"
35
+ title: "A Python workflow definition for computational materials design"
36
+ version: 0.1.1
37
+ doi: 10.1039/D5DD00231A
38
+ date-released: 2025-10-25
39
+ license: bsd-3-clause
40
+ url: "https://github.com/pythonworkflow/python-workflow-definition"
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Jan Janssen
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_workflow_definition
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python Workflow Definition - workflow interoperability for aiida, jobflow and pyiron
5
5
  Author-email: Jan Janssen <janssen@mpie.de>, Janine George <janine.geogre@bam.de>, Julian Geiger <julian.geiger@psi.ch>, Xing Wang <xing.wang@psi.ch>, Marnik Bercx <marnik.bercx@psi.ch>, Christina Ertural <christina.ertural@bam.de>
6
6
  License: BSD 3-Clause License
@@ -32,12 +32,16 @@ License: BSD 3-Clause License
32
32
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
33
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
34
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
- Requires-Dist: aiida-workgraph<=0.5.2,>=0.5.1
36
- Requires-Dist: jobflow<=0.1.19,>=0.1.18
37
- Requires-Dist: numpy<2,>=1.21
38
- Requires-Dist: pydantic<=2.11.4,>=2.7.0
39
- Requires-Dist: pyiron-base<=0.11.11,>=0.11.10
35
+ License-File: LICENSE
36
+ Requires-Dist: numpy>=1.21
37
+ Requires-Dist: pydantic<=2.12.4,>=2.7.0
38
+ Provides-Extra: aiida
39
+ Requires-Dist: aiida-workgraph<=0.7.6,>=0.5.1; extra == 'aiida'
40
+ Provides-Extra: jobflow
41
+ Requires-Dist: jobflow<=0.2.1,>=0.1.18; extra == 'jobflow'
40
42
  Provides-Extra: plot
41
- Requires-Dist: ipython<=9.0.2,>=7.33.0; extra == 'plot'
42
- Requires-Dist: networkx<=3.4.2,>=2.8.8; extra == 'plot'
43
+ Requires-Dist: ipython<=9.8.0,>=7.33.0; extra == 'plot'
44
+ Requires-Dist: networkx<=3.5,>=2.8.8; extra == 'plot'
43
45
  Requires-Dist: pygraphviz<=1.14,>=1.10; extra == 'plot'
46
+ Provides-Extra: pyiron
47
+ Requires-Dist: pyiron-base<=0.15.10,>=0.11.10; extra == 'pyiron'
@@ -0,0 +1,119 @@
1
+ # Python Workflow Definition
2
+ [![Pipeline](https://github.com/pythonworkflow/python-workflow-definition/actions/workflows/pipeline.yml/badge.svg)](https://github.com/pythonworkflow/python-workflow-definition/actions/workflows/pipeline.yml)
3
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pythonworkflow/python-workflow-definition/HEAD)
4
+ [![DOI](https://zenodo.org/badge/945869529.svg)](https://doi.org/10.5281/zenodo.15516179)
5
+
6
+ ## Definition
7
+ In the Python Workflow Definition (PWD) each node represents a Python function, with the edges defining the connection
8
+ between input and output of the different Python functions.
9
+
10
+ Published in: [J. Janssen, J. George, J. Geiger, M. Bercx, X. Wang, C. Ertural, J. Schaarschmidt, A.M. Ganose, G. Pizzi, T. Hickel and J. Neugebauer. A python workflow definition for computational materials design. Digital Discovery, 2025](https://doi.org/10.1039/D5DD00231A)
11
+
12
+ ## Format
13
+ Each workflow consists of three files, a Python module which defines the individual Pythons, a JSON file which defines
14
+ the connections between the different Python functions and a conda environment file to define the software dependencies.
15
+ The files are not intended to be human readable, but rather interact as a machine readable exchange format between the
16
+ different workflow engines to enable interoperability.
17
+
18
+ ## Installation
19
+ The Python Workflow Definition can either be installed via pypi or via conda. For the [pypi installation](https://pypi.org/project/python-workflow-definition/) use:
20
+ ```
21
+ pip install python-workflow-definition
22
+ ```
23
+ For the conda installation via the [conda-forge community channel](https://anaconda.org/conda-forge/python-workflow-definition) use:
24
+ ```
25
+ conda install conda-forge::python-workflow-definition
26
+ ```
27
+
28
+ ## Examples
29
+ ### Simple Example
30
+ As a first example we define two Python functions which add multiple inputs:
31
+ ```python
32
+ def get_sum(x, y):
33
+ return x + y
34
+
35
+ def get_prod_and_div(x: float, y: float) -> dict:
36
+ return {"prod": x * y, "div": x / y}
37
+ ```
38
+ These two Python functions are combined in the following example workflow:
39
+ ```python
40
+ def combined_workflow(x=1, y=2):
41
+ tmp_dict = get_prod_and_div(x=x, y=y)
42
+ return get_sum(x=tmp_dict["prod"], y=tmp_dict["div"])
43
+ ```
44
+ For the workflow representation of these Python functions the Python functions are stored in the [example_workflows/arithmetic/workflow.py](example_workflows/arithmetic/workflow.py)
45
+ Python module. The connection of the Python functions are stored in the [example_workflows/arithmetic/workflow.json](example_workflows/arithmetic/workflow.json)
46
+ JSON file:
47
+ ```JSON
48
+ {
49
+ "nodes": [
50
+ {"id": 0, "type": "function", "value": "workflow.get_prod_and_div"},
51
+ {"id": 1, "type": "function", "value": "workflow.get_sum"},
52
+ {"id": 2, "type": "input", "value": 1, "name": "x"},
53
+ {"id": 3, "type": "input", "value": 2, "name": "y"},
54
+ {"id": 4, "type": "output", "name": "result"}
55
+ ],
56
+ "edges": [
57
+ {"target": 0, "targetPort": "x", "source": 2, "sourcePort": null},
58
+ {"target": 0, "targetPort": "y", "source": 3, "sourcePort": null},
59
+ {"target": 1, "targetPort": "x", "source": 0, "sourcePort": "prod"},
60
+ {"target": 1, "targetPort": "y", "source": 0, "sourcePort": "div"},
61
+ {"target": 4, "targetPort": null, "source": 1, "sourcePort": null}
62
+ ]
63
+ }
64
+ ```
65
+ The abbreviations in the definition of the edges are:
66
+ * `target` - target node
67
+ * `targetPort` - target port - for a node with multiple input parameters the target port specifies which input parameter to use.
68
+ * `source` - source node
69
+ * `sourcePort` - source port - for a node with multiple output parameters the source port specifies which output parameter to use.
70
+
71
+ As the workflow does not require any additional resources, as it is only using built-in functionality of the Python standard
72
+ library.
73
+
74
+ The corresponding Jupyter notebooks demonstrate this functionality:
75
+
76
+ | Example | Explanation |
77
+ |----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
78
+ | [example_workflows/arithmetic/aiida.ipynb](example_workflows/arithmetic/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
79
+ | [example_workflows/arithmetic/jobflow.ipynb](example_workflows/arithmetic/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
80
+ | [example_workflows/arithmetic/pyiron_base.ipynb](example_workflows/arithmetic/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
81
+ | [example_workflows/arithmetic/universal_workflow.ipynb](example_workflows/arithmetic/universal_workflow.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
82
+
83
+ ### Quantum Espresso Workflow
84
+ The second workflow example is the calculation of an energy volume curve with Quantum Espresso. In the first step the
85
+ initial structure is relaxed, afterward it is strained and the total energy is calculated.
86
+ * [example_workflows/quantum_espresso/workflow.py](example_workflows/quantum_espresso/workflow.py) Python functions
87
+ * [example_workflows/quantum_espresso/workflow.json](example_workflows/quantum_espresso/workflow.json) Workflow definition in the Python Workflow Definition.
88
+ * [example_workflows/quantum_espresso/environment.yml](example_workflows/quantum_espresso/environment.yml) Conda environment
89
+
90
+ | Example | Explanation |
91
+ |----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
92
+ | [example_workflows/quantum_espresso/aiida.ipynb](example_workflows/quantum_espresso/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
93
+ | [example_workflows/quantum_espresso/jobflow.ipynb](example_workflows/quantum_espresso/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
94
+ | [example_workflows/quantum_espresso/pyiron_base.ipynb](example_workflows/quantum_espresso/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
95
+ | [example_workflows/quantum_espresso/universal_workflow.ipynb](example_workflows/quantum_espresso/universal_workflow.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
96
+
97
+ ### NFDI4Ing Scientific Workflow Requirements
98
+ To demonstrate the compatibility of the Python Workflow Definition to file based workflows, the workflow benchmark developed as part of [NFDI4Ing](https://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements)
99
+ is implemented for all three simulation codes based on a shared workflow definition.
100
+ * [example_workflows/nfdi/workflow.py](example_workflows/nfdi/workflow.py) Python functions
101
+ * [example_workflows/nfdi/workflow.json](example_workflows/nfdi/workflow.json) Workflow definition in the Python Workflow Definition.
102
+
103
+ Additional source files provided with the workflow benchmark:
104
+ * [example_workflows/nfdi/source/envs/preprocessing.yaml](example_workflows/nfdi/source/envs/preprocessing.yaml) Conda environment for preprocessing
105
+ * [example_workflows/nfdi/source/envs/processing.yaml](example_workflows/nfdi/source/envs/processing.yaml) Conda environment for processing
106
+ * [example_workflows/nfdi/source/envs/postprocessing.yaml](example_workflows/nfdi/source/envs/postprocessing.yaml) Conda environment for postprocessing
107
+ * [example_workflows/nfdi/source/macros.tex.template](example_workflows/nfdi/source/macros.tex.template) LaTeX module template
108
+ * [example_workflows/nfdi/source/paper.tex](example_workflows/nfdi/source/paper.tex) LaTeX paper template
109
+ * [example_workflows/nfdi/source/poisson.py](example_workflows/nfdi/source/poisson.py) Poisson Python script
110
+ * [example_workflows/nfdi/source/postprocessing.py](example_workflows/nfdi/source/postprocessing.py) Postprocessing Python script
111
+ * [example_workflows/nfdi/source/prepare_paper_macros.py](example_workflows/nfdi/source/prepare_paper_macros.py) LaTeX preprocessing Python script
112
+ * [example_workflows/nfdi/source/unit_square.geo](example_workflows/nfdi/source/unit_square.geo) Input structure
113
+
114
+ | Example | Explanation |
115
+ |----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
116
+ | [example_workflows/nfdi/aiida.ipynb](example_workflows/nfdi/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
117
+ | [example_workflows/nfdi/jobflow.ipynb](example_workflows/nfdi/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
118
+ | [example_workflows/nfdi/pyiron_base.ipynb](example_workflows/nfdi/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
119
+ | [example_workflows/nfdi/universal_workflow.ipynb](example_workflows/nfdi/universal_workflow.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
@@ -0,0 +1,2 @@
1
+ libgl1-mesa-glx
2
+ libegl1-mesa
@@ -0,0 +1,17 @@
1
+ channels:
2
+ - conda-forge
3
+ dependencies:
4
+ - python =3.12
5
+ - click =8.1.8
6
+ - pydantic =2.12.4
7
+ - hatchling =1.27.0
8
+ - httpcore =1.0.7
9
+ - jobflow =0.2.1
10
+ - pyiron_base =0.15.10
11
+ - pyiron_workflow =0.15.4
12
+ - pygraphviz =1.14
13
+ - aiida-workgraph =0.7.6
14
+ - plumpy =0.25.0
15
+ - conda_subprocess =0.0.10
16
+ - networkx =3.4.2
17
+ - cwltool =3.1.20251031082601
@@ -0,0 +1,8 @@
1
+ conda env create -n preprocessing -f example_workflows/nfdi/source/envs/preprocessing.yaml -y
2
+ conda env create -n processing -f example_workflows/nfdi/source/envs/processing.yaml -y
3
+ conda env create -n postprocessing -f example_workflows/nfdi/source/envs/postprocessing.yaml -y
4
+ conda env update --name base --file example_workflows/quantum_espresso/environment.yml
5
+ pip install -e example_workflows/quantum_espresso/qe_xml_parser
6
+ pip install -e python_workflow_definition
7
+ verdi presto --profile-name pwd
8
+ mv example_workflows/quantum_espresso/espresso ~
@@ -0,0 +1,18 @@
1
+ channels:
2
+ - conda-forge
3
+ dependencies:
4
+ - python =3.12
5
+ - click =8.1.8
6
+ - pydantic =2.12.4
7
+ - hatchling =1.27.0
8
+ - httpcore =1.0.7
9
+ - jobflow =0.2.1
10
+ - pyiron_base =0.15.10
11
+ - pyiron_workflow =0.15.4
12
+ - pygraphviz =1.14
13
+ - aiida-workgraph =0.7.6
14
+ - plumpy =0.25.0
15
+ - conda_subprocess =0.0.10
16
+ - networkx =3.4.2
17
+ - cwltool =3.1.20251031082601
18
+ - python=3.12
@@ -0,0 +1,13 @@
1
+ title: Python Workflow Definition
2
+ author: Jan Janssen
3
+
4
+ execute:
5
+ execute_notebooks : off
6
+
7
+ repository:
8
+ url : https://github.com/pythonworkflow/python-workflow-definition
9
+ path_to_book : ""
10
+
11
+ launch_buttons:
12
+ notebook_interface : jupyterlab
13
+ binderhub_url : https://mybinder.org
@@ -0,0 +1,20 @@
1
+ format: jb-book
2
+ root: README
3
+ chapters:
4
+ - file: intro.md
5
+ - file: arithmetic.md
6
+ sections:
7
+ - file: example_workflows/arithmetic/aiida.ipynb
8
+ - file: example_workflows/arithmetic/jobflow.ipynb
9
+ - file: example_workflows/arithmetic/pyiron_base.ipynb
10
+ - file: evcurve.md
11
+ sections:
12
+ - file: example_workflows/quantum_espresso/aiida.ipynb
13
+ - file: example_workflows/quantum_espresso/jobflow.ipynb
14
+ - file: example_workflows/quantum_espresso/pyiron_base.ipynb
15
+ - file: nfdi.md
16
+ sections:
17
+ - file: example_workflows/nfdi/aiida.ipynb
18
+ - file: example_workflows/nfdi/jobflow.ipynb
19
+ - file: example_workflows/nfdi/pyiron_base.ipynb
20
+ - file: conclusion.md
@@ -0,0 +1,44 @@
1
+ # Arithmetic Workflow
2
+ As a first example we define two Python functions which add multiple inputs:
3
+ ```python
4
+ def get_sum(x, y):
5
+ return x + y
6
+
7
+ def get_prod_and_div(x: float, y: float) -> dict:
8
+ return {"prod": x * y, "div": x / y}
9
+ ```
10
+ These two Python functions are combined in the following example workflow:
11
+ ```python
12
+ def combined_workflow(x=1, y=2):
13
+ tmp_dict = get_prod_and_div(x=x, y=y)
14
+ return get_sum(x=tmp_dict["prod"], y=tmp_dict["div"])
15
+ ```
16
+ For the workflow representation of these Python functions the Python functions are stored in the [workflow.py](example_workflows/arithmetic/workflow.py)
17
+ Python module. The connection of the Python functions are stored in the [workflow.json](example_workflows/arithmetic/workflow.json)
18
+ JSON file:
19
+ ```
20
+ {
21
+ "nodes": [
22
+ {"id": 0, "type": "function", "value": "workflow.get_prod_and_div"},
23
+ {"id": 1, "type": "function", "value": "workflow.get_sum"},
24
+ {"id": 2, "type": "input", "value": 1, "name": "x"},
25
+ {"id": 3, "type": "input", "value": 2, "name": "y"},
26
+ {"id": 4, "type": "output", "name": "result"}
27
+ ],
28
+ "edges": [
29
+ {"target": 0, "targetPort": "x", "source": 2, "sourcePort": null},
30
+ {"target": 0, "targetPort": "y", "source": 3, "sourcePort": null},
31
+ {"target": 1, "targetPort": "x", "source": 0, "sourcePort": "prod"},
32
+ {"target": 1, "targetPort": "y", "source": 0, "sourcePort": "div"},
33
+ {"target": 4, "targetPort": null, "source": 1, "sourcePort": null}
34
+ ]
35
+ }
36
+ ```
37
+ The abbreviations in the definition of the edges are:
38
+ * `target` - target node
39
+ * `targetPort` - target port - for a node with multiple input parameters the target port specifies which input parameter to use.
40
+ * `source` - source node
41
+ * `sourcePort` - source port - for a node with multiple output parameters the source port specifies which output parameter to use.
42
+
43
+ As the workflow does not require any additional resources, as it is only using built-in functionality of the Python standard
44
+ library.
@@ -0,0 +1,3 @@
1
+ # Conclusion
2
+ Based on the Python Workflow Definition three rather different workflows were implemented in rather different workflow
3
+ engines. This demonstrates the interoperability achieved with the Python Workflow Definition.
@@ -0,0 +1,4 @@
1
+ channels:
2
+ - conda-forge
3
+ dependencies:
4
+ - jupyter-book <2
@@ -0,0 +1,4 @@
1
+ # Energy Volume Curve
2
+ Based on [previous work](https://materialdigital.github.io/ADIS2023/README.html) from the [ADIS 2023 workshop](https://www.mpie.de/4902385/adis2023)
3
+ the calculation of an energy volume curve with the [quantum espresso](https://www.quantum-espresso.org) density
4
+ functional theory (DFT) simulation code is implemented in the Python Workflow Definition.
@@ -0,0 +1,21 @@
1
+ # Definition
2
+ In the Python Workflow Definition (PWD) each node represents a Python function, with the edges defining the connection
3
+ between input and output of the different Python functions.
4
+
5
+ ## Format
6
+ Each workflow consists of three files, a Python module which defines the individual Pythons, a JSON file which defines
7
+ the connections between the different Python functions and a conda environment file to define the software dependencies.
8
+ The files are not intended to be human readable, but rather interact as a machine readable exchange format between the
9
+ different workflow engines to enable interoperability.
10
+
11
+ ## Workflow Engines
12
+ Currently supported workflow engines:
13
+ * [aiida-workgraph](https://github.com/aiidateam/aiida-workgraph)
14
+ * [jobflow](https://github.com/materialsproject/jobflow)
15
+ * [pyiron_base](https://github.com/pyiron/pyiron_base)
16
+
17
+ ## Example Workflows
18
+ Three workflows are implemented:
19
+ * Simple workflow coupling two python functions
20
+ * Calculation of an [energy volume curve with quantum espresso](https://materialdigital.github.io/ADIS2023/)
21
+ * File based workflow benchmark from [NFDI4Ing](https://www.inggrid.org/article/id/3726/)
@@ -0,0 +1,4 @@
1
+ # NFDI4Ing Benchmark
2
+ To demonstrate the compatibility of the Python Workflow Definition to file based workflows, the workflow benchmark
3
+ developed as part of [NFDI4Ing](https://www.inggrid.org/article/id/3726/) is implemented for all three simulation codes
4
+ based on the Python Workflow Definition.