Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
346 commits
Select commit Hold shift + click to select a range
d306f50
adapt rest of mappings
spossann Sep 6, 2025
e81a899
replace Domain.params_map -> Domain.params
spossann Sep 6, 2025
5eca46c
fix unit tests
spossann Sep 8, 2025
390f62c
use same params.setter structure in equils as in domains (remove meth…
spossann Sep 8, 2025
994413e
formatting
spossann Sep 8, 2025
5728e79
Merge branch '458-store-domain-input-paramaters-unchanged' into 318-p…
spossann Sep 8, 2025
250ed36
tutorial 2 works up to GuidingCenter
spossann Sep 8, 2025
702fc95
Introduce SimData.orbits and SimData.spline_values
spossann Sep 9, 2025
9e99367
repair Maxwell and LinearMHD tests
spossann Sep 9, 2025
bdcaa7f
Two new abstract methods for Propagator:
spossann Sep 9, 2025
56e3c9c
New way of setting Propagator options through three abstract
spossann Sep 10, 2025
dc05b3a
adapt LinearMHD to new options setting
spossann Sep 10, 2025
00a9c5c
adapt Vlasov to new options
spossann Sep 10, 2025
ab21da6
make toy model GuidingCenter run in new framework
spossann Sep 10, 2025
6694072
tutorial 2 on test particles is now complete and running. Adaption of…
spossann Sep 10, 2025
ff45240
started to transfer model VlasovAmpereOneSpecies
spossann Sep 10, 2025
aaa58fd
VlasovAmpereOneSecies is running
spossann Sep 11, 2025
32baaf2
new class BinningPlot
spossann Sep 12, 2025
f270e5a
added Simdata.f dict for distribution function
spossann Sep 12, 2025
bc1cdc3
new method Maxwellian.add_perturbation enables to extract the backgro…
spossann Sep 12, 2025
72c59ce
fix bug in initial Poisson solve of VlasovAmpereOneSpecies; add flaf …
spossann Sep 12, 2025
ab85525
add line_profiler to some functions
spossann Sep 12, 2025
ef3ba9d
fix base_units loading; allow comm=None in Particles
spossann Sep 12, 2025
f2a403f
added tutorial 5
spossann Sep 12, 2025
508445f
Format all source files and and temporary linting check to CI
max-models Sep 12, 2025
745b2d2
Merge branch 'format-all-files' into '318-parameter-file-as-py'
spossann Sep 12, 2025
8302d5d
Move tutorials to base folder
max-models Sep 13, 2025
e014b9c
Merge branch 'move-tutorials-to-base-folder' into '318-parameter-file…
spossann Sep 13, 2025
3faca93
Fix unit testing
spossann Sep 18, 2025
0691aae
Merge branch 'fix-unit-testing' into '318-parameter-file-as-py'
spossann Sep 18, 2025
af3668b
Resolve "Port toy model PressurelessSPH to 318"
spossann Sep 25, 2025
f557c92
Merge branch '460-port-toy-model-pressurelesssph-to-318' into '318-pa…
spossann Sep 25, 2025
0f8f5e2
Port sph tutorial to 318
spossann Sep 29, 2025
33b8e76
Merge branch 'port-sph-tutorial-to-318' into '318-parameter-file-as-py'
spossann Sep 29, 2025
d3d46ca
Recent updates from devel into 318
spossann Oct 1, 2025
44dfc2e
Merge branch 'merge-devel-1-10-25' into '318-parameter-file-as-py'
spossann Oct 1, 2025
649eb92
Updated __init__.py files in 318
max-models Oct 1, 2025
60dbc08
Merge branch 'update-init-files' into '318-parameter-file-as-py'
spossann Oct 1, 2025
1952c26
Add SPH and VlasovAmpere verification tests
spossann Oct 6, 2025
d00e7ea
Merge branch 'verif-tests-porting' into '318-parameter-file-as-py'
spossann Oct 6, 2025
797f3d8
Resolve "Port some toy models to 318"
spossann Oct 7, 2025
3974ada
Merge branch '461-port-some-toy-models-to-318' into '318-parameter-fi…
spossann Oct 7, 2025
ab43c4a
Merge branch 'devel' into merge-devel-8-10-25
spossann Oct 8, 2025
b5754f0
remove double --check-file
spossann Oct 8, 2025
9f5701d
Update shearalfven to new format
max-models Oct 8, 2025
5ee5a56
Merge branch 'update-shearalfven-to-new-format' into '318-parameter-f…
spossann Oct 8, 2025
fd2a463
test hook
spossann Oct 8, 2025
4c77173
update pre-commit yaml
spossann Oct 8, 2025
16ae146
test pre-commit hooks
spossann Oct 8, 2025
b1343de
try hook option --assume-in-merge
spossann Oct 8, 2025
fc42259
test hook
spossann Oct 8, 2025
efc0fc1
remove merge conflicts
spossann Oct 8, 2025
b75d347
Resolve "Port remaining toy models"
spossann Oct 8, 2025
d3a073f
Merge branch '465-port-remaining-toy-models' into '318-parameter-file…
spossann Oct 8, 2025
bd9e618
Merge branch '318-parameter-file-as-py' into merge-devel-8-10-25
spossann Oct 8, 2025
c56a8d4
Merge branch 'merge-devel-8-10-25' into '318-parameter-file-as-py'
spossann Oct 8, 2025
1bc3a8d
Ported three fluid models
spossann Oct 9, 2025
7e516ee
Merge branch 'port-three-fluid-models' into '318-parameter-file-as-py'
spossann Oct 9, 2025
433d54b
Porting the model LinearMHDDriftkineticCC
bkna0327 Oct 14, 2025
da064e6
Merge branch '318-parameter-file-as-py-mhd-driftkinetic' into '318-pa…
spossann Oct 14, 2025
3c6a268
Added `--oversubscribe` to the test mpirun commands
max-models Oct 14, 2025
4f6d91e
Merge branch 'run-318-tests-with-oversubscribe' into '318-parameter-f…
spossann Oct 14, 2025
f41eb71
Resolve "Porting the rest of fluid models"
spossann Oct 21, 2025
223bdf4
Merge branch '469-porting-the-rest-of-fluid-models' into '318-paramet…
spossann Oct 21, 2025
2b8dbf8
Merge branch 'devel' into merge-devel-21-10-2025
spossann Oct 21, 2025
6e9ce14
re-add model_tests_mpi
spossann Oct 21, 2025
353d692
remove test_tutorials.py again
spossann Oct 21, 2025
ac598e3
add new mpi and xp to species.py
spossann Oct 21, 2025
7be337d
add mpi and xp to some new files which do not exist in devel
spossann Oct 21, 2025
9d92d1f
add new mpi to new models files
spossann Oct 21, 2025
0e764a7
add missing Pyccelkernel
spossann Oct 21, 2025
0a85779
check for MockMPI in StruphyModel
spossann Oct 21, 2025
9d08cd5
remove deprecated --verification flag from tests
spossann Oct 21, 2025
74c5e06
formatting
spossann Oct 21, 2025
77fd7e4
test an already ported model for the single test
spossann Oct 21, 2025
111775d
use Barrier() in main.py
spossann Oct 21, 2025
533223c
fix verification test
spossann Oct 21, 2025
06e86f4
fix gyrokinetic_poisson
spossann Oct 21, 2025
613cd58
formatting
spossann Oct 21, 2025
21815d6
Merge branch 'merge-devel-21-10-2025' into '318-parameter-file-as-py'
spossann Oct 21, 2025
26fc52e
Resolve "Rename struphy array imports to xp"
max-models Oct 22, 2025
c76e68e
Merge branch '470-rename-struphy-array-imports-to-xp-3' into '318-par…
spossann Oct 22, 2025
5eac499
Resolve "Porting the rest of kinetic models"
spossann Oct 22, 2025
3241341
Merge branch '471-porting-the-rest-of-kinetic-models' into '318-param…
spossann Oct 22, 2025
6b6163c
Use cunumpy
max-models Oct 22, 2025
93263f8
Merge branch 'use-cunumpy' into '318-parameter-file-as-py'
spossann Oct 22, 2025
db8623c
Update tutorials
spossann Oct 22, 2025
50a689b
Merge branch 'update-tutorials' into '318-parameter-file-as-py'
spossann Oct 22, 2025
6452078
Added struphy[mpi] to [dev] dependencies
max-models Oct 23, 2025
b2afd19
Port two hybrid
spossann Oct 23, 2025
cf91a74
Merge branch 'port-two-hybrid' into '318-parameter-file-as-py'
spossann Oct 23, 2025
5a3d7c5
Merge branch 'install-mpi4pi-with-dev' into '318-parameter-file-as-py'
spossann Oct 23, 2025
94068bc
Added a basic template for the Github actions
max-models Oct 23, 2025
ef5cdf6
Removed the cloning of struphy
max-models Oct 23, 2025
23ab98c
Add '-y' option to struphy params command
max-models Oct 23, 2025
574c873
Added netcdf and hdf5 install
max-models Oct 23, 2025
d6fe949
Commented out the quickstart test, we can add it back after merging 318
max-models Oct 23, 2025
5287118
Removed netcdf
max-models Oct 23, 2025
485a1f2
Install with phys,mpi
max-models Oct 23, 2025
e1aa86d
Removed quickstart from matrix
max-models Oct 23, 2025
cd71fcc
Updated model test
max-models Oct 23, 2025
513b446
Added brew install pkgconf
max-models Oct 23, 2025
1a5a828
Run ruff check --select I src/**/*.py
max-models Oct 23, 2025
50734b6
Removed pylint quote style
max-models Oct 23, 2025
47002ac
Formatting
max-models Oct 23, 2025
ede6e77
Updated isort settings
max-models Oct 23, 2025
bf6f5e5
Moved src/struphy/utils/set_release_dependencies.py to utils/
max-models Oct 23, 2025
436f042
Formatting
max-models Oct 23, 2025
b1bd009
Added isort to check tutorials
max-models Oct 23, 2025
a66d018
Renamed check-formatting to struphy-lint-all
max-models Oct 23, 2025
285719a
Added trailing commas
max-models Oct 23, 2025
1b990b4
Porting the moel LinearMHDVlasovPC
bkna0327 Oct 24, 2025
80b423e
Merge branch '318-parameter-file-as-py-mhd-vlasov-PC' into '318-param…
spossann Oct 24, 2025
050af73
Update environment variables in GITHUB_ENV
max-models Oct 24, 2025
cc52ce2
Added env to install struphy stage
max-models Oct 24, 2025
9546472
Added prints
max-models Oct 24, 2025
77302eb
Show FC in macos install
max-models Oct 24, 2025
ea4f095
Don't install python3 manually on mac
max-models Oct 24, 2025
a3a1c39
Remove system profiler print
max-models Oct 24, 2025
2634348
changed order
max-models Oct 24, 2025
1e864e1
Added prints
max-models Oct 24, 2025
b73b72b
Update PATH
max-models Oct 24, 2025
9d2f338
uncommented brew install gcc
max-models Oct 24, 2025
482adbf
Add Open Source at Microsoft image to README
max-models Oct 24, 2025
3e4e1e2
Update header image in README.md
max-models Oct 24, 2025
18a3e09
Merge pull request #39 from struphy-hub/max-models-patch-1
max-models Oct 24, 2025
242fa52
Revise README header and introduction
max-models Oct 24, 2025
cde4737
Merge pull request #40 from struphy-hub/max-models-patch-1
max-models Oct 24, 2025
2fd7bc2
Renamed install actions
max-models Oct 24, 2025
ee02500
Removed macos-latest
max-models Oct 24, 2025
1e551a9
Bugfix in the static analysus
max-models Oct 24, 2025
b0edcde
Add Open Source at Microsoft image to README
max-models Oct 24, 2025
6f3b748
Update header image in README.md
max-models Oct 24, 2025
5736bee
Revise README header and introduction
max-models Oct 24, 2025
4c904fe
Merge branch 'devel' into update-github-devel
max-models Oct 24, 2025
49d3b17
Merge pull request #41 from struphy-hub/update-github-devel
max-models Oct 24, 2025
bc9cc08
Merge branch 'devel' into 318-parameter-file-as-py
max-models Oct 24, 2025
6f4ecd3
Merge remote-tracking branch 'github/devel' into 318-parameter-file-a…
max-models Oct 24, 2025
a6d1b1f
Merge branch 'devel' into 318-parameter-file-as-py
max-models Oct 24, 2025
8e4ca4d
Merge pull request #6 from struphy-hub/5-ci-for-unit-and-model-tests-…
max-models Oct 24, 2025
b061933
Merge branch 'devel' into 318-parameter-file-as-py
max-models Oct 24, 2025
68fee4a
Added struphy --refresh-models
max-models Oct 24, 2025
b6b35a4
Updated model tests
max-models Oct 24, 2025
d6d4789
Updated unit tests
max-models Oct 24, 2025
0baca29
Added back the quickstart tests
max-models Oct 24, 2025
bf39ab0
Uninstall mpi4py for unit tests
max-models Oct 24, 2025
746b2fb
Added tutorial tests
max-models Oct 24, 2025
d68bec0
Updated isort job
max-models Oct 24, 2025
ea215c0
Install with doc
max-models Oct 24, 2025
4f7db70
Added pull request template
max-models Oct 24, 2025
d838f36
fixes
max-models Oct 24, 2025
3a9278f
Merge pull request #44 from struphy-hub/12-create-pr-template
max-models Oct 24, 2025
b3b83aa
Moved tutorial 7 out of the tutorials/ dir so it's not executed in th…
max-models Oct 24, 2025
ba2bab1
Moved templates
max-models Oct 24, 2025
f4037cf
Merge branch 'devel' into 12-create-pr-template
max-models Oct 24, 2025
fb0d0e8
Added badges
max-models Oct 24, 2025
6524c9b
Added stars badge
max-models Oct 24, 2025
02da58c
Added license badge
max-models Oct 24, 2025
e063917
Added release
max-models Oct 24, 2025
4efb469
Added static analysis
max-models Oct 24, 2025
e534953
Added pypi downloads
max-models Oct 24, 2025
c456d99
Reusable workflow
max-models Oct 24, 2025
3f64854
added badges
max-models Oct 24, 2025
8f1038b
Removed the old testing badge
max-models Oct 24, 2025
6f2732d
Removed the old testing badge
max-models Oct 24, 2025
93eae0f
Merge pull request #42 from struphy-hub/318-parameter-file-as-py
spossann Oct 24, 2025
4c4f967
Renamed static analysis
max-models Oct 24, 2025
a210fa7
Merge branch 'devel' into 33-add-badges-to-readme
max-models Oct 24, 2025
d3a29d3
Renaming
max-models Oct 24, 2025
2652ebe
MacOS
max-models Oct 24, 2025
fb00f7f
Added concurrency
max-models Oct 24, 2025
b5b1a60
Use testing.yml as reusable workflow
max-models Oct 24, 2025
7b06189
trigger CI
max-models Oct 24, 2025
b4c4837
Change concurrency
max-models Oct 24, 2025
9790beb
Removed concurrency
max-models Oct 24, 2025
27da0de
Added header
max-models Oct 24, 2025
8d449b4
New banner
max-models Oct 24, 2025
da10731
Commented out Mac OS latest
max-models Oct 24, 2025
1199919
Merge pull request #46 from struphy-hub/12-create-pr-template
spossann Oct 24, 2025
1a753f3
Reverted toy.py and base.py
max-models Oct 24, 2025
af24686
Merge branch 'devel' into 33-add-badges-to-readme
max-models Oct 24, 2025
f4415fb
Merge branch 'devel' into add-trailing-commas
max-models Oct 24, 2025
72e1e5d
Added trailing commas
max-models Oct 24, 2025
1e7332a
Merge branch 'devel' into add-trailing-commas
max-models Oct 24, 2025
b55a3cf
Updated psydac dependency to https://github.com/struphy-hub/psydac-fo…
max-models Oct 24, 2025
4631c20
Added pytest-testmon
max-models Oct 24, 2025
6775cc4
Run unit tests twice
max-models Oct 24, 2025
4d59bca
Reverted accidental changes
max-models Oct 24, 2025
3ec5302
Merge pull request #36 from struphy-hub/add-trailing-commas
spossann Oct 24, 2025
c89866d
Added links to README.md
max-models Oct 24, 2025
e5f1388
Merge branch 'devel' into 30-update-psydac-dependency-in-pyprojecttom…
max-models Oct 24, 2025
9fad40a
Merge pull request #47 from struphy-hub/33-add-badges-to-readme
spossann Oct 24, 2025
4020bd3
Merge pull request #49 from struphy-hub/30-update-psydac-dependency-i…
spossann Oct 24, 2025
1e16093
ruff check --select E713 --fix
max-models Oct 27, 2025
d61bb31
ruff check --select E712 --unsafe-fixes --fix
max-models Oct 27, 2025
87dc0e7
ruff check --select F541 --fix
max-models Oct 27, 2025
7eacf1c
Formatting
max-models Oct 27, 2025
5c54895
not kinds --> ~kinds
max-models Oct 27, 2025
37af29b
updates some docker files
spossann Oct 28, 2025
c66da59
new workflow for testing image
spossann Oct 28, 2025
3bc0040
test images in workflow
spossann Oct 28, 2025
485ae42
change container
spossann Oct 28, 2025
714c3f3
upper case GITHUB_TOKEN
spossann Oct 28, 2025
327afec
use new secrets.GHCR_TOKEN
spossann Oct 28, 2025
d94b189
remove checkout
spossann Oct 28, 2025
42c80af
check for dockerenv file
spossann Oct 28, 2025
43e8f86
add shell bach
spossann Oct 28, 2025
97b9455
add pwd
spossann Oct 28, 2025
552216c
try installing struphy
spossann Oct 28, 2025
90a2dd0
forgotten (
spossann Oct 28, 2025
d97b8a8
enter virtual envs
spossann Oct 28, 2025
d218735
spelling error
spossann Oct 28, 2025
50eb15c
correct env name
spossann Oct 28, 2025
bfa3566
add some which python3
spossann Oct 28, 2025
3f54c23
correct env path
spossann Oct 28, 2025
4fedd4a
compile Struphy
spossann Oct 28, 2025
0ee68db
find out why struphy compile just refresshes models and then exits
spossann Oct 28, 2025
81db8ca
cat compile.py
spossann Oct 28, 2025
b91db0d
fix typo
spossann Oct 28, 2025
ffd261f
check phys install
spossann Oct 28, 2025
991f2b2
try to get some info from console.main
spossann Oct 28, 2025
cf53705
pull current branch
spossann Oct 28, 2025
b4cf309
add -e flag
spossann Oct 28, 2025
f7a6251
use spossann username
spossann Oct 28, 2025
d1cff05
new action for Struphy install in container
spossann Oct 28, 2025
9188d6c
Merge pull request #61 from struphy-hub/58-convert-if-not-x-in-y-to-i…
max-models Oct 28, 2025
d8c81bf
Merge pull request #62 from struphy-hub/57-dont-use-for-true-false-co…
max-models Oct 28, 2025
9b52f0e
Merge pull request #63 from struphy-hub/56-convert-f-strings-to-norma…
max-models Oct 28, 2025
e63eaa3
add content to action
spossann Oct 28, 2025
589cf47
add shell
spossann Oct 28, 2025
103ea66
revert console.main
spossann Oct 28, 2025
0fe8b81
revert console.copile
spossann Oct 28, 2025
64dca56
update other images
spossann Oct 28, 2025
64c9fa8
remove mpcdf image (too large anyways)
spossann Oct 28, 2025
5d5c670
revert two workflows
spossann Oct 28, 2025
e7b54d7
remove .gitlab folder
spossann Oct 28, 2025
b1cf1f2
Merge branch 'devel' into 37-use-the-github-container-registry-to-sto…
spossann Oct 28, 2025
fe8c7f3
set the Ubuntu testing as a cronjob at 1 am every Sunday
spossann Oct 28, 2025
9bda18d
rename testing.yml -> reusable-testing.yml
spossann Oct 28, 2025
074ff5a
new actions for PR unit and model tests
spossann Oct 28, 2025
1ff17bf
rename workflow for model testing
spossann Oct 28, 2025
52ff740
do not use actions in PR testing workflows; we must source a specific…
spossann Oct 28, 2025
3886193
add gvec env vars
spossann Oct 29, 2025
ae4c71a
try serial unit tests first
spossann Oct 29, 2025
a1ebe58
run test_l2_projectors in separate step
spossann Oct 29, 2025
e00bbc5
exclude gvec from l2 projector test
spossann Oct 29, 2025
a2071de
revert deletion of gitlb templates
spossann Oct 29, 2025
c7165be
remove separate l2-projector test
spossann Oct 29, 2025
c780618
do not run verification model test in unit tests
spossann Oct 29, 2025
d1e04ee
Merge branch 'devel-clean' into 37-use-the-github-container-registry-…
max-models Oct 30, 2025
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
26 changes: 26 additions & 0 deletions .github/actions/install/struphy_in_container/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Install Struphy in Container"

runs:
using: composite
steps:
- name: Git branch name
id: git-branch-name
uses: EthanSK/git-branch-name-action@v1
- name: Echo the branch name
shell: bash
run: echo "Branch name ${GIT_BRANCH_NAME}"
- name: Install struphy
shell: bash
run: |
ls / -a
which python3
cd /struphy_c_
git status
git fetch origin
echo ${GIT_BRANCH_NAME}
git checkout ${GIT_BRANCH_NAME}
git pull
source env_c_/bin/activate
which python3
struphy -p
pip install -e ".[phys,mpi,doc]"
95 changes: 95 additions & 0 deletions .github/workflows/reusable-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Testing

on:
workflow_call:
inputs:
os:
required: true
type: string

jobs:
test:
runs-on: ${{ inputs.os }}
env:
OMPI_MCA_rmaps_base_oversubscribe: 1 # Linux
PRRTE_MCA_rmaps_base_oversubscribe: 1 # MacOS
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
compile-language: ["fortran", "c"]
test-type: ["unit", "model", "quickstart", "tutorials"]

steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v5

# https://docs.github.com/en/actions/tutorials/build-and-test-code/python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"

# Cache pip dependencies
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-

# Install prereqs
# I don't think it's possible to use a single action for this because
# we can't use ${inputs.os} in an if statement, so we have to use two different actions.
- name: Install prerequisites (Ubuntu)
if: inputs.os == 'ubuntu-latest'
uses: ./.github/actions/install/ubuntu-latest

- name: Install prerequisites (macOS)
if: inputs.os == 'macos-latest'
uses: ./.github/actions/install/macos-latest

# Check that mpirun oversubscribing works, doesn't work unless OMPI_MCA_rmaps_base_oversubscribe==1
- name: Test mpirun
run: |
echo $OMPI_MCA_rmaps_base_oversubscribe
echo $PRRTE_MCA_rmaps_base_oversubscribe
pip install mpi4py -U
which mpirun
mpirun --version
mpirun --oversubscribe --report-bindings -n 4 python -c "from mpi4py import MPI; comm=MPI.COMM_WORLD; print(f'Hello from rank {comm.Get_rank()} of {comm.Get_size()}'); assert comm.Get_size()==4"

# Clone struphy-ci-testing
- name: Install struphy
uses: ./.github/actions/install/install-struphy
env:
FC: ${{ env.FC }}
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}

# Compile
- name: Compile kernels
uses: ./.github/actions/compile

# Run tests
- name: Run unit tests
if: matrix.test-type == 'unit'
uses: ./.github/actions/tests/unit

- name: Run model tests
if: matrix.test-type == 'model'
uses: ./.github/actions/tests/models

- name: Run quickstart tests
if: matrix.test-type == 'quickstart'
uses: ./.github/actions/tests/quickstart

- name: Run tutorials
if: matrix.test-type == 'tutorials'
uses: ./.github/actions/tests/tutorials
9 changes: 2 additions & 7 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,10 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v4

# TODO: Remove --select I once all errors are fixed
- name: ruff check --select I
- name: Linting with ruff
run: |
pip install ruff
ruff check --select I

- name: ruff format --check
run: |
ruff format --check
ruff check --select I src/**/*.py

# pylint:
# runs-on: ubuntu-latest
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/test-PR-models.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: PR - model tests in Container

on:
pull_request:
branches:
- main
- devel
workflow_dispatch:

defaults:
run:
shell: bash

permissions:
contents: read

# concurrency:
# group: "pages"
# cancel-in-progress: false

jobs:
model-tests-in-container-with-struphy:
runs-on: ubuntu-latest
container:
image: ghcr.io/struphy-hub/struphy/ubuntu-with-struphy:latest
credentials:
username: spossann
password: ${{ secrets.GHCR_TOKEN }}
steps:

- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

- name: Checkout repo
uses: actions/checkout@v4

- name: Install Struphy in Container
uses: ./.github/actions/install/struphy_in_container

- name: Compile Struphy
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy compile

- name: Model tests
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy test LinearMHD
struphy test toy
struphy test models
struphy test verification

- name: Model tests with MPI
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy test models
struphy test models --mpi 2
struphy test verification --mpi 1
struphy test verification --mpi 4
struphy test verification --mpi 4 --nclones 2
struphy test VlasovAmpereOneSpecies --mpi 2 --nclones 2
68 changes: 68 additions & 0 deletions .github/workflows/test-PR-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: PR - unit tests in Container

on:
pull_request:
branches:
- main
- devel
workflow_dispatch:

defaults:
run:
shell: bash

permissions:
contents: read

# concurrency:
# group: "pages"
# cancel-in-progress: false

jobs:
unit-tests-in-container-with-struphy:
runs-on: ubuntu-latest
container:
image: ghcr.io/struphy-hub/struphy/ubuntu-with-struphy:latest
credentials:
username: spossann
password: ${{ secrets.GHCR_TOKEN }}
steps:

- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

- name: Checkout repo
uses: actions/checkout@v4

- name: Install Struphy in Container
uses: ./.github/actions/install/struphy_in_container

- name: Compile Struphy
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy compile

- name: Run unit tests with MPI
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy --refresh-models
struphy test unit --mpi 2

- name: Run unit tests
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy --refresh-models
pip show mpi4py
pip uninstall -y mpi4py
struphy test unit
19 changes: 5 additions & 14 deletions .github/workflows/ubuntu-latest.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
name: Ubuntu
name: Ubuntu latest - cronjob
on:
push:
branches:
- main
- devel
pull_request:
branches:
- main
- devel

# concurrency:
# group: ${{ github.ref }}
# cancel-in-progress: true
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"

jobs:
ubuntu-latest-build:
uses: ./.github/workflows/testing.yml
uses: ./.github/workflows/reusable-testing.yml
with:
os: ubuntu-latest
14 changes: 6 additions & 8 deletions docker/almalinux-latest.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Here is how to build the image and upload it to the mpcdf gitlab registry:
# Here is how to build the image and upload it to the Github package registry:
#
# We suppose you are in the struphy repo directory.
# Start the docker engine and run "docker login" with the following token:
# Start the docker engine and login to the Github package registry using a github personal acces token (classic):
#
# TOKEN=gldt-CgMRBMtePbSwdWTxKw4Q; echo "$TOKEN" | docker login gitlab-registry.mpcdf.mpg.de -u gitlab+deploy-token-162 --password-stdin
# export CR_PAT=YOUR_TOKEN
# echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
# docker info
# docker build -t gitlab-registry.mpcdf.mpg.de/struphy/struphy/almalinux-latest --provenance=false -f docker/almalinux-latest.dockerfile .
# docker push gitlab-registry.mpcdf.mpg.de/struphy/struphy/almalinux-latest
# docker build -t ghcr.io/struphy-hub/struphy/almalinux-with-reqs:latest --provenance=false -f docker/almalinux-latest.dockerfile .
# docker push ghcr.io/struphy-hub/struphy/almalinux-with-reqs:latest

FROM almalinux:latest

Expand Down Expand Up @@ -42,9 +43,6 @@ RUN echo "Installing additional tools..." \
&& export CC=`which gcc` \
&& export CXX=`which g++`

# create new working dir
WORKDIR /install_struphy_here/

# allow mpirun as root
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
Expand Down
14 changes: 6 additions & 8 deletions docker/fedora-latest.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Here is how to build the image and upload it to the mpcdf gitlab registry:
# Here is how to build the image and upload it to the Github package registry:
#
# We suppose you are in the struphy repo directory.
# Start the docker engine and run "docker login" with the following token:
# Start the docker engine and login to the Github package registry using a github personal acces token (classic):
#
# TOKEN=gldt-CgMRBMtePbSwdWTxKw4Q; echo "$TOKEN" | docker login gitlab-registry.mpcdf.mpg.de -u gitlab+deploy-token-162 --password-stdin
# export CR_PAT=YOUR_TOKEN
# echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
# docker info
# docker build -t gitlab-registry.mpcdf.mpg.de/struphy/struphy/fedora-latest --provenance=false -f docker/fedora-latest.dockerfile .
# docker push gitlab-registry.mpcdf.mpg.de/struphy/struphy/fedora-latest
# docker build -t ghcr.io/struphy-hub/struphy/fedora-with-reqs:latest --provenance=false -f docker/fedora-latest.dockerfile .
# docker push ghcr.io/struphy-hub/struphy/fedora-with-reqs:latest

FROM fedora:latest

Expand Down Expand Up @@ -34,9 +35,6 @@ RUN echo "Installing additional tools..." \
&& export CC=`which gcc` \
&& export CXX=`which g++`

# create new working dir
WORKDIR /install_struphy_here/

# allow mpirun as root
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
Expand Down
Loading