Skip to content

Commit 02490f7

Browse files
authored
Merge pull request #453 from simvue-io/v1.0.1-rc
Create release v1.0.1
2 parents 1c75662 + f01cf38 commit 02490f7

40 files changed

+2307
-1515
lines changed

.github/workflows/deploy.yaml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Deploy to PyPi
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
build:
8+
name: Build Wheels and Package 🛠️
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v4
13+
- name: Set up Python 3.12
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.x"
17+
- name: Install Poetry
18+
run: python -m pip install poetry
19+
- name: Build Module
20+
run: poetry build
21+
- name: Store the distribution packages
22+
uses: actions/upload-artifact@v4
23+
with:
24+
retention-days: 1
25+
if-no-files-found: error
26+
name: python-package-distributions
27+
path: dist/
28+
publish_test:
29+
name: Publish to TestPyPi 🧪
30+
needs:
31+
- build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: test_pypi
35+
url: https://test.pypi.org/p/simvue
36+
permissions:
37+
id-token: write
38+
steps:
39+
- name: Download all the dists
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: python-package-distributions
43+
path: dist/
44+
- name: Publish to TestPyPi
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
with:
47+
repository-url: https://test.pypi.org/legacy/
48+
publish:
49+
name: Publish to PyPi 🐍📦
50+
needs:
51+
- publish_test
52+
if: "!contains(github.ref, 'rc') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha')"
53+
runs-on: ubuntu-latest
54+
environment:
55+
name: pypi
56+
url: https://pypi.org/p/simvue
57+
permissions:
58+
id-token: write
59+
steps:
60+
- name: Download all the dists
61+
uses: actions/download-artifact@v4
62+
with:
63+
name: python-package-distributions
64+
path: dist/
65+
- name: Publish to PyPi
66+
uses: pypa/gh-action-pypi-publish@release/v1
67+
github-release:
68+
name: Create Signed GitHub Release 🔏
69+
needs:
70+
- publish
71+
runs-on: ubuntu-latest
72+
permissions:
73+
contents: write
74+
id-token: write
75+
steps:
76+
- name: Download all the dists
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: python-package-distributions
80+
path: dist/
81+
- name: Sign the dists with Sigstore
82+
uses: sigstore/gh-action-sigstore-python@v2
83+
with:
84+
inputs: >-
85+
./dist/*.tar.gz
86+
./dist/*.whl
87+
- name: Create GitHub Release
88+
env:
89+
GITHUB_TOKEN: ${{ github.token }}
90+
run: >-
91+
LATESTCHANGES=$(awk '
92+
BEGIN { header_found = 0 }
93+
/^## / {
94+
if (header_found == 0) {
95+
header = $0
96+
header_found = 1
97+
next
98+
} else {
99+
exit
100+
}
101+
}
102+
header_found == 1 && /^\* / { print }
103+
' CHANGELOG.md)
104+
gh release create
105+
'${{ github.ref_name }}'
106+
--notes "$LATESTCHANGES"
107+
--title 'Simvue ${{ github.ref_name }}'
108+
--repo '${{ github.repository }}'
109+
- name: Upload artifact signatures to GitHub Release
110+
env:
111+
GITHUB_TOKEN: ${{ github.token }}
112+
run: >-
113+
gh release upload
114+
'${{ github.ref_name }}' dist/**
115+
--repo '${{ github.repository }}'

.github/workflows/examples.yml

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
name: Simvue Examples
2+
3+
on:
4+
push:
5+
branches: ["main", "dev", "hotfix/update-ci"]
6+
pull_request:
7+
branches: [ "main", "dev", "hotfix/update-ci" ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
GeometryOptimisation:
15+
runs-on: ubuntu-latest
16+
if: false # deactivate for now
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Download BlueMira
20+
uses: actions/checkout@v4
21+
with:
22+
repository: Fusion-Power-Plant-Framework/bluemira
23+
ref: v1.10.0
24+
path: blue_mira
25+
- uses: conda-incubator/setup-miniconda@v3
26+
with:
27+
activate-environment: bluemira
28+
environment-file: blue_mira/conda/environment.yml
29+
miniforge-version: "latest"
30+
use-only-tar-bz2: false
31+
miniforge-variant: Mambaforge
32+
use-mamba: true
33+
python-version: "3.11"
34+
- name: Install bluemira
35+
shell: bash -l {0}
36+
run: pip install -e blue_mira
37+
- name: Install Simvue
38+
shell: bash -l {0}
39+
run: pip install -e .
40+
- name: Run Example
41+
shell: bash -l {0}
42+
run: python ./examples/GeometryOptimisation/bluemira_simvue_geometry_optimisation.py
43+
Logging:
44+
runs-on: ubuntu-latest
45+
if: false # deactivate for now
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Setup Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.11"
52+
- name: Install Simvue
53+
run: python3 -m pip install .
54+
- name: Run Example
55+
run: |
56+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
57+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
58+
python3 examples/Logging/logging-to-simvue.py --ci
59+
OpenFOAM:
60+
runs-on: ubuntu-latest
61+
if: false # deactivate for now
62+
container:
63+
image: openfoam/openfoam10-paraview56
64+
options: --user root
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Manual Python Install
68+
run: |
69+
add-apt-repository ppa:deadsnakes/ppa -y
70+
apt-get update && \
71+
apt-get install -y git wget curl python3.11-full
72+
73+
- name: Install dependencies
74+
run: |
75+
python3.11 -m ensurepip --upgrade
76+
python3.11 -m pip install ukaea-multiparser
77+
- name: Install Package
78+
run: python3.11 -m pip install .
79+
- name: Run Example
80+
shell: bash
81+
run: |
82+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
83+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
84+
python3.11 ./examples/OpenFOAM/simvue_openfoam.py /opt/openfoam10/tutorials/incompressible/pimpleFoam/laminar/movingCone/Allrun --ci
85+
Optuna:
86+
runs-on: ubuntu-latest
87+
if: false # deactivate for now
88+
steps:
89+
- uses: actions/checkout@v4
90+
- name: Setup Python
91+
uses: actions/setup-python@v5
92+
with:
93+
python-version: "3.11"
94+
- name: Install Simvue
95+
run: python3 -m pip install .
96+
- name: Install Dependencies
97+
run: |
98+
python3 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
99+
python3 -m pip install -r examples/Optuna/PyTorch/requirements.txt
100+
- name: Run Example
101+
run: |
102+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
103+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
104+
python3.11 ./examples/Optuna/PyTorch/simvue_optuna_pytorch.py --ci
105+
PyTorch:
106+
runs-on: ubuntu-latest
107+
if: false # deactivate for now
108+
steps:
109+
- uses: actions/checkout@v4
110+
- name: Setup Python
111+
uses: actions/setup-python@v5
112+
with:
113+
python-version: "3.11"
114+
- name: Install Simvue
115+
run: python3 -m pip install .
116+
- name: Install Dependencies
117+
run: |
118+
python3 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
119+
python3 -m pip install -r examples/PyTorch/requirements.txt
120+
- name: Run Example
121+
run: |
122+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
123+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
124+
python3.11 ./examples/PyTorch/main.py --ci
125+
SU2:
126+
runs-on: ubuntu-latest
127+
if: false # deactivate for now
128+
steps:
129+
- uses: actions/checkout@v4
130+
- name: Setup Python
131+
uses: actions/setup-python@v5
132+
with:
133+
python-version: "3.11"
134+
- name: Download SU2
135+
run: |
136+
wget https://github.com/su2code/SU2/releases/download/v8.0.1/SU2-v8.0.1-linux64.zip
137+
unzip SU2-v8.0.1-linux64.zip
138+
- name: Install dependencies
139+
run: |
140+
python -m pip install ukaea-multiparser
141+
python -m pip install .
142+
- name: Run Example
143+
run: |
144+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
145+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
146+
python examples/SU2/SU2.py bin --config tests/example_data/SU2_inv_ONERAM6.cfg --ci
147+
TensorFlow:
148+
if: false # deactivate for now
149+
runs-on: ubuntu-latest
150+
steps:
151+
- uses: actions/checkout@v4
152+
- name: Setup Python
153+
uses: actions/setup-python@v5
154+
with:
155+
python-version: "3.11"
156+
- name: Install Simvue
157+
run: python3 -m pip install .
158+
- name: Install Dependencies
159+
run: python3 -m pip install -r examples/Tensorflow/requirements.txt
160+
- name: Run Example
161+
run: |
162+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
163+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
164+
python3.11 ./examples/Tensorflow/dynamic_rnn.py --ci
165+
FDS:
166+
runs-on: ubuntu-latest
167+
container:
168+
image: openbcl/fds:6.9.1
169+
steps:
170+
- uses: actions/checkout@v4
171+
- name: Setup Python
172+
uses: actions/setup-python@v5
173+
with:
174+
python-version: "3.11"
175+
- name: Install Simvue
176+
run: python3 -m pip install .
177+
- name: Install Dependencies
178+
run: python3 -m pip install -r examples/FDS/requirements.txt
179+
- name: Run Example
180+
run: |
181+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
182+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
183+
python3.11 ./examples/FDS/minimal_fds.py examples/FDS/activate_vents.fds . --ci
184+
GEANT4:
185+
if: false # deactivate for now
186+
runs-on: ubuntu-latest
187+
container:
188+
image: artemisbeta/geant4:11.2.1
189+
steps:
190+
- uses: actions/checkout@v4
191+
with:
192+
submodules: recursive
193+
- name: Setup Python
194+
uses: actions/setup-python@v5
195+
with:
196+
python-version: "3.11"
197+
- name: Install Simvue
198+
run: python3 -m pip install .
199+
- name: Install Dependencies
200+
run: python3 -m pip install -r examples/Geant4/requirements.txt
201+
- name: Build Example
202+
run: |
203+
cmake -DCMAKE_PREFIX_PATH=/usr/local/share/geant4/install/4.11.2/ -Bbuild examples/Geant4/FixedTarget/
204+
cmake --build build
205+
- name: Run Example
206+
run: |
207+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
208+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
209+
python examples/Geant4/geant4_simvue.py build/MaterialTesting --ci --events 10

.github/workflows/test_client_macos.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Simvue Client (macOS)
22

33
on:
4-
push:
5-
branches: [ "main", "dev", "hotfix/update-ci" ]
6-
pull_request:
7-
branches: [ "main", "dev", "hotfix/update-ci" ]
84
workflow_dispatch:
95

106
permissions:
@@ -29,4 +25,5 @@ jobs:
2925
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
3026
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
3127
poetry install --all-extras
28+
poetry run python -m pip install torch
3229
poetry run pytest tests/unit/ tests/refactor/ -m 'not scenario'

.github/workflows/test_client_ubuntu.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Simvue Client (Ubuntu)
55

66
on:
77
push:
8-
branches: [ "main", "dev", "hotfix/update-ci" ]
8+
branches: ["main", "dev", "hotfix/update-ci"]
99
pull_request:
1010
branches: [ "main", "dev", "hotfix/update-ci" ]
1111
workflow_dispatch:
@@ -31,7 +31,8 @@ jobs:
3131
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
3232
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
3333
poetry install --all-extras
34-
poetry run pytest --cov --cov-report=xml tests/unit/ tests/refactor/ -m 'not scenario'
34+
poetry run python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
35+
poetry run pytest -x --cov --cov-report=xml tests/unit/ tests/refactor/ -m 'not scenario'
3536
- name: Upload coverage reports to Codecov
3637
run: |
3738
curl -Os https://uploader.codecov.io/latest/linux/codecov

.github/workflows/test_client_windows.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Simvue Client (Windows)
22

33
on:
4-
push:
5-
branches: [ "main", "dev", "hotfix/update-ci" ]
6-
pull_request:
7-
branches: [ "main", "dev", "hotfix/update-ci" ]
84
workflow_dispatch:
95

106
permissions:
@@ -30,4 +26,5 @@ jobs:
3026
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
3127
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
3228
poetry install --all-extras
29+
poetry run python -m pip install torch
3330
poetry run pytest tests/unit/ tests/refactor/ -m 'not scenario'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,6 @@ offline/
141141

142142
# VSCode
143143
.vscode/
144+
145+
# Vagrant
146+
Vagrantfile

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "examples/Geant4/FixedTarget"]
2+
path = examples/Geant4/FixedTarget
3+
url = https://github.com/artemis-beta/Geant4-Example.git

0 commit comments

Comments
 (0)