Skip to content

Commit 28b6ac4

Browse files
committed
Move examples to separate folder
1 parent d9c919c commit 28b6ac4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3178
-53
lines changed

.github/workflows/pipeline.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ jobs:
1919
- name: Installation and setup
2020
shell: bash -l {0}
2121
run: |
22-
pip install -e qe_xml_parser
2322
pip install -e python_workflow_definition
2423
conda install -c conda-forge jupyter papermill
2524
verdi presto --profile-name pwd
2625
sudo apt-get install -y $(cat apt.txt)
2726
- name: Create Additional Conda Environments
2827
shell: bash -l {0}
2928
run: |
30-
conda env create -n preprocessing -f source/envs/preprocessing.yaml -y
31-
conda env create -n processing -f source/envs/processing.yaml -y
32-
conda env create -n postprocessing -f source/envs/postprocessing.yaml -y
29+
conda env create -n preprocessing -f example_workflows/nfdi/source/envs/preprocessing.yaml -y
30+
conda env create -n processing -f example_workflows/nfdi/source/envs/processing.yaml -y
31+
conda env create -n postprocessing -f example_workflows/nfdi/source/envs/postprocessing.yaml -y
3332
- name: Tests
3433
shell: bash -l {0}
3534
run: |
35+
cd example_workflows/nfdi/
3636
papermill aiida_nfdi.ipynb aiida_nfdi_out.ipynb -k "python3"
3737
papermill jobflow_nfdi.ipynb jobflow_nfdi_out.ipynb -k "python3"
3838
papermill pyiron_base_nfdi.ipynb pyiron_base_nfdi_out.ipynb -k "python3"
@@ -54,14 +54,16 @@ jobs:
5454
- name: Installation and setup
5555
shell: bash -l {0}
5656
run: |
57-
pip install -e qe_xml_parser
57+
pip install -e example_workflows/quantum_espresso/qe_xml_parser
5858
pip install -e python_workflow_definition
5959
conda install -c conda-forge jupyter papermill
6060
verdi presto --profile-name pwd
6161
- name: Tests
6262
shell: bash -l {0}
6363
run: |
6464
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
65+
cp -r example_workflows/quantum_espresso/espresso .
66+
cd example_workflows/quantum_espresso
6567
papermill aiida_qe.ipynb aiida_qe_out.ipynb -k "python3"
6668
papermill jobflow_qe.ipynb jobflow_qe_out.ipynb -k "python3"
6769
papermill pyiron_base_qe.ipynb pyiron_base_qe_out.ipynb -k "python3"
@@ -86,6 +88,7 @@ jobs:
8688
- name: Tests
8789
shell: bash -l {0}
8890
run: |
91+
cd example_workflows/arithmetic
8992
papermill aiida_arithmetic.ipynb aiida_arithmetic_out.ipynb -k "python3"
9093
papermill jobflow_arithmetic.ipynb jobflow_arithmetic_out.ipynb -k "python3"
9194
papermill pyiron_base_arithmetic.ipynb pyiron_base_arithmetic_out.ipynb -k "python3"

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ These two Python functions are combined in the following example workflow:
2727
tmp_dict = get_prod_and_div(x=1, y=2)
2828
result = get_sum(x=tmp_dict["prod"], y=tmp_dict["div"])
2929
```
30-
For the workflow representation of these Python functions the Python functions are stored in the [arithmetic_workflow.py](arithmetic_workflow.py)
31-
Python module. The connection of the Python functions are stored in the [workflow_arithmetic.json](workflow_arithmetic.json)
30+
For the workflow representation of these Python functions the Python functions are stored in the [arithmetic_workflow.py](example_workflows/arithmetic/arithmetic_workflow.py)
31+
Python module. The connection of the Python functions are stored in the [workflow_arithmetic.json](example_workflows/arithmetic/workflow_arithmetic.json)
3232
JSON file:
3333
```
3434
{
@@ -59,45 +59,45 @@ The corresponding Jupyter notebooks demonstrate this functionality:
5959

6060
| Example | Explanation |
6161
|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
62-
| [aiida_arithmetic.ipynb](aiida_arithmetic.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
63-
| [jobflow_arithmetic.ipynb](jobflow_arithmetic.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
64-
| [pyiron_base_arithmetic.ipynb](pyiron_base_arithmetic.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
65-
| [universal_workflow_arithmetic.ipynb](universal_workflow_arithmetic.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
62+
| [aiida_arithmetic.ipynb](example_workflows/arithmetic/aiida_arithmetic.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
63+
| [jobflow_arithmetic.ipynb](example_workflows/arithmetic/jobflow_arithmetic.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
64+
| [pyiron_base_arithmetic.ipynb](example_workflows/arithmetic/pyiron_base_arithmetic.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
65+
| [universal_workflow_arithmetic.ipynb](example_workflows/arithmetic/universal_workflow_arithmetic.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
6666

6767
### Quantum Espresso Workflow
6868
The second workflow example is the calculation of an energy volume curve with Quantum Espresso. In the first step the
6969
initial structure is relaxed, afterward it is strained and the total energy is calculated.
70-
* [quantum_espresso_workflow.py](quantum_espresso_workflow.py) Python functions
71-
* [workflow_qe.json](workflow_qe.json) Workflow definition in the Python Workflow Definition.
72-
* [environment_qe.yml](environment_qe.yml) Conda environment
70+
* [quantum_espresso_workflow.py](example_workflows/quantum_espresso/quantum_espresso_workflow.py) Python functions
71+
* [workflow_qe.json](example_workflows/quantum_espresso/workflow_qe.json) Workflow definition in the Python Workflow Definition.
72+
* [environment_qe.yml](example_workflows/quantum_espresso/environment_qe.yml) Conda environment
7373

7474
| Example | Explanation |
7575
|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
76-
| [aiida_qe.ipynb](aiida_qe.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
77-
| [jobflow_qe.ipynb](jobflow_qe.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
78-
| [pyiron_base_qe.ipynb](pyiron_base_qe.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
79-
| [universal_workflow_qe.ipynb](universal_workflow_qe.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
76+
| [aiida_qe.ipynb](example_workflows/quantum_espresso/aiida_qe.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
77+
| [jobflow_qe.ipynb](example_workflows/quantum_espresso/jobflow_qe.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
78+
| [pyiron_base_qe.ipynb](example_workflows/quantum_espresso/pyiron_base_qe.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
79+
| [universal_workflow_qe.ipynb](example_workflows/quantum_espresso/universal_workflow_qe.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
8080

8181
### NFDI4Ing Scientific Workflow Requirements
8282
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)
8383
is implemented for all three simulation codes based on a shared workflow definition.
84-
* [nfdi_ing_workflow.py](nfdi_ing_workflow.py) Python functions
85-
* [workflow_nfdi.json](workflow_nfdi.json) Workflow definition in the Python Workflow Definition.
84+
* [nfdi_ing_workflow.py](example_workflows/nfdi/nfdi_ing_workflow.py) Python functions
85+
* [workflow_nfdi.json](example_workflows/nfdi/workflow_nfdi.json) Workflow definition in the Python Workflow Definition.
8686

8787
Additional source files provided with the workflow benchmark:
88-
* [source/envs/preprocessing.yaml](source/envs/preprocessing.yaml) Conda environment for preprocessing
89-
* [source/envs/processing.yaml](source/envs/processing.yaml) Conda environment for processing
90-
* [source/envs/postprocessing.yaml](source/envs/postprocessing.yaml) Conda environment for postprocessing
91-
* [source/macros.tex.template](source/macros.tex.template) LaTeX module template
92-
* [source/paper.tex](source/paper.tex) LaTeX paper template
93-
* [source/poisson.py](source/poisson.py) Poisson Python script
94-
* [source/postprocessing.py](source/postprocessing.py) Postprocessing Python script
95-
* [source/prepare_paper_macros.py](source/prepare_paper_macros.py) LaTeX preprocessing Python script
96-
* [source/unit_square.geo](source/unit_square.geo) Input structure
88+
* [source/envs/preprocessing.yaml](example_workflows/nfdi/source/envs/preprocessing.yaml) Conda environment for preprocessing
89+
* [source/envs/processing.yaml](example_workflows/nfdi/source/envs/processing.yaml) Conda environment for processing
90+
* [source/envs/postprocessing.yaml](example_workflows/nfdi/source/envs/postprocessing.yaml) Conda environment for postprocessing
91+
* [source/macros.tex.template](example_workflows/nfdi/source/macros.tex.template) LaTeX module template
92+
* [source/paper.tex](example_workflows/nfdi/source/paper.tex) LaTeX paper template
93+
* [source/poisson.py](example_workflows/nfdi/source/poisson.py) Poisson Python script
94+
* [source/postprocessing.py](example_workflows/nfdi/source/postprocessing.py) Postprocessing Python script
95+
* [source/prepare_paper_macros.py](example_workflows/nfdi/source/prepare_paper_macros.py) LaTeX preprocessing Python script
96+
* [source/unit_square.geo](example_workflows/nfdi/source/unit_square.geo) Input structure
9797

9898
| Example | Explanation |
9999
|----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
100-
| [aiida_nfdi.ipynb](aiida_nfdi.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
101-
| [jobflow_nfdi.ipynb](jobflow_nfdi.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
102-
| [pyiron_base_nfdi.ipynb](pyiron_base_nfdi.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
103-
| [universal_workflow_nfdi.ipynb](universal_workflow_nfdi.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |
100+
| [aiida_nfdi.ipynb](example_workflows/nfdi/aiida_nfdi.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. |
101+
| [jobflow_nfdi.ipynb](example_workflows/nfdi/jobflow_nfdi.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. |
102+
| [pyiron_base_nfdi.ipynb](example_workflows/nfdi/pyiron_base_nfdi.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. |
103+
| [universal_workflow_nfdi.ipynb](example_workflows/nfdi/universal_workflow_nfdi.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. |

0 commit comments

Comments
 (0)