diff --git a/README.md b/README.md index 6e16756..26c2535 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ These two Python functions are combined in the following example workflow: tmp_dict = get_prod_and_div(x=1, y=2) result = get_sum(x=tmp_dict["prod"], y=tmp_dict["div"]) ``` -For the workflow representation of these Python functions the Python functions are stored in the [arithmetic_workflow.py](example_workflows/arithmetic/workflow.py) -Python module. The connection of the Python functions are stored in the [workflow_arithmetic.json](example_workflows/arithmetic/workflow.json) +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) +Python module. The connection of the Python functions are stored in the [example_workflows/arithmetic/workflow.json](example_workflows/arithmetic/workflow.json) JSON file: ``` { @@ -57,47 +57,47 @@ library. The corresponding Jupyter notebooks demonstrate this functionality: -| Example | Explanation | -|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| [aiida_arithmetic.ipynb](example_workflows/arithmetic/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. | -| [jobflow_arithmetic.ipynb](example_workflows/arithmetic/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. | -| [pyiron_base_arithmetic.ipynb](example_workflows/arithmetic/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. | -| [universal_workflow_arithmetic.ipynb](example_workflows/arithmetic/universal_workflow.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. | +| Example | Explanation | +|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| [example_workflows/arithmetic/aiida.ipynb](example_workflows/arithmetic/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. | +| [example_workflows/arithmetic/jobflow.ipynb](example_workflows/arithmetic/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. | +| [example_workflows/arithmetic/pyiron_base.ipynb](example_workflows/arithmetic/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. | +| [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. | ### Quantum Espresso Workflow The second workflow example is the calculation of an energy volume curve with Quantum Espresso. In the first step the initial structure is relaxed, afterward it is strained and the total energy is calculated. -* [quantum_espresso_workflow.py](example_workflows/quantum_espresso/workflow.py) Python functions -* [workflow_qe.json](example_workflows/quantum_espresso/workflow.json) Workflow definition in the Python Workflow Definition. -* [environment_qe.yml](example_workflows/quantum_espresso/environment.yml) Conda environment +* [example_workflows/quantum_espresso/workflow.py](example_workflows/quantum_espresso/workflow.py) Python functions +* [example_workflows/quantum_espresso/workflow.json](example_workflows/quantum_espresso/workflow.json) Workflow definition in the Python Workflow Definition. +* [example_workflows/quantum_espresso/environment.yml](example_workflows/quantum_espresso/environment.yml) Conda environment -| Example | Explanation | -|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| [aiida_qe.ipynb](example_workflows/quantum_espresso/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. | -| [jobflow_qe.ipynb](example_workflows/quantum_espresso/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. | -| [pyiron_base_qe.ipynb](example_workflows/quantum_espresso/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. | -| [universal_workflow_qe.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. | +| Example | Explanation | +|----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| [example_workflows/quantum_espresso/aiida.ipynb](example_workflows/quantum_espresso/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. | +| [example_workflows/quantum_espresso/jobflow.ipynb](example_workflows/quantum_espresso/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. | +| [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. | +| [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. | ### NFDI4Ing Scientific Workflow Requirements 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) is implemented for all three simulation codes based on a shared workflow definition. -* [nfdi_ing_workflow.py](example_workflows/nfdi/workflow.py) Python functions -* [workflow_nfdi.json](example_workflows/nfdi/workflow.json) Workflow definition in the Python Workflow Definition. +* [example_workflows/nfdi/workflow.py](example_workflows/nfdi/workflow.py) Python functions +* [example_workflows/nfdi/workflow.json](example_workflows/nfdi/workflow.json) Workflow definition in the Python Workflow Definition. Additional source files provided with the workflow benchmark: -* [source/envs/preprocessing.yaml](example_workflows/nfdi/source/envs/preprocessing.yaml) Conda environment for preprocessing -* [source/envs/processing.yaml](example_workflows/nfdi/source/envs/processing.yaml) Conda environment for processing -* [source/envs/postprocessing.yaml](example_workflows/nfdi/source/envs/postprocessing.yaml) Conda environment for postprocessing -* [source/macros.tex.template](example_workflows/nfdi/source/macros.tex.template) LaTeX module template -* [source/paper.tex](example_workflows/nfdi/source/paper.tex) LaTeX paper template -* [source/poisson.py](example_workflows/nfdi/source/poisson.py) Poisson Python script -* [source/postprocessing.py](example_workflows/nfdi/source/postprocessing.py) Postprocessing Python script -* [source/prepare_paper_macros.py](example_workflows/nfdi/source/prepare_paper_macros.py) LaTeX preprocessing Python script -* [source/unit_square.geo](example_workflows/nfdi/source/unit_square.geo) Input structure +* [example_workflows/nfdi/source/envs/preprocessing.yaml](example_workflows/nfdi/source/envs/preprocessing.yaml) Conda environment for preprocessing +* [example_workflows/nfdi/source/envs/processing.yaml](example_workflows/nfdi/source/envs/processing.yaml) Conda environment for processing +* [example_workflows/nfdi/source/envs/postprocessing.yaml](example_workflows/nfdi/source/envs/postprocessing.yaml) Conda environment for postprocessing +* [example_workflows/nfdi/source/macros.tex.template](example_workflows/nfdi/source/macros.tex.template) LaTeX module template +* [example_workflows/nfdi/source/paper.tex](example_workflows/nfdi/source/paper.tex) LaTeX paper template +* [example_workflows/nfdi/source/poisson.py](example_workflows/nfdi/source/poisson.py) Poisson Python script +* [example_workflows/nfdi/source/postprocessing.py](example_workflows/nfdi/source/postprocessing.py) Postprocessing Python script +* [example_workflows/nfdi/source/prepare_paper_macros.py](example_workflows/nfdi/source/prepare_paper_macros.py) LaTeX preprocessing Python script +* [example_workflows/nfdi/source/unit_square.geo](example_workflows/nfdi/source/unit_square.geo) Input structure -| Example | Explanation | -|----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| [aiida_nfdi.ipynb](example_workflows/nfdi/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. | -| [jobflow_nfdi.ipynb](example_workflows/nfdi/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. | -| [pyiron_base_nfdi.ipynb](example_workflows/nfdi/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. | -| [universal_workflow_nfdi.ipynb](example_workflows/nfdi/universal_workflow.ipynb) | Execute workflow defined in the Python Workflow Definition with aiida, executorlib, jobflow, pyiron_base and pure Python. | \ No newline at end of file +| Example | Explanation | +|----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| [example_workflows/nfdi/aiida.ipynb](example_workflows/nfdi/aiida.ipynb) | Define Workflow with aiida and execute it with jobflow and pyiron_base. | +| [example_workflows/nfdi/jobflow.ipynb](example_workflows/nfdi/jobflow.ipynb) | Define Workflow with jobflow and execute it with aiida and pyiron_base. | +| [example_workflows/nfdi/pyiron_base.ipynb](example_workflows/nfdi/pyiron_base.ipynb) | Define Workflow with pyiron_base and execute it with aiida and jobflow. | +| [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. | \ No newline at end of file diff --git a/documentation/arithmetic.md b/documentation/arithmetic.md index 3e4e7a6..59f07ae 100644 --- a/documentation/arithmetic.md +++ b/documentation/arithmetic.md @@ -12,14 +12,14 @@ These two Python functions are combined in the following example workflow: tmp_dict = get_prod_and_div(x=1, y=2) result = get_sum(x=tmp_dict["prod"], y=tmp_dict["div"]) ``` -For the workflow representation of these Python functions the Python functions are stored in the [arithmetic_workflow.py](example_workflows/arithmetic/arithmetic_workflow.py) -Python module. The connection of the Python functions are stored in the [workflow_arithmetic.json](example_workflows/arithmetic/workflow_arithmetic.json) +For the workflow representation of these Python functions the Python functions are stored in the [workflow.py](example_workflows/arithmetic/workflow.py) +Python module. The connection of the Python functions are stored in the [workflow.json](example_workflows/arithmetic/workflow.json) JSON file: ``` { "nodes": [ - {"id": 0, "function": "arithmetic_workflow.get_prod_and_div"}, - {"id": 1, "function": "arithmetic_workflow.get_sum"}, + {"id": 0, "function": "workflow.get_prod_and_div"}, + {"id": 1, "function": "workflow.get_sum"}, {"id": 2, "value": 1}, {"id": 3, "value": 2} ], diff --git a/documentation/intro.md b/documentation/intro.md index ad4d1d4..0b28a3b 100644 --- a/documentation/intro.md +++ b/documentation/intro.md @@ -17,5 +17,5 @@ Currently supported workflow engines: ## Example Workflows Three workflows are implemented: * Simple workflow coupling two python functions -* Calculation of an energy volume curve with quantum espresso +* Calculation of an [energy volume curve with quantum espresso](https://materialdigital.github.io/ADIS2023/) * File based workflow benchmark from [NFDI4Ing](https://www.inggrid.org/article/id/3726/)