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
84 changes: 84 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Pipeline

on:
push:
branches: [ main ]
pull_request:

jobs:
nfdi4ing:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Conda config
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v4
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: environment.yml
- name: Installation and setup
shell: bash -l {0}
run: |
conda install -c conda-forge jupyter papermill
sudo apt-get install -y $(cat apt.txt)
- name: Create Additional Conda Environments
shell: bash -l {0}
run: |
conda env create -n preprocessing -f nfdi/source/envs/preprocessing.yaml -y
conda env create -n processing -f nfdi/source/envs/processing.yaml -y
conda env create -n postprocessing -f nfdi/source/envs/postprocessing.yaml -y
- name: Tests
shell: bash -l {0}
run: |
cd nfdi/
papermill pyironflow.ipynb pyironflow_out.ipynb -k "python3"

quantumespresso:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup environment
shell: bash -l {0}
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v4
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: environment.yml
- name: Installation and setup
shell: bash -l {0}
run: |
pip install --no-deps --no-build-isolation -e quantum_espresso/qe_xml_parser
conda install -c conda-forge jupyter papermill
- name: Tests
shell: bash -l {0}
run: |
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
cp -r quantum_espresso/espresso .
cd quantum_espresso
papermill pyironflow.ipynb pyironflow_out.ipynb -k "python3"

arithmetic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Conda config
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v4
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: environment.yml
- name: Installation and setup
shell: bash -l {0}
run: |
conda install -c conda-forge jupyter papermill
- name: Tests
shell: bash -l {0}
run: |
cd arithmetic
papermill pyironflow.ipynb pyironflow_out.ipynb -k "python3"
2 changes: 2 additions & 0 deletions apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libgl1-mesa-glx
libegl1-mesa
80 changes: 12 additions & 68 deletions arithmetic/workflow.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,19 @@
{
"version": "0.1.0",
"nodes": [
{
"id": 0,
"type": "function",
"value": "workflow.get_prod_and_div"
},
{
"id": 1,
"type": "function",
"value": "workflow.get_sum"
},
{
"id": 2,
"type": "function",
"value": "workflow.get_square"
},
{
"id": 3,
"type": "input",
"name": "x",
"value": 1
},
{
"id": 4,
"type": "input",
"name": "y",
"value": 2
},
{
"id": 5,
"type": "output",
"name": "result"
}
{"id": 0, "type": "function", "value": "workflow.get_prod_and_div"},
{"id": 1, "type": "function", "value": "workflow.get_sum"},
{"id": 2, "type": "function", "value": "workflow.get_square"},
{"id": 3, "type": "input", "value": 1, "name": "x"},
{"id": 4, "type": "input", "value": 2, "name": "y"},
{"id": 5, "type": "output", "name": "result"}
],
"edges": [
{
"target": 1,
"targetPort": "y",
"source": 0,
"sourcePort": "div"
},
{
"target": 1,
"targetPort": "x",
"source": 0,
"sourcePort": "prod"
},
{
"target": 2,
"targetPort": "x",
"source": 1,
"sourcePort": null
},
{
"target": 0,
"targetPort": "x",
"source": 3,
"sourcePort": null
},
{
"target": 0,
"targetPort": "y",
"source": 4,
"sourcePort": null
},
{
"target": 5,
"targetPort": null,
"source": 2,
"sourcePort": null
}
{"target": 0, "targetPort": "x", "source": 3, "sourcePort": null},
{"target": 0, "targetPort": "y", "source": 4, "sourcePort": null},
{"target": 1, "targetPort": "x", "source": 0, "sourcePort": "prod"},
{"target": 1, "targetPort": "y", "source": 0, "sourcePort": "div"},
{"target": 2, "targetPort": "x", "source": 1, "sourcePort": null},
{"target": 5, "targetPort": null, "source": 2, "sourcePort": null}
]
}
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ channels:
- conda-forge
dependencies:
- python =3.12
- hatchling =1.32.4
- pyiron_workflow =0.17.0
- pyironflow =0.0.24
- python-workflow-definition =0.1.5
Expand Down
175 changes: 26 additions & 149 deletions nfdi/workflow.json
Original file line number Diff line number Diff line change
@@ -1,156 +1,33 @@
{
"version": "0.1.0",
"nodes": [
{
"id": 0,
"type": "function",
"value": "workflow.generate_mesh"
},
{
"id": 1,
"type": "function",
"value": "workflow.convert_to_xdmf"
},
{
"id": 2,
"type": "function",
"value": "workflow.poisson"
},
{
"id": 3,
"type": "function",
"value": "workflow.plot_over_line"
},
{
"id": 4,
"type": "function",
"value": "workflow.substitute_macros"
},
{
"id": 5,
"type": "function",
"value": "workflow.compile_paper"
},
{
"id": 6,
"type": "input",
"name": "domain_size",
"value": 2.0
},
{
"id": 7,
"type": "input",
"name": "source_directory",
"value": "/home/jan/Desktop/visual-programming-with-pyironflow/nfdi/source"
},
{
"id": 8,
"type": "output",
"name": "result"
}
{"id": 0, "type": "function", "value": "workflow.generate_mesh"},
{"id": 1, "type": "function", "value": "workflow.convert_to_xdmf"},
{"id": 2, "type": "function", "value": "workflow.poisson"},
{"id": 3, "type": "function", "value": "workflow.plot_over_line"},
{"id": 4, "type": "function", "value": "workflow.substitute_macros"},
{"id": 5, "type": "function", "value": "workflow.compile_paper"},
{"id": 6, "type": "input", "value": 2.0, "name": "domain_size"},
{"id": 7, "type": "input", "value": "source", "name": "source_directory"},
{"id": 8, "type": "output", "name": "result"}
],
"edges": [
{
"target": 2,
"targetPort": "meshio_output_h5",
"source": 1,
"sourcePort": "h5_file"
},
{
"target": 2,
"targetPort": "meshio_output_xdmf",
"source": 1,
"sourcePort": "xdmf_file"
},
{
"target": 4,
"targetPort": "ndofs",
"source": 2,
"sourcePort": "numdofs"
},
{
"target": 3,
"targetPort": "poisson_output_vtu_file",
"source": 2,
"sourcePort": "vtu_file"
},
{
"target": 3,
"targetPort": "poisson_output_pvd_file",
"source": 2,
"sourcePort": "pvd_file"
},
{
"target": 1,
"targetPort": "gmsh_output_file",
"source": 0,
"sourcePort": null
},
{
"target": 5,
"targetPort": "plot_file",
"source": 3,
"sourcePort": null
},
{
"target": 4,
"targetPort": "pvbatch_output_file",
"source": 3,
"sourcePort": null
},
{
"target": 5,
"targetPort": "macros_tex",
"source": 4,
"sourcePort": null
},
{
"target": 0,
"targetPort": "domain_size",
"source": 6,
"sourcePort": null
},
{
"target": 0,
"targetPort": "source_directory",
"source": 7,
"sourcePort": null
},
{
"target": 2,
"targetPort": "source_directory",
"source": 7,
"sourcePort": null
},
{
"target": 3,
"targetPort": "source_directory",
"source": 7,
"sourcePort": null
},
{
"target": 4,
"targetPort": "domain_size",
"source": 6,
"sourcePort": null
},
{
"target": 4,
"targetPort": "source_directory",
"source": 7,
"sourcePort": null
},
{
"target": 5,
"targetPort": "source_directory",
"source": 7,
"sourcePort": null
},
{
"target": 8,
"targetPort": null,
"source": 5,
"sourcePort": null
}
{"target": 0, "targetPort": "domain_size", "source": 6, "sourcePort": null},
{"target": 0, "targetPort": "source_directory", "source": 7, "sourcePort": null},
{"target": 1, "targetPort": "gmsh_output_file", "source": 0, "sourcePort": null},
{"target": 2, "targetPort": "meshio_output_xdmf", "source": 1, "sourcePort": "xdmf_file"},
{"target": 2, "targetPort": "meshio_output_h5", "source": 1, "sourcePort": "h5_file"},
{"target": 2, "targetPort": "source_directory", "source": 7, "sourcePort": null},
{"target": 3, "targetPort": "poisson_output_pvd_file", "source": 2, "sourcePort": "pvd_file"},
{"target": 3, "targetPort": "poisson_output_vtu_file", "source": 2, "sourcePort": "vtu_file"},
{"target": 3, "targetPort": "source_directory", "source": 7, "sourcePort": null},
{"target": 4, "targetPort": "pvbatch_output_file", "source": 3, "sourcePort": null},
{"target": 4, "targetPort": "ndofs", "source": 2, "sourcePort": "numdofs"},
{"target": 4, "targetPort": "domain_size", "source": 6, "sourcePort": null},
{"target": 4, "targetPort": "source_directory", "source": 7, "sourcePort": null},
{"target": 5, "targetPort": "macros_tex", "source": 4, "sourcePort": null},
{"target": 5, "targetPort": "plot_file", "source": 3, "sourcePort": null},
{"target": 5, "targetPort": "source_directory", "source": 7, "sourcePort": null},
{"target": 8, "targetPort": null, "source": 5, "sourcePort": null}
]
}
5 changes: 5 additions & 0 deletions postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
conda env create -n preprocessing -f nfdi/source/envs/preprocessing.yaml -y
conda env create -n processing -f nfdi/source/envs/processing.yaml -y
conda env create -n postprocessing -f nfdi/source/envs/postprocessing.yaml -y
pip install -e quantum_espresso/qe_xml_parser
mv quantum_espresso/espresso ~
Loading
Loading