From 0a1fd0eaa9af6c1a6be22f68e30477664f953b10 Mon Sep 17 00:00:00 2001 From: Stefan Possanner Date: Thu, 29 Jan 2026 13:30:25 +0100 Subject: [PATCH 1/4] remove struphy test from PR workflow --- .github/workflows/test-PR-struphy.yml | 34 +++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-PR-struphy.yml b/.github/workflows/test-PR-struphy.yml index 221135a89..146d96a29 100644 --- a/.github/workflows/test-PR-struphy.yml +++ b/.github/workflows/test-PR-struphy.yml @@ -63,13 +63,6 @@ jobs: run: | ls .testmon* || echo "No .testmondata" - # # temporary - remove after feectools merge - # - name: Install Struphy in container - # uses: ./.github/actions/install/struphy-in-container - # with: - # compile_language: ${{ matrix.compile_language }} - # struphy_branch: 146-install-feectools - - name: Install Psydac in container uses: ./.github/actions/install/psydac-in-container with: @@ -84,17 +77,34 @@ jobs: - name: Run struphy unit tests env: TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }} + TEST_FILES: "bsplines/tests/ \ + console/tests/ \ + feec/tests/ \ + fields_background/tests/ \ + geometry/tests/ \ + initial/tests/ \ + kinetic_background/tests/ \ + linear_algebra/tests/ \ + ode/tests/ \ + pic/tests/ \ + polar/tests/ \ + post_processing/tests/ \ + propagators/tests/" run: | source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate - struphy test Maxwell - struphy test unit + PYTHON=$(which python) + STRUPHY_PATH=$($PYTHON -c "import struphy; print(struphy.__path__[0])") + echo "Struphy is installed at: $STRUPHY_PATH" + echo "STRUPHY_PATH=${STRUPHY_PATH}" >> $GITHUB_ENV + mpirun -n 1 pytest -m single --testmon-forceselect -s --with-mpi --model-name Maxwell $STRUPHY_PATH + pytest --testmon $TEST_FILES - name: Run struphy model tests env: TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }} run: | source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate - struphy test models + pytest -m models --testmon-forceselect $STRUPHY_PATH/models/tests/default_params/ - name: Install mpi4py run: | @@ -106,5 +116,5 @@ jobs: TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }}-mpi run: | source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate - struphy test Maxwell - struphy test models --mpi 2 \ No newline at end of file + mpirun -n 1 pytest -m single --testmon-forceselect -s --with-mpi --model-name Maxwell $STRUPHY_PATH + mpirun -oversubscribe -n 2 pytest -m models --testmon-forceselect --with-mpi $STRUPHY_PATH/models/tests/default_params/ \ No newline at end of file From 6893e03c551aab4cb5e2d58168cafe0d065cc6bc Mon Sep 17 00:00:00 2001 From: Stefan Possanner Date: Thu, 29 Jan 2026 13:31:04 +0100 Subject: [PATCH 2/4] delete struphy workflow on push --- .github/workflows/test-struphy.yml | 112 ----------------------------- 1 file changed, 112 deletions(-) delete mode 100644 .github/workflows/test-struphy.yml diff --git a/.github/workflows/test-struphy.yml b/.github/workflows/test-struphy.yml deleted file mode 100644 index 10608aa09..000000000 --- a/.github/workflows/test-struphy.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Test struphy - -on: - push: - branches: [devel-tiny] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - test_struphy: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ ubuntu-latest ] - python-version: [ '3.12' ] - compile_language: ['c', 'fortran'] - - name: Test Struphy on ${{ matrix.os }} / Python ${{ matrix.python-version }} / ${{ matrix.compile_language }} - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up environment variables - run: | - echo "PSYDAC_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV - echo "STRUPHY_DIR=$GITHUB_WORKSPACE/struphy" >> $GITHUB_ENV - - - name: Check .testmondata 1 - run: | - ls .testmon* || echo "No .testmondata" - - - name: Setup cache for testmon - uses: actions/cache@v4 - with: - path: | - .testmondata-struphy-${{ matrix.compile_language }} - .testmondata-struphy-${{ matrix.compile_language }}-mpi - key: testmon-struphy-${{ matrix.compile_language }}-${{ github.ref_name }}-${{ github.event.number }}-${{ github.run_number }} - restore-keys: | - testmon-struphy-${{ matrix.compile_language }}-${{ github.ref_name }}-${{ github.event.number }}- - testmon-struphy-${{ matrix.compile_language }}-${{ github.ref_name }} - testmon-struphy-${{ matrix.compile_language }}-devel - testmon-struphy-${{ matrix.compile_language }}- - testmon-struphy- - - - name: Check .testmondata 2 - run: | - ls .testmon* || echo "No .testmondata" - - - name: Install prerequisites - uses: ./.github/actions/install/psydac-req - - - name: Install project without mpi - run: | - python -m pip install ".[test]" --no-cache-dir - python -m pip freeze - - - name: Clone struphy from Github - run: | - git clone https://github.com/struphy-hub/struphy.git $STRUPHY_DIR - - - name: Install struphy without mpi #TODO: Set branch to devel - working-directory: ${{ env.STRUPHY_DIR }} - run: | - pip show feectools - pip uninstall feectools -y - python -m pip install ".[phys]" --no-cache-dir - echo "feectools location after installing struphy" - pip show feectools - - - name: Re-install feectools from the current branch - run: | - psydac-accelerate --cleanup --yes - pip show feectools - pip uninstall feectools -y - python -m pip install ${{ env.PSYDAC_DIR }} --force-reinstall --no-cache-dir - echo "feectools location after installing feectools from the current branch (should be the same as in the previous step)" - pip show feectools - - - name: Compile struphy - run: | - pip show feectools - struphy -h - struphy compile -y --language ${{ matrix.compile_language }} - - - name: Run struphy unit tests - env: - TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }} - run: | - struphy test unit - - - name: Run struphy model tests - env: - TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }} - run: | - struphy test models - - - name: Install mpi4py - run: | - pip install -U mpi4py - - - name: Run struphy model tests with mpi - env: - TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }}-mpi - run: | - struphy test Maxwell - struphy test models --mpi 2 From 8dd343323721569653b651154027a2f67c2b4d73 Mon Sep 17 00:00:00 2001 From: Stefan Possanner Date: Thu, 29 Jan 2026 13:41:13 +0100 Subject: [PATCH 3/4] change struphy path for unit tests --- .github/workflows/test-PR-struphy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-PR-struphy.yml b/.github/workflows/test-PR-struphy.yml index 146d96a29..97adbaeb9 100644 --- a/.github/workflows/test-PR-struphy.yml +++ b/.github/workflows/test-PR-struphy.yml @@ -97,6 +97,7 @@ jobs: echo "Struphy is installed at: $STRUPHY_PATH" echo "STRUPHY_PATH=${STRUPHY_PATH}" >> $GITHUB_ENV mpirun -n 1 pytest -m single --testmon-forceselect -s --with-mpi --model-name Maxwell $STRUPHY_PATH + cd $STRUPHY_PATH pytest --testmon $TEST_FILES - name: Run struphy model tests From 278908bdb513a402ae4121843f4887467b4a61b2 Mon Sep 17 00:00:00 2001 From: Stefan Possanner Date: Thu, 29 Jan 2026 13:42:29 +0100 Subject: [PATCH 4/4] bump version number --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 80cef7ef3..dafc3f469 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "feectools" -version = "0.1.2" +version = "0.1.3" description = "Slimmed-down fork of Psydac (https://github.com/pyccel/psydac) with less functionality and fewer dependencies." readme = "README.md" requires-python = ">= 3.10"