From 6e583b74d2ce72a71b945f14f0e855b4dd6b49f5 Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Thu, 9 Jul 2026 09:05:07 +0530 Subject: [PATCH 1/4] Add tutorial Python dependency reference manifest for #610 Add loose version constraints to remaining tutorial requirements.txt files, generate requirements-reference.txt from PyPI, and check it in CI. --- .github/pull_request_template.md | 1 + .../check-requirements-reference.yml | 32 ++ README.md | 18 + changelog-entries/610.md | 1 + .../fluid-nutils/requirements.txt | 4 +- .../fluid-nutils/requirements.txt | 4 +- .../transport-nutils/requirements.txt | 4 +- elastic-tube-1d/fluid-python/requirements.txt | 2 +- .../controller-fmi/requirements.txt | 2 +- .../solid-fenicsx/requirements.txt | 4 +- .../solid-nutils/requirements.txt | 2 +- .../solver-python/requirements.txt | 2 +- oscillator/mass-left-fmi/requirements.txt | 4 +- oscillator/mass-right-fmi/requirements.txt | 4 +- oscillator/solver-fmi/requirements.txt | 4 +- oscillator/solver-python/requirements.txt | 2 +- .../neumann-surrogate/requirements.txt | 2 +- .../solver-scipy/requirements.txt | 2 +- partitioned-burgers-1d/utils/requirements.txt | 2 +- .../solver-fenicsx/requirements.txt | 8 +- .../solver-fenics/requirements.txt | 2 +- .../dirichlet-nutils/requirements.txt | 2 +- .../neumann-nutils/requirements.txt | 2 +- .../dirichlet-nutils/requirements.txt | 2 +- .../neumann-nutils/requirements.txt | 2 +- .../solver-fenics/requirements.txt | 2 +- .../solver-fenicsx/requirements.txt | 6 +- .../fluid1d-left-nutils/requirements.txt | 4 +- .../fluid1d-right-nutils/requirements.txt | 4 +- .../fluid-nutils/requirements.txt | 2 +- .../solid-fenics/requirements.txt | 2 +- .../solid-nutils/requirements.txt | 2 +- requirements-reference.txt | 342 ++++++++++++++++++ .../capacitor-python/requirements.txt | 2 +- resonant-circuit/coil-python/requirements.txt | 2 +- tools/report_tutorial_requirements.py | 204 +++++++++++ turek-hron-fsi3/fluid-nutils/requirements.txt | 8 +- turek-hron-fsi3/solid-nutils/requirements.txt | 8 +- .../macro-nutils/requirements.txt | 2 +- .../micro-nutils/requirements.txt | 4 +- .../source-nutils/requirements.txt | 2 +- .../fluid1d-left-nutils/requirements.txt | 6 +- .../fluid1d-right-nutils/requirements.txt | 6 +- .../soil-creep-landlab/requirements.txt | 4 +- .../wolf-sheep-grass-mesa/requirements.txt | 6 +- 45 files changed, 665 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/check-requirements-reference.yml create mode 100644 changelog-entries/610.md create mode 100644 requirements-reference.txt create mode 100644 tools/report_tutorial_requirements.py diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b5a665647..c1ad90288 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,6 +3,7 @@ TODO: Summarize and motivate the changes, link to issues, remove the checklist e ## Checklist - [ ] I added a summary of any user-facing changes (compared to the last release) in the `changelog-entries/.md`. +- [ ] If I changed tutorial `requirements.txt` files, I regenerated `requirements-reference.txt` with `python3 tools/report_tutorial_requirements.py`. For new tutorials or tutorial cases: diff --git a/.github/workflows/check-requirements-reference.yml b/.github/workflows/check-requirements-reference.yml new file mode 100644 index 000000000..a8b52fa14 --- /dev/null +++ b/.github/workflows/check-requirements-reference.yml @@ -0,0 +1,32 @@ +name: Check requirements-reference +on: + push: + branches: + - master + - develop + paths: + - '**/requirements.txt' + - requirements-reference.txt + - tools/report_tutorial_requirements.py + pull_request: + branches: + - master + - develop + paths: + - '**/requirements.txt' + - requirements-reference.txt + - tools/report_tutorial_requirements.py +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v7 + - name: Setup python + uses: actions/setup-python@v6 + with: + python-version: '3.10' + - name: Install packaging + run: pip install packaging + - name: Check requirements-reference.txt + run: python3 tools/report_tutorial_requirements.py --check diff --git a/README.md b/README.md index e0a766aff..0ff428fd2 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,21 @@ As a general rule, you can start each participant from inside their `/ Contributions to this repository are very welcome. Please refer to the page [Contribute to preCICE](https://precice.org/community-contribute-to-precice.html) for a few guidelines and hints to help you in this direction. Note that we use [Git LFS](https://git-lfs.com/) to version reference results. These will appear as seemingly empty files containing URLs if you don't have Git LFS installed (optional, mainly useful for our system tests). + +## Python dependencies + +Each Python participant lists dependencies in its local `requirements.txt` using loose version ranges (for example `numpy >1, <2`, `pyprecice~=3.0`). Tutorial `run.sh` scripts install from these files as before. + +The repository root file `requirements-reference.txt` records the latest PyPI versions that satisfy those constraints at generation time. Regenerate it after changing tutorial requirements: + +```bash +python3 tools/report_tutorial_requirements.py +python3 tools/report_tutorial_requirements.py --check # CI-style check +``` + +This reference manifest is for documentation and reproducibility; it is not used by tutorial run scripts. + +Legacy FEniCS packages (for example `fenics-dolfin`) are installed from the system or PPA in several tutorials and are listed in the reference file as non-PyPI dependencies. + +When preparing a release pull request to `master`, regenerate and commit `requirements-reference.txt` so the pinned snapshot matches the current tutorial constraints. + diff --git a/changelog-entries/610.md b/changelog-entries/610.md new file mode 100644 index 000000000..530b2d27d --- /dev/null +++ b/changelog-entries/610.md @@ -0,0 +1 @@ +- Add loose version constraints to tutorial `requirements.txt` files, a root `requirements-reference.txt` manifest generated from PyPI via `tools/report_tutorial_requirements.py`, and a CI check that keeps the manifest up to date (fixes [#610](https://github.com/precice/tutorials/issues/610)). diff --git a/channel-transport-particles/fluid-nutils/requirements.txt b/channel-transport-particles/fluid-nutils/requirements.txt index e535d45e9..5b7dc1cf6 100644 --- a/channel-transport-particles/fluid-nutils/requirements.txt +++ b/channel-transport-particles/fluid-nutils/requirements.txt @@ -1,5 +1,5 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 -setuptools +setuptools>=69.0.0 diff --git a/channel-transport/fluid-nutils/requirements.txt b/channel-transport/fluid-nutils/requirements.txt index e535d45e9..5b7dc1cf6 100644 --- a/channel-transport/fluid-nutils/requirements.txt +++ b/channel-transport/fluid-nutils/requirements.txt @@ -1,5 +1,5 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 -setuptools +setuptools>=69.0.0 diff --git a/channel-transport/transport-nutils/requirements.txt b/channel-transport/transport-nutils/requirements.txt index 575bd072d..8fba7d1f2 100644 --- a/channel-transport/transport-nutils/requirements.txt +++ b/channel-transport/transport-nutils/requirements.txt @@ -1,5 +1,5 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice >=3.2 # Remeshing support is available since preCICE version 3.2 -setuptools +setuptools>=69.0.0 diff --git a/elastic-tube-1d/fluid-python/requirements.txt b/elastic-tube-1d/fluid-python/requirements.txt index 20ab73eb9..4bb3e60a1 100644 --- a/elastic-tube-1d/fluid-python/requirements.txt +++ b/elastic-tube-1d/fluid-python/requirements.txt @@ -1,3 +1,3 @@ -matplotlib +matplotlib>=3.5,<4 numpy >1, <2 pyprecice~=3.0 \ No newline at end of file diff --git a/flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt b/flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt index e5648c0bb..2e9bc5841 100644 --- a/flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt +++ b/flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt @@ -1,2 +1,2 @@ pyprecice~=3.0 -fmiprecice \ No newline at end of file +fmiprecice~=0.2 diff --git a/flow-over-heated-plate/solid-fenicsx/requirements.txt b/flow-over-heated-plate/solid-fenicsx/requirements.txt index b36876a55..a06d7331a 100644 --- a/flow-over-heated-plate/solid-fenicsx/requirements.txt +++ b/flow-over-heated-plate/solid-fenicsx/requirements.txt @@ -1,3 +1,3 @@ -numpy -fenicsxprecice +numpy >1, <2 +fenicsxprecice~=1.0 mpi4py>=3 diff --git a/flow-over-heated-plate/solid-nutils/requirements.txt b/flow-over-heated-plate/solid-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/flow-over-heated-plate/solid-nutils/requirements.txt +++ b/flow-over-heated-plate/solid-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/oscillator-overlap/solver-python/requirements.txt b/oscillator-overlap/solver-python/requirements.txt index 9dff131c5..d61415287 100644 --- a/oscillator-overlap/solver-python/requirements.txt +++ b/oscillator-overlap/solver-python/requirements.txt @@ -1,3 +1,3 @@ numpy >1, <2 pyprecice~=3.0 -scipy +scipy>=1.10,<2 diff --git a/oscillator/mass-left-fmi/requirements.txt b/oscillator/mass-left-fmi/requirements.txt index 7fd826089..97d630672 100644 --- a/oscillator/mass-left-fmi/requirements.txt +++ b/oscillator/mass-left-fmi/requirements.txt @@ -1,3 +1,3 @@ pyprecice~=3.0 -fmiprecice -pandas \ No newline at end of file +fmiprecice~=0.2 +pandas>=2.0,<3 diff --git a/oscillator/mass-right-fmi/requirements.txt b/oscillator/mass-right-fmi/requirements.txt index 7fd826089..97d630672 100644 --- a/oscillator/mass-right-fmi/requirements.txt +++ b/oscillator/mass-right-fmi/requirements.txt @@ -1,3 +1,3 @@ pyprecice~=3.0 -fmiprecice -pandas \ No newline at end of file +fmiprecice~=0.2 +pandas>=2.0,<3 diff --git a/oscillator/solver-fmi/requirements.txt b/oscillator/solver-fmi/requirements.txt index 7fd826089..97d630672 100644 --- a/oscillator/solver-fmi/requirements.txt +++ b/oscillator/solver-fmi/requirements.txt @@ -1,3 +1,3 @@ pyprecice~=3.0 -fmiprecice -pandas \ No newline at end of file +fmiprecice~=0.2 +pandas>=2.0,<3 diff --git a/oscillator/solver-python/requirements.txt b/oscillator/solver-python/requirements.txt index 9dff131c5..d61415287 100644 --- a/oscillator/solver-python/requirements.txt +++ b/oscillator/solver-python/requirements.txt @@ -1,3 +1,3 @@ numpy >1, <2 pyprecice~=3.0 -scipy +scipy>=1.10,<2 diff --git a/partitioned-burgers-1d/neumann-surrogate/requirements.txt b/partitioned-burgers-1d/neumann-surrogate/requirements.txt index a6c5a6ba6..499ae35cf 100644 --- a/partitioned-burgers-1d/neumann-surrogate/requirements.txt +++ b/partitioned-burgers-1d/neumann-surrogate/requirements.txt @@ -5,5 +5,5 @@ numpy~=2.0 # Known to work with 2.3.5 scipy~=1.0 # Known to work with 1.16.3 torch~=2.0 # Known to work with 2.9.1 -matplotlib # Known to work with 3.10.8 +matplotlib~=3.0 # Known to work with 3.10.8 pyprecice~=3.0 \ No newline at end of file diff --git a/partitioned-burgers-1d/solver-scipy/requirements.txt b/partitioned-burgers-1d/solver-scipy/requirements.txt index fd0fc69d2..4a8418df6 100644 --- a/partitioned-burgers-1d/solver-scipy/requirements.txt +++ b/partitioned-burgers-1d/solver-scipy/requirements.txt @@ -1,4 +1,4 @@ numpy~=2.0 # Known to work with 2.3.5 scipy~=1.0 # Known to work with 1.16.3 -matplotlib # Known to work with 3.10.8 +matplotlib~=3.0 # Known to work with 3.10.8 pyprecice~=3.0 \ No newline at end of file diff --git a/partitioned-burgers-1d/utils/requirements.txt b/partitioned-burgers-1d/utils/requirements.txt index e0f6fa21d..8b7df5b54 100644 --- a/partitioned-burgers-1d/utils/requirements.txt +++ b/partitioned-burgers-1d/utils/requirements.txt @@ -1,2 +1,2 @@ numpy~=2.0 # Known to work with 2.3.5 -matplotlib # Known to work with 3.10.8 \ No newline at end of file +matplotlib~=3.0 # Known to work with 3.10.8 \ No newline at end of file diff --git a/partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt b/partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt index 1759af720..0c528ba4b 100644 --- a/partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt +++ b/partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt @@ -1,5 +1,5 @@ numpy >1, <2 -fenicsxprecice -scipy -sympy -gmsh +fenicsxprecice~=1.0 +scipy>=1.10,<2 +sympy>=1.10,<2 +gmsh>=4,<5 diff --git a/partitioned-heat-conduction-complex/solver-fenics/requirements.txt b/partitioned-heat-conduction-complex/solver-fenics/requirements.txt index 04561a50f..9c23e91cf 100644 --- a/partitioned-heat-conduction-complex/solver-fenics/requirements.txt +++ b/partitioned-heat-conduction-complex/solver-fenics/requirements.txt @@ -1,6 +1,6 @@ fenicsprecice~=2.0 numpy >1, <2 -sympy +sympy>=1.10,<2 # Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/ # Use --system-site-packages in venv diff --git a/partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt b/partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt +++ b/partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/partitioned-heat-conduction-direct/neumann-nutils/requirements.txt b/partitioned-heat-conduction-direct/neumann-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/partitioned-heat-conduction-direct/neumann-nutils/requirements.txt +++ b/partitioned-heat-conduction-direct/neumann-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/partitioned-heat-conduction/dirichlet-nutils/requirements.txt b/partitioned-heat-conduction/dirichlet-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/partitioned-heat-conduction/dirichlet-nutils/requirements.txt +++ b/partitioned-heat-conduction/dirichlet-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/partitioned-heat-conduction/neumann-nutils/requirements.txt b/partitioned-heat-conduction/neumann-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/partitioned-heat-conduction/neumann-nutils/requirements.txt +++ b/partitioned-heat-conduction/neumann-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/partitioned-heat-conduction/solver-fenics/requirements.txt b/partitioned-heat-conduction/solver-fenics/requirements.txt index 190ff55e4..b7f8077bd 100644 --- a/partitioned-heat-conduction/solver-fenics/requirements.txt +++ b/partitioned-heat-conduction/solver-fenics/requirements.txt @@ -1,6 +1,6 @@ numpy >1, <2 fenicsprecice~=2.0 -scipy +scipy>=1.10,<2 # Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/ # Use --system-site-packages in venv diff --git a/partitioned-heat-conduction/solver-fenicsx/requirements.txt b/partitioned-heat-conduction/solver-fenicsx/requirements.txt index 85fc7389a..2985d2c89 100644 --- a/partitioned-heat-conduction/solver-fenicsx/requirements.txt +++ b/partitioned-heat-conduction/solver-fenicsx/requirements.txt @@ -1,5 +1,5 @@ numpy >1, <2 -fenicsxprecice -scipy -sympy +fenicsxprecice~=1.0 +scipy>=1.10,<2 +sympy>=1.10,<2 mpi4py>=3 diff --git a/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt b/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt index 758176da0..f4fc6880f 100644 --- a/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt +++ b/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt @@ -1,5 +1,5 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib \ No newline at end of file +matplotlib>=3.5,<4 \ No newline at end of file diff --git a/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt b/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt index 758176da0..f4fc6880f 100644 --- a/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt +++ b/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt @@ -1,5 +1,5 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib \ No newline at end of file +matplotlib>=3.5,<4 \ No newline at end of file diff --git a/perpendicular-flap/fluid-nutils/requirements.txt b/perpendicular-flap/fluid-nutils/requirements.txt index b81f4ff8f..ecf10833d 100644 --- a/perpendicular-flap/fluid-nutils/requirements.txt +++ b/perpendicular-flap/fluid-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=6.0 numpy >1, <2 pyprecice~=3.0 diff --git a/perpendicular-flap/solid-fenics/requirements.txt b/perpendicular-flap/solid-fenics/requirements.txt index 1b61f98a2..55f045e6c 100644 --- a/perpendicular-flap/solid-fenics/requirements.txt +++ b/perpendicular-flap/solid-fenics/requirements.txt @@ -1,6 +1,6 @@ fenicsprecice~=2.2 numpy >1, <2 -matplotlib +matplotlib>=3.5,<4 # Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/ # Use --system-site-packages in venv diff --git a/perpendicular-flap/solid-nutils/requirements.txt b/perpendicular-flap/solid-nutils/requirements.txt index 8ae441ba1..cfcb0a3ae 100644 --- a/perpendicular-flap/solid-nutils/requirements.txt +++ b/perpendicular-flap/solid-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils>=8.5 numpy >1, <2 pyprecice~=3.0 diff --git a/requirements-reference.txt b/requirements-reference.txt new file mode 100644 index 000000000..b0afc7e45 --- /dev/null +++ b/requirements-reference.txt @@ -0,0 +1,342 @@ +# Pinned Python dependency versions for preCICE tutorial distributions. +# Reference manifest only: tutorial run scripts keep using loose requirements.txt constraints. +# Generated by tools/report_tutorial_requirements.py — do not edit manually. +# Generated: 2026-07-09T03:13:12Z + +# channel-transport/fluid-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 +setuptools==83.0.0 + +# channel-transport/transport-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 +setuptools==83.0.0 + +# channel-transport-particles/fluid-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 +setuptools==83.0.0 + +# channel-transport-reaction/chemical-fenics/requirements.txt +numpy==1.26.4 +fenicsprecice==2.3.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# channel-transport-reaction/fluid-fenics/requirements.txt +numpy==1.26.4 +fenicsprecice==2.3.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# elastic-tube-1d/fluid-python/requirements.txt +matplotlib==3.11.0 +numpy==1.26.4 +pyprecice==3.4.0 + +# elastic-tube-1d/solid-python/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 + +# elastic-tube-3d/solid-fenics/requirements.txt +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt +pyprecice==3.4.0 +fmiprecice==0.2.1 + +# flow-around-controlled-moving-cylinder/solid-python/requirements.txt +pyprecice==3.4.0 +numpy==1.26.4 + +# flow-over-heated-plate/fluid-su2/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 + +# flow-over-heated-plate/solid-dunefem/requirements.txt +dune-fem==2.12.0.2 +pyprecice==3.4.0 + +# flow-over-heated-plate/solid-fenics/requirements.txt +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# flow-over-heated-plate/solid-fenicsx/requirements.txt +numpy==1.26.4 +fenicsxprecice==1.0.1 +mpi4py==4.1.2 + +# flow-over-heated-plate/solid-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# oscillator/mass-left-fmi/requirements.txt +pyprecice==3.4.0 +fmiprecice==0.2.1 +pandas==2.3.3 + +# oscillator/mass-right-fmi/requirements.txt +pyprecice==3.4.0 +fmiprecice==0.2.1 +pandas==2.3.3 + +# oscillator/solver-fmi/requirements.txt +pyprecice==3.4.0 +fmiprecice==0.2.1 +pandas==2.3.3 + +# oscillator/solver-python/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 +scipy==1.18.0 + +# oscillator-overlap/solver-python/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 +scipy==1.18.0 + +# partitioned-burgers-1d/neumann-surrogate/requirements.txt +--extra-index-url https://download.pytorch.org/whl/cpu +numpy==2.5.1 +scipy==1.18.0 +torch==2.13.0 +matplotlib==3.11.0 +pyprecice==3.4.0 + +# partitioned-burgers-1d/solver-scipy/requirements.txt +numpy==2.5.1 +scipy==1.18.0 +matplotlib==3.11.0 +pyprecice==3.4.0 + +# partitioned-burgers-1d/utils/requirements.txt +numpy==2.5.1 +matplotlib==3.11.0 + +# partitioned-heat-conduction/dirichlet-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# partitioned-heat-conduction/neumann-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# partitioned-heat-conduction/solver-fenics/requirements.txt +numpy==1.26.4 +fenicsprecice==2.3.0 +scipy==1.18.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# partitioned-heat-conduction/solver-fenicsx/requirements.txt +numpy==1.26.4 +fenicsxprecice==1.0.1 +scipy==1.18.0 +sympy==1.14.0 +mpi4py==4.1.2 + +# partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt +numpy==1.26.4 +fenicsxprecice==1.0.1 +scipy==1.18.0 +sympy==1.14.0 +gmsh==4.15.2 + +# partitioned-heat-conduction-complex/solver-fenics/requirements.txt +fenicsprecice==2.3.0 +numpy==1.26.4 +sympy==1.14.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# partitioned-heat-conduction-direct/neumann-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# partitioned-heat-conduction-overlap/solver-fenics/requirements.txt +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 + +# partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 + +# perpendicular-flap/fluid-fake/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 + +# perpendicular-flap/fluid-nutils/requirements.txt +setuptools==83.0.0 +nutils==6.3 +numpy==1.26.4 +pyprecice==3.4.0 +treelog==1.0 + +# perpendicular-flap/fluid-su2/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 + +# perpendicular-flap/solid-fake/requirements.txt +numpy==1.26.4 +pyprecice==3.4.0 + +# perpendicular-flap/solid-fenics/requirements.txt +fenicsprecice==2.3.0 +numpy==1.26.4 +matplotlib==3.11.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# perpendicular-flap/solid-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 + +# resonant-circuit/capacitor-python/requirements.txt +numpy==1.26.4 +scipy==1.18.0 +pyprecice==3.4.0 + +# resonant-circuit/coil-python/requirements.txt +numpy==1.26.4 +scipy==1.18.0 +pyprecice==3.4.0 + +# turek-hron-fsi3/fluid-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +meshio==5.3.5 +gmsh==4.15.2 +matplotlib==3.11.0 + +# turek-hron-fsi3/solid-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +meshio==5.3.5 +gmsh==4.15.2 +matplotlib==3.11.0 + +# two-scale-heat-conduction/macro-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# two-scale-heat-conduction/micro-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 +micro-manager-precice==0.10.1 + +# volume-coupled-diffusion/solver-fenics/requirements.txt +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 + +# volume-coupled-flow/source-nutils/requirements.txt +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 + +# water-hammer/fluid1d-left-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 +treelog==1.0 + +# water-hammer/fluid1d-right-nutils/requirements.txt +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 +treelog==1.0 + +# wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt +numpy==1.26.4 +matplotlib==3.11.0 +landlab==2.11.0 +pyprecice==3.4.0 + +# wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt +numpy==1.26.4 +matplotlib==3.11.0 +mesa==3.5.1 +pyprecice==3.4.0 +networkx==3.6.1 + diff --git a/resonant-circuit/capacitor-python/requirements.txt b/resonant-circuit/capacitor-python/requirements.txt index 2b8edf2ba..814a5c7dc 100644 --- a/resonant-circuit/capacitor-python/requirements.txt +++ b/resonant-circuit/capacitor-python/requirements.txt @@ -1,3 +1,3 @@ numpy >1, <2 -scipy +scipy>=1.10,<2 pyprecice~=3.0 diff --git a/resonant-circuit/coil-python/requirements.txt b/resonant-circuit/coil-python/requirements.txt index 2b8edf2ba..814a5c7dc 100644 --- a/resonant-circuit/coil-python/requirements.txt +++ b/resonant-circuit/coil-python/requirements.txt @@ -1,3 +1,3 @@ numpy >1, <2 -scipy +scipy>=1.10,<2 pyprecice~=3.0 diff --git a/tools/report_tutorial_requirements.py b/tools/report_tutorial_requirements.py new file mode 100644 index 000000000..7a39e2012 --- /dev/null +++ b/tools/report_tutorial_requirements.py @@ -0,0 +1,204 @@ +#!/usr/bin/env python3 +""" +Report resolved Python dependency versions for tutorial requirements.txt files. + +Scans every tutorial requirements.txt (excluding tools/tests/), queries PyPI for +the latest version satisfying each constraint, and writes requirements-reference.txt. + +Run from the repository root: + python3 tools/report_tutorial_requirements.py + python3 tools/report_tutorial_requirements.py --check +""" +from __future__ import annotations + +import argparse +import json +import re +import subprocess +import sys +import urllib.error +import urllib.request +from datetime import datetime, timezone +from pathlib import Path + +from packaging.requirements import Requirement +from packaging.specifiers import SpecifierSet +from packaging.utils import canonicalize_name +from packaging.version import Version + +REPO_ROOT = Path(__file__).resolve().parent.parent +REFERENCE_FILE = REPO_ROOT / "requirements-reference.txt" +EXCLUDED_RELATIVE = { + "tools/tests/requirements.txt", + # Not a pip requirements file (lists stdlib os, unpinned vtk); see develop naming quirk. + "flow-over-heated-plate/plot-final-interface-temperature-requirements.txt", +} + +_PYPI_VERSIONS_CACHE: dict[str, list[Version]] = {} +_RESOLVED_CACHE: dict[str, str | None] = {} + +_HEADER = """\ +# Pinned Python dependency versions for preCICE tutorial distributions. +# Reference manifest only: tutorial run scripts keep using loose requirements.txt constraints. +# Generated by tools/report_tutorial_requirements.py — do not edit manually. +# Generated: {timestamp} + +""" + + +def discover_requirements_files() -> list[Path]: + """Return git-tracked tutorial requirements.txt files only.""" + result = subprocess.run( + ["git", "ls-files", "--", "**/requirements.txt"], + cwd=REPO_ROOT, + capture_output=True, + text=True, + check=True, + ) + files: list[Path] = [] + for line in result.stdout.splitlines(): + relative = line.strip() + if not relative or relative in EXCLUDED_RELATIVE: + continue + files.append(REPO_ROOT / relative) + return sorted(files) + + +def parse_requirement_line(line: str) -> str | None: + stripped = line.strip() + if not stripped or stripped.startswith("#") or stripped.startswith("--"): + return None + if " #" in stripped: + stripped = stripped.split(" #", 1)[0].strip() + return stripped or None + + +def fetch_pypi_versions(package_name: str) -> list[Version]: + canonical = canonicalize_name(package_name) + if canonical in _PYPI_VERSIONS_CACHE: + return _PYPI_VERSIONS_CACHE[canonical] + + url = f"https://pypi.org/pypi/{package_name}/json" + request = urllib.request.Request(url, headers={"Accept": "application/json"}) + try: + with urllib.request.urlopen(request, timeout=30) as response: + payload = json.load(response) + except urllib.error.HTTPError as exc: + if exc.code == 404: + return [] + raise + + versions: list[Version] = [] + for version_str in payload.get("releases", {}): + try: + versions.append(Version(version_str)) + except Exception: + continue + _PYPI_VERSIONS_CACHE[canonical] = versions + return versions + + +def resolve_pypi_version(requirement: Requirement) -> str | None: + cache_key = str(requirement) + if cache_key in _RESOLVED_CACHE: + return _RESOLVED_CACHE[cache_key] + + if requirement.url: + _RESOLVED_CACHE[cache_key] = None + return None + + versions = fetch_pypi_versions(requirement.name) + if not versions: + _RESOLVED_CACHE[cache_key] = None + return None + + specifier = requirement.specifier if str(requirement.specifier) else SpecifierSet() + compatible = [version for version in versions if specifier.contains(version, prereleases=False)] + if not compatible: + _RESOLVED_CACHE[cache_key] = None + return None + resolved = str(max(compatible)) + _RESOLVED_CACHE[cache_key] = resolved + return resolved + + +def format_resolved_requirement(requirement_line: str) -> str: + requirement = Requirement(requirement_line) + if requirement.url: + return requirement_line + + resolved = resolve_pypi_version(requirement) + if resolved is None: + return f"# {requirement_line} # non-PyPI (system/PPA or no matching PyPI version)" + return f"{requirement.name}=={resolved}" + + +def generate_reference_text() -> str: + timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") + sections: list[str] = [_HEADER.format(timestamp=timestamp)] + + for req_file in discover_requirements_files(): + relative = req_file.relative_to(REPO_ROOT).as_posix() + sections.append(f"# {relative}\n") + for line in req_file.read_text().splitlines(): + stripped = line.strip() + if stripped.startswith("--"): + sections.append(line + "\n") + continue + requirement_line = parse_requirement_line(line) + if requirement_line is None: + continue + sections.append(format_resolved_requirement(requirement_line) + "\n") + sections.append("\n") + + return "".join(sections) + + +def normalize_for_check(text: str) -> str: + """Ignore generation timestamp when comparing reference files.""" + return re.sub(r"^# Generated: .*\n", "# Generated: \n", text, count=1, flags=re.MULTILINE) + + +def main() -> int: + parser = argparse.ArgumentParser( + description="Report resolved tutorial Python dependencies from PyPI" + ) + parser.add_argument( + "--check", + action="store_true", + help="Exit 1 if requirements-reference.txt is out of date", + ) + parser.add_argument( + "--output", + type=Path, + default=REFERENCE_FILE, + help="Output path (default: requirements-reference.txt at repo root)", + ) + args = parser.parse_args() + + generated = generate_reference_text() + + if args.check: + if not args.output.exists(): + print( + f"ERROR: {args.output} not found. Run: python3 tools/report_tutorial_requirements.py", + file=sys.stderr, + ) + return 1 + current = args.output.read_text() + if normalize_for_check(current) != normalize_for_check(generated): + print( + f"ERROR: {args.output} is out of date. Run: python3 tools/report_tutorial_requirements.py", + file=sys.stderr, + ) + return 1 + print(f"OK: {args.output} is up to date") + return 0 + + args.output.write_text(generated) + print(f"Wrote {args.output}") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/turek-hron-fsi3/fluid-nutils/requirements.txt b/turek-hron-fsi3/fluid-nutils/requirements.txt index de8073acb..f324f08fe 100644 --- a/turek-hron-fsi3/fluid-nutils/requirements.txt +++ b/turek-hron-fsi3/fluid-nutils/requirements.txt @@ -1,7 +1,7 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -meshio -gmsh -matplotlib +meshio>=5,<6 +gmsh>=4,<5 +matplotlib>=3.5,<4 diff --git a/turek-hron-fsi3/solid-nutils/requirements.txt b/turek-hron-fsi3/solid-nutils/requirements.txt index de8073acb..f324f08fe 100644 --- a/turek-hron-fsi3/solid-nutils/requirements.txt +++ b/turek-hron-fsi3/solid-nutils/requirements.txt @@ -1,7 +1,7 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -meshio -gmsh -matplotlib +meshio>=5,<6 +gmsh>=4,<5 +matplotlib>=3.5,<4 diff --git a/two-scale-heat-conduction/macro-nutils/requirements.txt b/two-scale-heat-conduction/macro-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/two-scale-heat-conduction/macro-nutils/requirements.txt +++ b/two-scale-heat-conduction/macro-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/two-scale-heat-conduction/micro-nutils/requirements.txt b/two-scale-heat-conduction/micro-nutils/requirements.txt index 6bcbfdaff..8256d3119 100644 --- a/two-scale-heat-conduction/micro-nutils/requirements.txt +++ b/two-scale-heat-conduction/micro-nutils/requirements.txt @@ -1,5 +1,5 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 -micro-manager-precice +micro-manager-precice~=0.10 diff --git a/volume-coupled-flow/source-nutils/requirements.txt b/volume-coupled-flow/source-nutils/requirements.txt index 7ff7b5aa1..f22e7ac25 100644 --- a/volume-coupled-flow/source-nutils/requirements.txt +++ b/volume-coupled-flow/source-nutils/requirements.txt @@ -1,4 +1,4 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 diff --git a/water-hammer/fluid1d-left-nutils/requirements.txt b/water-hammer/fluid1d-left-nutils/requirements.txt index 721a30444..34177a257 100644 --- a/water-hammer/fluid1d-left-nutils/requirements.txt +++ b/water-hammer/fluid1d-left-nutils/requirements.txt @@ -1,6 +1,6 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib -treelog \ No newline at end of file +matplotlib>=3.5,<4 +treelog>=1,<2 \ No newline at end of file diff --git a/water-hammer/fluid1d-right-nutils/requirements.txt b/water-hammer/fluid1d-right-nutils/requirements.txt index 721a30444..34177a257 100644 --- a/water-hammer/fluid1d-right-nutils/requirements.txt +++ b/water-hammer/fluid1d-right-nutils/requirements.txt @@ -1,6 +1,6 @@ -setuptools # required by nutils +setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib -treelog \ No newline at end of file +matplotlib>=3.5,<4 +treelog>=1,<2 \ No newline at end of file diff --git a/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt b/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt index 16efd4ddd..b414e0236 100644 --- a/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt +++ b/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt @@ -1,4 +1,4 @@ numpy >1, <2 -matplotlib -landlab +matplotlib>=3.5,<4 +landlab>=2.0,<3 pyprecice~=3.0 diff --git a/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt b/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt index f9ccca730..355f9e10d 100644 --- a/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt +++ b/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt @@ -1,5 +1,5 @@ numpy >1, <2 -matplotlib -mesa>=3 +matplotlib>=3.5,<4 +mesa>=3,<4 pyprecice~=3.0 -networkx +networkx>=3,<4 From 626dd483153d2ed53244f169df704854c9098f58 Mon Sep 17 00:00:00 2001 From: Pranjal Date: Thu, 9 Jul 2026 10:59:17 +0530 Subject: [PATCH 2/4] Update 610.md --- changelog-entries/610.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog-entries/610.md b/changelog-entries/610.md index 530b2d27d..dd7f5dd78 100644 --- a/changelog-entries/610.md +++ b/changelog-entries/610.md @@ -1 +1 @@ -- Add loose version constraints to tutorial `requirements.txt` files, a root `requirements-reference.txt` manifest generated from PyPI via `tools/report_tutorial_requirements.py`, and a CI check that keeps the manifest up to date (fixes [#610](https://github.com/precice/tutorials/issues/610)). +- Add loose version constraints to tutorial `requirements.txt` files, a root `requirements-reference.txt` manifest generated from PyPI via `tools/report_tutorial_requirements.py`, and a CI check that keeps the manifest up to date ([#871](https://github.com/precice/tutorials/pull/871)). From f08a2cb2a063cc08fdfceb8c4b31d829cab37b09 Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Thu, 9 Jul 2026 11:02:32 +0530 Subject: [PATCH 3/4] Fix markdownlint MD012 in README.md Remove extra trailing blank line in the Python dependencies section. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0ff428fd2..342771e19 100644 --- a/README.md +++ b/README.md @@ -30,4 +30,3 @@ This reference manifest is for documentation and reproducibility; it is not used Legacy FEniCS packages (for example `fenics-dolfin`) are installed from the system or PPA in several tutorials and are listed in the reference file as non-PyPI dependencies. When preparing a release pull request to `master`, regenerate and commit `requirements-reference.txt` so the pinned snapshot matches the current tutorial constraints. - From 6b5e773674065d9141f368f57a093f97fedc76f6 Mon Sep 17 00:00:00 2001 From: PranjalManhgaye Date: Fri, 10 Jul 2026 22:08:02 +0530 Subject: [PATCH 4/4] Address #871 review: per-participant requirements-reference files Move the generator to tools/releasing/, emit sibling reference files instead of a root manifest, and clean up requirements from review feedback. --- .github/pull_request_template.md | 2 +- .../check-requirements-reference.yml | 12 +- README.md | 17 +- changelog-entries/610.md | 2 +- .../fluid-nutils/requirements-reference.txt | 10 + .../fluid-nutils/requirements.txt | 1 - .../requirements-reference.txt | 13 + .../fluid-fenics/requirements-reference.txt | 13 + .../fluid-nutils/requirements-reference.txt | 10 + .../fluid-nutils/requirements.txt | 1 - .../requirements-reference.txt | 10 + .../transport-nutils/requirements.txt | 1 - .../fluid-python/requirements-reference.txt | 9 + elastic-tube-1d/fluid-python/requirements.txt | 2 +- .../solid-python/requirements-reference.txt | 8 + .../solid-fenics/requirements-reference.txt | 13 + .../controller-fmi/requirements-reference.txt | 8 + .../solid-python/requirements-reference.txt | 8 + flow-over-heated-plate/README.md | 2 +- .../fluid-su2/requirements-reference.txt | 8 + ...nal-interface-temperature-requirements.txt | 4 - .../requirements-reference.txt | 9 + .../requirements.txt | 3 + .../solid-dunefem/requirements-reference.txt | 8 + .../solid-dunefem/requirements.txt | 2 +- .../solid-fenics/requirements-reference.txt | 13 + .../solid-fenicsx/requirements-reference.txt | 9 + .../solid-nutils/requirements-reference.txt | 10 + .../solver-python/requirements-reference.txt | 9 + .../mass-left-fmi/requirements-reference.txt | 9 + .../mass-right-fmi/requirements-reference.txt | 9 + .../solver-fmi/requirements-reference.txt | 9 + .../solver-python/requirements-reference.txt | 9 + .../requirements-reference.txt | 12 + .../neumann-surrogate/requirements.txt | 10 +- .../solver-scipy/requirements-reference.txt | 10 + .../solver-scipy/requirements.txt | 8 +- .../utils/requirements-reference.txt | 8 + partitioned-burgers-1d/utils/requirements.txt | 4 +- .../solver-fenicsx/requirements-reference.txt | 11 + .../solver-fenics/requirements-reference.txt | 14 + .../requirements-reference.txt | 10 + .../neumann-nutils/requirements-reference.txt | 10 + .../solver-fenics/requirements-reference.txt | 13 + .../requirements-reference.txt | 10 + .../neumann-nutils/requirements-reference.txt | 10 + .../solver-fenics/requirements-reference.txt | 14 + .../solver-fenicsx/requirements-reference.txt | 11 + .../requirements-reference.txt | 11 + .../fluid1d-left-nutils/requirements.txt | 2 +- .../requirements-reference.txt | 11 + .../fluid1d-right-nutils/requirements.txt | 2 +- .../fluid-fake/requirements-reference.txt | 8 + .../fluid-nutils/requirements-reference.txt | 11 + .../fluid-su2/requirements-reference.txt | 8 + .../solid-fake/requirements-reference.txt | 8 + .../solid-fenics/requirements-reference.txt | 14 + .../solid-fenics/requirements.txt | 2 +- .../solid-nutils/requirements-reference.txt | 10 + requirements-reference.txt | 342 ------------------ .../requirements-reference.txt | 9 + .../coil-python/requirements-reference.txt | 9 + tools/releasing/README.md | 22 ++ .../report_tutorial_requirements.py | 140 ++++--- .../fluid-nutils/requirements-reference.txt | 13 + turek-hron-fsi3/fluid-nutils/requirements.txt | 2 +- .../solid-nutils/requirements-reference.txt | 13 + turek-hron-fsi3/solid-nutils/requirements.txt | 2 +- .../macro-nutils/requirements-reference.txt | 10 + .../micro-nutils/requirements-reference.txt | 11 + .../micro-nutils/requirements.txt | 2 +- .../solver-fenics/requirements-reference.txt | 13 + .../source-nutils/requirements-reference.txt | 10 + .../requirements-reference.txt | 12 + .../fluid1d-left-nutils/requirements.txt | 2 +- .../requirements-reference.txt | 12 + .../fluid1d-right-nutils/requirements.txt | 2 +- .../requirements-reference.txt | 10 + .../soil-creep-landlab/requirements.txt | 2 +- .../requirements-reference.txt | 11 + .../wolf-sheep-grass-mesa/requirements.txt | 2 +- 81 files changed, 691 insertions(+), 455 deletions(-) create mode 100644 channel-transport-particles/fluid-nutils/requirements-reference.txt create mode 100644 channel-transport-reaction/chemical-fenics/requirements-reference.txt create mode 100644 channel-transport-reaction/fluid-fenics/requirements-reference.txt create mode 100644 channel-transport/fluid-nutils/requirements-reference.txt create mode 100644 channel-transport/transport-nutils/requirements-reference.txt create mode 100644 elastic-tube-1d/fluid-python/requirements-reference.txt create mode 100644 elastic-tube-1d/solid-python/requirements-reference.txt create mode 100644 elastic-tube-3d/solid-fenics/requirements-reference.txt create mode 100644 flow-around-controlled-moving-cylinder/controller-fmi/requirements-reference.txt create mode 100644 flow-around-controlled-moving-cylinder/solid-python/requirements-reference.txt create mode 100644 flow-over-heated-plate/fluid-su2/requirements-reference.txt delete mode 100644 flow-over-heated-plate/plot-final-interface-temperature-requirements.txt create mode 100644 flow-over-heated-plate/plot-final-interface-temperature/requirements-reference.txt create mode 100644 flow-over-heated-plate/plot-final-interface-temperature/requirements.txt create mode 100644 flow-over-heated-plate/solid-dunefem/requirements-reference.txt create mode 100644 flow-over-heated-plate/solid-fenics/requirements-reference.txt create mode 100644 flow-over-heated-plate/solid-fenicsx/requirements-reference.txt create mode 100644 flow-over-heated-plate/solid-nutils/requirements-reference.txt create mode 100644 oscillator-overlap/solver-python/requirements-reference.txt create mode 100644 oscillator/mass-left-fmi/requirements-reference.txt create mode 100644 oscillator/mass-right-fmi/requirements-reference.txt create mode 100644 oscillator/solver-fmi/requirements-reference.txt create mode 100644 oscillator/solver-python/requirements-reference.txt create mode 100644 partitioned-burgers-1d/neumann-surrogate/requirements-reference.txt create mode 100644 partitioned-burgers-1d/solver-scipy/requirements-reference.txt create mode 100644 partitioned-burgers-1d/utils/requirements-reference.txt create mode 100644 partitioned-heat-conduction-3d/solver-fenicsx/requirements-reference.txt create mode 100644 partitioned-heat-conduction-complex/solver-fenics/requirements-reference.txt create mode 100644 partitioned-heat-conduction-direct/dirichlet-nutils/requirements-reference.txt create mode 100644 partitioned-heat-conduction-direct/neumann-nutils/requirements-reference.txt create mode 100644 partitioned-heat-conduction-overlap/solver-fenics/requirements-reference.txt create mode 100644 partitioned-heat-conduction/dirichlet-nutils/requirements-reference.txt create mode 100644 partitioned-heat-conduction/neumann-nutils/requirements-reference.txt create mode 100644 partitioned-heat-conduction/solver-fenics/requirements-reference.txt create mode 100644 partitioned-heat-conduction/solver-fenicsx/requirements-reference.txt create mode 100644 partitioned-pipe-multiscale/fluid1d-left-nutils/requirements-reference.txt create mode 100644 partitioned-pipe-multiscale/fluid1d-right-nutils/requirements-reference.txt create mode 100644 perpendicular-flap/fluid-fake/requirements-reference.txt create mode 100644 perpendicular-flap/fluid-nutils/requirements-reference.txt create mode 100644 perpendicular-flap/fluid-su2/requirements-reference.txt create mode 100644 perpendicular-flap/solid-fake/requirements-reference.txt create mode 100644 perpendicular-flap/solid-fenics/requirements-reference.txt create mode 100644 perpendicular-flap/solid-nutils/requirements-reference.txt delete mode 100644 requirements-reference.txt create mode 100644 resonant-circuit/capacitor-python/requirements-reference.txt create mode 100644 resonant-circuit/coil-python/requirements-reference.txt create mode 100644 tools/releasing/README.md rename tools/{ => releasing}/report_tutorial_requirements.py (54%) create mode 100644 turek-hron-fsi3/fluid-nutils/requirements-reference.txt create mode 100644 turek-hron-fsi3/solid-nutils/requirements-reference.txt create mode 100644 two-scale-heat-conduction/macro-nutils/requirements-reference.txt create mode 100644 two-scale-heat-conduction/micro-nutils/requirements-reference.txt create mode 100644 volume-coupled-diffusion/solver-fenics/requirements-reference.txt create mode 100644 volume-coupled-flow/source-nutils/requirements-reference.txt create mode 100644 water-hammer/fluid1d-left-nutils/requirements-reference.txt create mode 100644 water-hammer/fluid1d-right-nutils/requirements-reference.txt create mode 100644 wolf-sheep-soil-creep/soil-creep-landlab/requirements-reference.txt create mode 100644 wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements-reference.txt diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c1ad90288..d05b89bfc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,7 @@ TODO: Summarize and motivate the changes, link to issues, remove the checklist e ## Checklist - [ ] I added a summary of any user-facing changes (compared to the last release) in the `changelog-entries/.md`. -- [ ] If I changed tutorial `requirements.txt` files, I regenerated `requirements-reference.txt` with `python3 tools/report_tutorial_requirements.py`. +- [ ] If I changed tutorial `requirements.txt` files, I regenerated sibling `requirements-reference.txt` files with `python3 tools/releasing/report_tutorial_requirements.py`. For new tutorials or tutorial cases: diff --git a/.github/workflows/check-requirements-reference.yml b/.github/workflows/check-requirements-reference.yml index a8b52fa14..8fd552cb6 100644 --- a/.github/workflows/check-requirements-reference.yml +++ b/.github/workflows/check-requirements-reference.yml @@ -6,16 +6,16 @@ on: - develop paths: - '**/requirements.txt' - - requirements-reference.txt - - tools/report_tutorial_requirements.py + - '**/requirements-reference.txt' + - tools/releasing/report_tutorial_requirements.py pull_request: branches: - master - develop paths: - '**/requirements.txt' - - requirements-reference.txt - - tools/report_tutorial_requirements.py + - '**/requirements-reference.txt' + - tools/releasing/report_tutorial_requirements.py jobs: check: runs-on: ubuntu-latest @@ -28,5 +28,5 @@ jobs: python-version: '3.10' - name: Install packaging run: pip install packaging - - name: Check requirements-reference.txt - run: python3 tools/report_tutorial_requirements.py --check + - name: Check requirements-reference.txt files + run: python3 tools/releasing/report_tutorial_requirements.py --check diff --git a/README.md b/README.md index 342771e19..9ea135abf 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,4 @@ Contributions to this repository are very welcome. Please refer to the page [Con Note that we use [Git LFS](https://git-lfs.com/) to version reference results. These will appear as seemingly empty files containing URLs if you don't have Git LFS installed (optional, mainly useful for our system tests). -## Python dependencies - -Each Python participant lists dependencies in its local `requirements.txt` using loose version ranges (for example `numpy >1, <2`, `pyprecice~=3.0`). Tutorial `run.sh` scripts install from these files as before. - -The repository root file `requirements-reference.txt` records the latest PyPI versions that satisfy those constraints at generation time. Regenerate it after changing tutorial requirements: - -```bash -python3 tools/report_tutorial_requirements.py -python3 tools/report_tutorial_requirements.py --check # CI-style check -``` - -This reference manifest is for documentation and reproducibility; it is not used by tutorial run scripts. - -Legacy FEniCS packages (for example `fenics-dolfin`) are installed from the system or PPA in several tutorials and are listed in the reference file as non-PyPI dependencies. - -When preparing a release pull request to `master`, regenerate and commit `requirements-reference.txt` so the pinned snapshot matches the current tutorial constraints. +For Python dependency ranges and the sibling `requirements-reference.txt` files used for reproducible installs, see [`tools/releasing/README.md`](tools/releasing/README.md). diff --git a/changelog-entries/610.md b/changelog-entries/610.md index dd7f5dd78..ed1126def 100644 --- a/changelog-entries/610.md +++ b/changelog-entries/610.md @@ -1 +1 @@ -- Add loose version constraints to tutorial `requirements.txt` files, a root `requirements-reference.txt` manifest generated from PyPI via `tools/report_tutorial_requirements.py`, and a CI check that keeps the manifest up to date ([#871](https://github.com/precice/tutorials/pull/871)). +- Add loose version constraints to tutorial `requirements.txt` files and sibling `requirements-reference.txt` pins generated from PyPI via `tools/releasing/report_tutorial_requirements.py`, with a CI check that keeps them up to date ([#871](https://github.com/precice/tutorials/pull/871)). diff --git a/channel-transport-particles/fluid-nutils/requirements-reference.txt b/channel-transport-particles/fluid-nutils/requirements-reference.txt new file mode 100644 index 000000000..e7d28ac74 --- /dev/null +++ b/channel-transport-particles/fluid-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: channel-transport-particles/fluid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/channel-transport-particles/fluid-nutils/requirements.txt b/channel-transport-particles/fluid-nutils/requirements.txt index 5b7dc1cf6..f22e7ac25 100644 --- a/channel-transport-particles/fluid-nutils/requirements.txt +++ b/channel-transport-particles/fluid-nutils/requirements.txt @@ -2,4 +2,3 @@ setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 -setuptools>=69.0.0 diff --git a/channel-transport-reaction/chemical-fenics/requirements-reference.txt b/channel-transport-reaction/chemical-fenics/requirements-reference.txt new file mode 100644 index 000000000..67e4c0245 --- /dev/null +++ b/channel-transport-reaction/chemical-fenics/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: channel-transport-reaction/chemical-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +fenicsprecice==2.3.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/channel-transport-reaction/fluid-fenics/requirements-reference.txt b/channel-transport-reaction/fluid-fenics/requirements-reference.txt new file mode 100644 index 000000000..4ac0b574e --- /dev/null +++ b/channel-transport-reaction/fluid-fenics/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: channel-transport-reaction/fluid-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +fenicsprecice==2.3.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/channel-transport/fluid-nutils/requirements-reference.txt b/channel-transport/fluid-nutils/requirements-reference.txt new file mode 100644 index 000000000..b65a66b74 --- /dev/null +++ b/channel-transport/fluid-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: channel-transport/fluid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/channel-transport/fluid-nutils/requirements.txt b/channel-transport/fluid-nutils/requirements.txt index 5b7dc1cf6..f22e7ac25 100644 --- a/channel-transport/fluid-nutils/requirements.txt +++ b/channel-transport/fluid-nutils/requirements.txt @@ -2,4 +2,3 @@ setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 -setuptools>=69.0.0 diff --git a/channel-transport/transport-nutils/requirements-reference.txt b/channel-transport/transport-nutils/requirements-reference.txt new file mode 100644 index 000000000..002ec1539 --- /dev/null +++ b/channel-transport/transport-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: channel-transport/transport-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/channel-transport/transport-nutils/requirements.txt b/channel-transport/transport-nutils/requirements.txt index 8fba7d1f2..0a20f1785 100644 --- a/channel-transport/transport-nutils/requirements.txt +++ b/channel-transport/transport-nutils/requirements.txt @@ -2,4 +2,3 @@ setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice >=3.2 # Remeshing support is available since preCICE version 3.2 -setuptools>=69.0.0 diff --git a/elastic-tube-1d/fluid-python/requirements-reference.txt b/elastic-tube-1d/fluid-python/requirements-reference.txt new file mode 100644 index 000000000..6fe792b8b --- /dev/null +++ b/elastic-tube-1d/fluid-python/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: elastic-tube-1d/fluid-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +matplotlib==3.11.0 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/elastic-tube-1d/fluid-python/requirements.txt b/elastic-tube-1d/fluid-python/requirements.txt index 4bb3e60a1..b5bbb2731 100644 --- a/elastic-tube-1d/fluid-python/requirements.txt +++ b/elastic-tube-1d/fluid-python/requirements.txt @@ -1,3 +1,3 @@ -matplotlib>=3.5,<4 +matplotlib>=3,<4 numpy >1, <2 pyprecice~=3.0 \ No newline at end of file diff --git a/elastic-tube-1d/solid-python/requirements-reference.txt b/elastic-tube-1d/solid-python/requirements-reference.txt new file mode 100644 index 000000000..aeed5f9dc --- /dev/null +++ b/elastic-tube-1d/solid-python/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: elastic-tube-1d/solid-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/elastic-tube-3d/solid-fenics/requirements-reference.txt b/elastic-tube-3d/solid-fenics/requirements-reference.txt new file mode 100644 index 000000000..142fa5025 --- /dev/null +++ b/elastic-tube-3d/solid-fenics/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: elastic-tube-3d/solid-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/flow-around-controlled-moving-cylinder/controller-fmi/requirements-reference.txt b/flow-around-controlled-moving-cylinder/controller-fmi/requirements-reference.txt new file mode 100644 index 000000000..e773fe781 --- /dev/null +++ b/flow-around-controlled-moving-cylinder/controller-fmi/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +pyprecice==3.4.0 +fmiprecice==0.2.1 diff --git a/flow-around-controlled-moving-cylinder/solid-python/requirements-reference.txt b/flow-around-controlled-moving-cylinder/solid-python/requirements-reference.txt new file mode 100644 index 000000000..332e868cf --- /dev/null +++ b/flow-around-controlled-moving-cylinder/solid-python/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-around-controlled-moving-cylinder/solid-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +pyprecice==3.4.0 +numpy==1.26.4 diff --git a/flow-over-heated-plate/README.md b/flow-over-heated-plate/README.md index 4476e4b9c..5f8da5463 100644 --- a/flow-over-heated-plate/README.md +++ b/flow-over-heated-plate/README.md @@ -97,7 +97,7 @@ First generate the output for each run by adding export to the participant `Soli ``` -After that running a case from this tutorial will export data into `solid-*/precice-exports`. To visualize and compare these results run `python3 plot-final-interface-temperature.py` (You can install the required python packages by running `pip3 install -r plot-final-interface-temperature-requirements.txt`). This will plot the dimensionless temperature `theta = (T-300)/(310-300)` (with `T` being the temperature) across the coupling interface, i.e. where the solid and the fluid meet and exchange heat. The x-axis shows the x coordinate and the y-axis the dimensionless temperature `theta` at the interface. If you want to exclude certain cases, simply comment out the corresponding lines in the script. For reference see below: +After that running a case from this tutorial will export data into `solid-*/precice-exports`. To visualize and compare these results run `python3 plot-final-interface-temperature.py` (You can install the required python packages by running `pip3 install -r plot-final-interface-temperature/requirements.txt`). This will plot the dimensionless temperature `theta = (T-300)/(310-300)` (with `T` being the temperature) across the coupling interface, i.e. where the solid and the fluid meet and exchange heat. The x-axis shows the x coordinate and the y-axis the dimensionless temperature `theta` at the interface. If you want to exclude certain cases, simply comment out the corresponding lines in the script. For reference see below: ![Comparison of the results with different solvers](images/tutorials-flow-over-heated-plate-results-comparison.png) diff --git a/flow-over-heated-plate/fluid-su2/requirements-reference.txt b/flow-over-heated-plate/fluid-su2/requirements-reference.txt new file mode 100644 index 000000000..15c501673 --- /dev/null +++ b/flow-over-heated-plate/fluid-su2/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-over-heated-plate/fluid-su2/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/flow-over-heated-plate/plot-final-interface-temperature-requirements.txt b/flow-over-heated-plate/plot-final-interface-temperature-requirements.txt deleted file mode 100644 index b25baafe7..000000000 --- a/flow-over-heated-plate/plot-final-interface-temperature-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -vtk -numpy -matplotlib -os \ No newline at end of file diff --git a/flow-over-heated-plate/plot-final-interface-temperature/requirements-reference.txt b/flow-over-heated-plate/plot-final-interface-temperature/requirements-reference.txt new file mode 100644 index 000000000..fbfa42d65 --- /dev/null +++ b/flow-over-heated-plate/plot-final-interface-temperature/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-over-heated-plate/plot-final-interface-temperature/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +matplotlib==3.11.0 +vtk==9.6.2 diff --git a/flow-over-heated-plate/plot-final-interface-temperature/requirements.txt b/flow-over-heated-plate/plot-final-interface-temperature/requirements.txt new file mode 100644 index 000000000..f46f2cdfc --- /dev/null +++ b/flow-over-heated-plate/plot-final-interface-temperature/requirements.txt @@ -0,0 +1,3 @@ +numpy >1, <2 +matplotlib>=3,<4 +vtk>=9,<10 diff --git a/flow-over-heated-plate/solid-dunefem/requirements-reference.txt b/flow-over-heated-plate/solid-dunefem/requirements-reference.txt new file mode 100644 index 000000000..7cfc8128a --- /dev/null +++ b/flow-over-heated-plate/solid-dunefem/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-over-heated-plate/solid-dunefem/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +dune-fem==2.12.0.2 +pyprecice==3.4.0 diff --git a/flow-over-heated-plate/solid-dunefem/requirements.txt b/flow-over-heated-plate/solid-dunefem/requirements.txt index c64f2a91d..d9874e290 100644 --- a/flow-over-heated-plate/solid-dunefem/requirements.txt +++ b/flow-over-heated-plate/solid-dunefem/requirements.txt @@ -1,2 +1,2 @@ -dune-fem>=2.11 # Known to work with 2.11.0.5, 2.12.0.2 +dune-fem>=2.11 pyprecice~=3.0 diff --git a/flow-over-heated-plate/solid-fenics/requirements-reference.txt b/flow-over-heated-plate/solid-fenics/requirements-reference.txt new file mode 100644 index 000000000..e14066b51 --- /dev/null +++ b/flow-over-heated-plate/solid-fenics/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-over-heated-plate/solid-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/flow-over-heated-plate/solid-fenicsx/requirements-reference.txt b/flow-over-heated-plate/solid-fenicsx/requirements-reference.txt new file mode 100644 index 000000000..c32f59a18 --- /dev/null +++ b/flow-over-heated-plate/solid-fenicsx/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-over-heated-plate/solid-fenicsx/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +fenicsxprecice==1.0.1 +mpi4py==4.1.2 diff --git a/flow-over-heated-plate/solid-nutils/requirements-reference.txt b/flow-over-heated-plate/solid-nutils/requirements-reference.txt new file mode 100644 index 000000000..7d787aaad --- /dev/null +++ b/flow-over-heated-plate/solid-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: flow-over-heated-plate/solid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/oscillator-overlap/solver-python/requirements-reference.txt b/oscillator-overlap/solver-python/requirements-reference.txt new file mode 100644 index 000000000..a584f4323 --- /dev/null +++ b/oscillator-overlap/solver-python/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: oscillator-overlap/solver-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 +scipy==1.18.0 diff --git a/oscillator/mass-left-fmi/requirements-reference.txt b/oscillator/mass-left-fmi/requirements-reference.txt new file mode 100644 index 000000000..8392734e9 --- /dev/null +++ b/oscillator/mass-left-fmi/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: oscillator/mass-left-fmi/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +pyprecice==3.4.0 +fmiprecice==0.2.1 +pandas==2.3.3 diff --git a/oscillator/mass-right-fmi/requirements-reference.txt b/oscillator/mass-right-fmi/requirements-reference.txt new file mode 100644 index 000000000..8c6bd2a39 --- /dev/null +++ b/oscillator/mass-right-fmi/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: oscillator/mass-right-fmi/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +pyprecice==3.4.0 +fmiprecice==0.2.1 +pandas==2.3.3 diff --git a/oscillator/solver-fmi/requirements-reference.txt b/oscillator/solver-fmi/requirements-reference.txt new file mode 100644 index 000000000..3e0bee42d --- /dev/null +++ b/oscillator/solver-fmi/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: oscillator/solver-fmi/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +pyprecice==3.4.0 +fmiprecice==0.2.1 +pandas==2.3.3 diff --git a/oscillator/solver-python/requirements-reference.txt b/oscillator/solver-python/requirements-reference.txt new file mode 100644 index 000000000..d4660741e --- /dev/null +++ b/oscillator/solver-python/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: oscillator/solver-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 +scipy==1.18.0 diff --git a/partitioned-burgers-1d/neumann-surrogate/requirements-reference.txt b/partitioned-burgers-1d/neumann-surrogate/requirements-reference.txt new file mode 100644 index 000000000..83c371904 --- /dev/null +++ b/partitioned-burgers-1d/neumann-surrogate/requirements-reference.txt @@ -0,0 +1,12 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-burgers-1d/neumann-surrogate/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +--extra-index-url https://download.pytorch.org/whl/cpu +numpy==2.5.1 +scipy==1.18.0 +torch==2.13.0 +matplotlib==3.11.0 +pyprecice==3.4.0 diff --git a/partitioned-burgers-1d/neumann-surrogate/requirements.txt b/partitioned-burgers-1d/neumann-surrogate/requirements.txt index 499ae35cf..23e338e59 100644 --- a/partitioned-burgers-1d/neumann-surrogate/requirements.txt +++ b/partitioned-burgers-1d/neumann-surrogate/requirements.txt @@ -2,8 +2,8 @@ # --extra-index-url https://download.pytorch.org/whl/cu118 --extra-index-url https://download.pytorch.org/whl/cpu -numpy~=2.0 # Known to work with 2.3.5 -scipy~=1.0 # Known to work with 1.16.3 -torch~=2.0 # Known to work with 2.9.1 -matplotlib~=3.0 # Known to work with 3.10.8 -pyprecice~=3.0 \ No newline at end of file +numpy~=2.0 +scipy~=1.0 +torch~=2.0 +matplotlib>=3,<4 +pyprecice~=3.0 diff --git a/partitioned-burgers-1d/solver-scipy/requirements-reference.txt b/partitioned-burgers-1d/solver-scipy/requirements-reference.txt new file mode 100644 index 000000000..bd4bd7505 --- /dev/null +++ b/partitioned-burgers-1d/solver-scipy/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-burgers-1d/solver-scipy/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==2.5.1 +scipy==1.18.0 +matplotlib==3.11.0 +pyprecice==3.4.0 diff --git a/partitioned-burgers-1d/solver-scipy/requirements.txt b/partitioned-burgers-1d/solver-scipy/requirements.txt index 4a8418df6..dbf35c764 100644 --- a/partitioned-burgers-1d/solver-scipy/requirements.txt +++ b/partitioned-burgers-1d/solver-scipy/requirements.txt @@ -1,4 +1,4 @@ -numpy~=2.0 # Known to work with 2.3.5 -scipy~=1.0 # Known to work with 1.16.3 -matplotlib~=3.0 # Known to work with 3.10.8 -pyprecice~=3.0 \ No newline at end of file +numpy~=2.0 +scipy~=1.0 +matplotlib>=3,<4 +pyprecice~=3.0 diff --git a/partitioned-burgers-1d/utils/requirements-reference.txt b/partitioned-burgers-1d/utils/requirements-reference.txt new file mode 100644 index 000000000..61528537a --- /dev/null +++ b/partitioned-burgers-1d/utils/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-burgers-1d/utils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==2.5.1 +matplotlib==3.11.0 diff --git a/partitioned-burgers-1d/utils/requirements.txt b/partitioned-burgers-1d/utils/requirements.txt index 8b7df5b54..912335b07 100644 --- a/partitioned-burgers-1d/utils/requirements.txt +++ b/partitioned-burgers-1d/utils/requirements.txt @@ -1,2 +1,2 @@ -numpy~=2.0 # Known to work with 2.3.5 -matplotlib~=3.0 # Known to work with 3.10.8 \ No newline at end of file +numpy~=2.0 +matplotlib>=3,<4 diff --git a/partitioned-heat-conduction-3d/solver-fenicsx/requirements-reference.txt b/partitioned-heat-conduction-3d/solver-fenicsx/requirements-reference.txt new file mode 100644 index 000000000..7f4362586 --- /dev/null +++ b/partitioned-heat-conduction-3d/solver-fenicsx/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +fenicsxprecice==1.0.1 +scipy==1.18.0 +sympy==1.14.0 +gmsh==4.15.2 diff --git a/partitioned-heat-conduction-complex/solver-fenics/requirements-reference.txt b/partitioned-heat-conduction-complex/solver-fenics/requirements-reference.txt new file mode 100644 index 000000000..d8e43295d --- /dev/null +++ b/partitioned-heat-conduction-complex/solver-fenics/requirements-reference.txt @@ -0,0 +1,14 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction-complex/solver-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +fenicsprecice==2.3.0 +numpy==1.26.4 +sympy==1.14.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/partitioned-heat-conduction-direct/dirichlet-nutils/requirements-reference.txt b/partitioned-heat-conduction-direct/dirichlet-nutils/requirements-reference.txt new file mode 100644 index 000000000..fc9272875 --- /dev/null +++ b/partitioned-heat-conduction-direct/dirichlet-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/partitioned-heat-conduction-direct/neumann-nutils/requirements-reference.txt b/partitioned-heat-conduction-direct/neumann-nutils/requirements-reference.txt new file mode 100644 index 000000000..e2cc198ec --- /dev/null +++ b/partitioned-heat-conduction-direct/neumann-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction-direct/neumann-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/partitioned-heat-conduction-overlap/solver-fenics/requirements-reference.txt b/partitioned-heat-conduction-overlap/solver-fenics/requirements-reference.txt new file mode 100644 index 000000000..dce0e0ebe --- /dev/null +++ b/partitioned-heat-conduction-overlap/solver-fenics/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction-overlap/solver-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/partitioned-heat-conduction/dirichlet-nutils/requirements-reference.txt b/partitioned-heat-conduction/dirichlet-nutils/requirements-reference.txt new file mode 100644 index 000000000..6b7aad36b --- /dev/null +++ b/partitioned-heat-conduction/dirichlet-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction/dirichlet-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/partitioned-heat-conduction/neumann-nutils/requirements-reference.txt b/partitioned-heat-conduction/neumann-nutils/requirements-reference.txt new file mode 100644 index 000000000..06a3d76c5 --- /dev/null +++ b/partitioned-heat-conduction/neumann-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction/neumann-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/partitioned-heat-conduction/solver-fenics/requirements-reference.txt b/partitioned-heat-conduction/solver-fenics/requirements-reference.txt new file mode 100644 index 000000000..effc39c09 --- /dev/null +++ b/partitioned-heat-conduction/solver-fenics/requirements-reference.txt @@ -0,0 +1,14 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction/solver-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +fenicsprecice==2.3.0 +scipy==1.18.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/partitioned-heat-conduction/solver-fenicsx/requirements-reference.txt b/partitioned-heat-conduction/solver-fenicsx/requirements-reference.txt new file mode 100644 index 000000000..adf95d05f --- /dev/null +++ b/partitioned-heat-conduction/solver-fenicsx/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-heat-conduction/solver-fenicsx/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +fenicsxprecice==1.0.1 +scipy==1.18.0 +sympy==1.14.0 +mpi4py==4.1.2 diff --git a/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements-reference.txt b/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements-reference.txt new file mode 100644 index 000000000..5d9e9d3c7 --- /dev/null +++ b/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 diff --git a/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt b/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt index f4fc6880f..55397c89c 100644 --- a/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt +++ b/partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt @@ -2,4 +2,4 @@ setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib>=3.5,<4 \ No newline at end of file +matplotlib>=3,<4 \ No newline at end of file diff --git a/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements-reference.txt b/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements-reference.txt new file mode 100644 index 000000000..44fa1d4eb --- /dev/null +++ b/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 diff --git a/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt b/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt index f4fc6880f..55397c89c 100644 --- a/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt +++ b/partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt @@ -2,4 +2,4 @@ setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib>=3.5,<4 \ No newline at end of file +matplotlib>=3,<4 \ No newline at end of file diff --git a/perpendicular-flap/fluid-fake/requirements-reference.txt b/perpendicular-flap/fluid-fake/requirements-reference.txt new file mode 100644 index 000000000..844502abf --- /dev/null +++ b/perpendicular-flap/fluid-fake/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: perpendicular-flap/fluid-fake/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/perpendicular-flap/fluid-nutils/requirements-reference.txt b/perpendicular-flap/fluid-nutils/requirements-reference.txt new file mode 100644 index 000000000..bcb491d7c --- /dev/null +++ b/perpendicular-flap/fluid-nutils/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: perpendicular-flap/fluid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==6.3 +numpy==1.26.4 +pyprecice==3.4.0 +treelog==1.0 diff --git a/perpendicular-flap/fluid-su2/requirements-reference.txt b/perpendicular-flap/fluid-su2/requirements-reference.txt new file mode 100644 index 000000000..c0e7feb7b --- /dev/null +++ b/perpendicular-flap/fluid-su2/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: perpendicular-flap/fluid-su2/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/perpendicular-flap/solid-fake/requirements-reference.txt b/perpendicular-flap/solid-fake/requirements-reference.txt new file mode 100644 index 000000000..74050c3bf --- /dev/null +++ b/perpendicular-flap/solid-fake/requirements-reference.txt @@ -0,0 +1,8 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: perpendicular-flap/solid-fake/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/perpendicular-flap/solid-fenics/requirements-reference.txt b/perpendicular-flap/solid-fenics/requirements-reference.txt new file mode 100644 index 000000000..7eade8a3b --- /dev/null +++ b/perpendicular-flap/solid-fenics/requirements-reference.txt @@ -0,0 +1,14 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: perpendicular-flap/solid-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +fenicsprecice==2.3.0 +numpy==1.26.4 +matplotlib==3.11.0 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/perpendicular-flap/solid-fenics/requirements.txt b/perpendicular-flap/solid-fenics/requirements.txt index 55f045e6c..6ebd5d27d 100644 --- a/perpendicular-flap/solid-fenics/requirements.txt +++ b/perpendicular-flap/solid-fenics/requirements.txt @@ -1,6 +1,6 @@ fenicsprecice~=2.2 numpy >1, <2 -matplotlib>=3.5,<4 +matplotlib>=3,<4 # Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/ # Use --system-site-packages in venv diff --git a/perpendicular-flap/solid-nutils/requirements-reference.txt b/perpendicular-flap/solid-nutils/requirements-reference.txt new file mode 100644 index 000000000..23cbf1f74 --- /dev/null +++ b/perpendicular-flap/solid-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: perpendicular-flap/solid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/requirements-reference.txt b/requirements-reference.txt deleted file mode 100644 index b0afc7e45..000000000 --- a/requirements-reference.txt +++ /dev/null @@ -1,342 +0,0 @@ -# Pinned Python dependency versions for preCICE tutorial distributions. -# Reference manifest only: tutorial run scripts keep using loose requirements.txt constraints. -# Generated by tools/report_tutorial_requirements.py — do not edit manually. -# Generated: 2026-07-09T03:13:12Z - -# channel-transport/fluid-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 -setuptools==83.0.0 - -# channel-transport/transport-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 -setuptools==83.0.0 - -# channel-transport-particles/fluid-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 -setuptools==83.0.0 - -# channel-transport-reaction/chemical-fenics/requirements.txt -numpy==1.26.4 -fenicsprecice==2.3.0 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# channel-transport-reaction/fluid-fenics/requirements.txt -numpy==1.26.4 -fenicsprecice==2.3.0 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# elastic-tube-1d/fluid-python/requirements.txt -matplotlib==3.11.0 -numpy==1.26.4 -pyprecice==3.4.0 - -# elastic-tube-1d/solid-python/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 - -# elastic-tube-3d/solid-fenics/requirements.txt -fenicsprecice==2.3.0 -numpy==1.26.4 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt -pyprecice==3.4.0 -fmiprecice==0.2.1 - -# flow-around-controlled-moving-cylinder/solid-python/requirements.txt -pyprecice==3.4.0 -numpy==1.26.4 - -# flow-over-heated-plate/fluid-su2/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 - -# flow-over-heated-plate/solid-dunefem/requirements.txt -dune-fem==2.12.0.2 -pyprecice==3.4.0 - -# flow-over-heated-plate/solid-fenics/requirements.txt -fenicsprecice==2.3.0 -numpy==1.26.4 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# flow-over-heated-plate/solid-fenicsx/requirements.txt -numpy==1.26.4 -fenicsxprecice==1.0.1 -mpi4py==4.1.2 - -# flow-over-heated-plate/solid-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# oscillator/mass-left-fmi/requirements.txt -pyprecice==3.4.0 -fmiprecice==0.2.1 -pandas==2.3.3 - -# oscillator/mass-right-fmi/requirements.txt -pyprecice==3.4.0 -fmiprecice==0.2.1 -pandas==2.3.3 - -# oscillator/solver-fmi/requirements.txt -pyprecice==3.4.0 -fmiprecice==0.2.1 -pandas==2.3.3 - -# oscillator/solver-python/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 -scipy==1.18.0 - -# oscillator-overlap/solver-python/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 -scipy==1.18.0 - -# partitioned-burgers-1d/neumann-surrogate/requirements.txt ---extra-index-url https://download.pytorch.org/whl/cpu -numpy==2.5.1 -scipy==1.18.0 -torch==2.13.0 -matplotlib==3.11.0 -pyprecice==3.4.0 - -# partitioned-burgers-1d/solver-scipy/requirements.txt -numpy==2.5.1 -scipy==1.18.0 -matplotlib==3.11.0 -pyprecice==3.4.0 - -# partitioned-burgers-1d/utils/requirements.txt -numpy==2.5.1 -matplotlib==3.11.0 - -# partitioned-heat-conduction/dirichlet-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# partitioned-heat-conduction/neumann-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# partitioned-heat-conduction/solver-fenics/requirements.txt -numpy==1.26.4 -fenicsprecice==2.3.0 -scipy==1.18.0 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# partitioned-heat-conduction/solver-fenicsx/requirements.txt -numpy==1.26.4 -fenicsxprecice==1.0.1 -scipy==1.18.0 -sympy==1.14.0 -mpi4py==4.1.2 - -# partitioned-heat-conduction-3d/solver-fenicsx/requirements.txt -numpy==1.26.4 -fenicsxprecice==1.0.1 -scipy==1.18.0 -sympy==1.14.0 -gmsh==4.15.2 - -# partitioned-heat-conduction-complex/solver-fenics/requirements.txt -fenicsprecice==2.3.0 -numpy==1.26.4 -sympy==1.14.0 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# partitioned-heat-conduction-direct/dirichlet-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# partitioned-heat-conduction-direct/neumann-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# partitioned-heat-conduction-overlap/solver-fenics/requirements.txt -fenicsprecice==2.3.0 -numpy==1.26.4 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# partitioned-pipe-multiscale/fluid1d-left-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 -matplotlib==3.11.0 - -# partitioned-pipe-multiscale/fluid1d-right-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 -matplotlib==3.11.0 - -# perpendicular-flap/fluid-fake/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 - -# perpendicular-flap/fluid-nutils/requirements.txt -setuptools==83.0.0 -nutils==6.3 -numpy==1.26.4 -pyprecice==3.4.0 -treelog==1.0 - -# perpendicular-flap/fluid-su2/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 - -# perpendicular-flap/solid-fake/requirements.txt -numpy==1.26.4 -pyprecice==3.4.0 - -# perpendicular-flap/solid-fenics/requirements.txt -fenicsprecice==2.3.0 -numpy==1.26.4 -matplotlib==3.11.0 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# perpendicular-flap/solid-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 - -# resonant-circuit/capacitor-python/requirements.txt -numpy==1.26.4 -scipy==1.18.0 -pyprecice==3.4.0 - -# resonant-circuit/coil-python/requirements.txt -numpy==1.26.4 -scipy==1.18.0 -pyprecice==3.4.0 - -# turek-hron-fsi3/fluid-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 -meshio==5.3.5 -gmsh==4.15.2 -matplotlib==3.11.0 - -# turek-hron-fsi3/solid-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 -meshio==5.3.5 -gmsh==4.15.2 -matplotlib==3.11.0 - -# two-scale-heat-conduction/macro-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# two-scale-heat-conduction/micro-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 -micro-manager-precice==0.10.1 - -# volume-coupled-diffusion/solver-fenics/requirements.txt -fenicsprecice==2.3.0 -numpy==1.26.4 -fenics-dijitso==2019.1.0 -# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) -fenics-ffc==2019.1.0.post0 -fenics-fiat==2019.1.0 -fenics-ufl-legacy==2022.3.0 - -# volume-coupled-flow/source-nutils/requirements.txt -setuptools==83.0.0 -nutils==7.3 -numpy==1.26.4 -pyprecice==3.4.0 - -# water-hammer/fluid1d-left-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 -matplotlib==3.11.0 -treelog==1.0 - -# water-hammer/fluid1d-right-nutils/requirements.txt -setuptools==83.0.0 -nutils==9.2 -numpy==1.26.4 -pyprecice==3.4.0 -matplotlib==3.11.0 -treelog==1.0 - -# wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt -numpy==1.26.4 -matplotlib==3.11.0 -landlab==2.11.0 -pyprecice==3.4.0 - -# wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt -numpy==1.26.4 -matplotlib==3.11.0 -mesa==3.5.1 -pyprecice==3.4.0 -networkx==3.6.1 - diff --git a/resonant-circuit/capacitor-python/requirements-reference.txt b/resonant-circuit/capacitor-python/requirements-reference.txt new file mode 100644 index 000000000..dbb9cc07c --- /dev/null +++ b/resonant-circuit/capacitor-python/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: resonant-circuit/capacitor-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +scipy==1.18.0 +pyprecice==3.4.0 diff --git a/resonant-circuit/coil-python/requirements-reference.txt b/resonant-circuit/coil-python/requirements-reference.txt new file mode 100644 index 000000000..414651b39 --- /dev/null +++ b/resonant-circuit/coil-python/requirements-reference.txt @@ -0,0 +1,9 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: resonant-circuit/coil-python/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +scipy==1.18.0 +pyprecice==3.4.0 diff --git a/tools/releasing/README.md b/tools/releasing/README.md new file mode 100644 index 000000000..c906cf8ab --- /dev/null +++ b/tools/releasing/README.md @@ -0,0 +1,22 @@ +# Releasing helpers + +## Python dependency reference files + +Each Python participant lists dependencies in its local `requirements.txt` using loose version ranges (for example `numpy >1, <2`, `pyprecice~=3.0`). Tutorial `run.sh` scripts install from these files as before. + +Next to each `requirements.txt`, a sibling `requirements-reference.txt` records the latest PyPI versions that satisfy those constraints at generation time. Use it for reproducible installs: + +```bash +pip install -r requirements-reference.txt +``` + +Regenerate all reference files after changing tutorial requirements: + +```bash +python3 tools/releasing/report_tutorial_requirements.py +python3 tools/releasing/report_tutorial_requirements.py --check # CI-style check +``` + +Legacy FEniCS packages (for example `fenics-dolfin`) are installed from the system or PPA in several tutorials and appear in the reference files as non-PyPI dependencies. + +When preparing a release pull request to `master`, regenerate and commit the sibling `requirements-reference.txt` files so the pinned snapshots match the current tutorial constraints. diff --git a/tools/report_tutorial_requirements.py b/tools/releasing/report_tutorial_requirements.py similarity index 54% rename from tools/report_tutorial_requirements.py rename to tools/releasing/report_tutorial_requirements.py index 7a39e2012..ec1f8484d 100644 --- a/tools/report_tutorial_requirements.py +++ b/tools/releasing/report_tutorial_requirements.py @@ -3,11 +3,12 @@ Report resolved Python dependency versions for tutorial requirements.txt files. Scans every tutorial requirements.txt (excluding tools/tests/), queries PyPI for -the latest version satisfying each constraint, and writes requirements-reference.txt. +the latest version satisfying each constraint, and writes a sibling +requirements-reference.txt next to each file. Run from the repository root: - python3 tools/report_tutorial_requirements.py - python3 tools/report_tutorial_requirements.py --check + python3 tools/releasing/report_tutorial_requirements.py + python3 tools/releasing/report_tutorial_requirements.py --check """ from __future__ import annotations @@ -16,31 +17,29 @@ import re import subprocess import sys -import urllib.error -import urllib.request from datetime import datetime, timezone from pathlib import Path +from urllib import error, request from packaging.requirements import Requirement from packaging.specifiers import SpecifierSet from packaging.utils import canonicalize_name from packaging.version import Version -REPO_ROOT = Path(__file__).resolve().parent.parent -REFERENCE_FILE = REPO_ROOT / "requirements-reference.txt" +REPO_ROOT = Path(__file__).resolve().parent.parent.parent +REFERENCE_NAME = "requirements-reference.txt" EXCLUDED_RELATIVE = { "tools/tests/requirements.txt", - # Not a pip requirements file (lists stdlib os, unpinned vtk); see develop naming quirk. - "flow-over-heated-plate/plot-final-interface-temperature-requirements.txt", } _PYPI_VERSIONS_CACHE: dict[str, list[Version]] = {} _RESOLVED_CACHE: dict[str, str | None] = {} _HEADER = """\ -# Pinned Python dependency versions for preCICE tutorial distributions. -# Reference manifest only: tutorial run scripts keep using loose requirements.txt constraints. -# Generated by tools/report_tutorial_requirements.py — do not edit manually. +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: {source} # Generated: {timestamp} """ @@ -64,6 +63,10 @@ def discover_requirements_files() -> list[Path]: return sorted(files) +def reference_path_for(requirements_file: Path) -> Path: + return requirements_file.with_name(REFERENCE_NAME) + + def parse_requirement_line(line: str) -> str | None: stripped = line.strip() if not stripped or stripped.startswith("#") or stripped.startswith("--"): @@ -79,11 +82,11 @@ def fetch_pypi_versions(package_name: str) -> list[Version]: return _PYPI_VERSIONS_CACHE[canonical] url = f"https://pypi.org/pypi/{package_name}/json" - request = urllib.request.Request(url, headers={"Accept": "application/json"}) + req = request.Request(url, headers={"Accept": "application/json"}) try: - with urllib.request.urlopen(request, timeout=30) as response: + with request.urlopen(req, timeout=30) as response: payload = json.load(response) - except urllib.error.HTTPError as exc: + except error.HTTPError as exc: if exc.code == 404: return [] raise @@ -133,23 +136,19 @@ def format_resolved_requirement(requirement_line: str) -> str: return f"{requirement.name}=={resolved}" -def generate_reference_text() -> str: - timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") - sections: list[str] = [_HEADER.format(timestamp=timestamp)] +def generate_reference_text(requirements_file: Path, timestamp: str) -> str: + relative = requirements_file.relative_to(REPO_ROOT).as_posix() + sections: list[str] = [_HEADER.format(source=relative, timestamp=timestamp)] - for req_file in discover_requirements_files(): - relative = req_file.relative_to(REPO_ROOT).as_posix() - sections.append(f"# {relative}\n") - for line in req_file.read_text().splitlines(): - stripped = line.strip() - if stripped.startswith("--"): - sections.append(line + "\n") - continue - requirement_line = parse_requirement_line(line) - if requirement_line is None: - continue - sections.append(format_resolved_requirement(requirement_line) + "\n") - sections.append("\n") + for line in requirements_file.read_text().splitlines(): + stripped = line.strip() + if stripped.startswith("--"): + sections.append(line + "\n") + continue + requirement_line = parse_requirement_line(line) + if requirement_line is None: + continue + sections.append(format_resolved_requirement(requirement_line) + "\n") return "".join(sections) @@ -159,6 +158,51 @@ def normalize_for_check(text: str) -> str: return re.sub(r"^# Generated: .*\n", "# Generated: \n", text, count=1, flags=re.MULTILINE) +def write_all_references() -> list[Path]: + timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") + written: list[Path] = [] + for req_file in discover_requirements_files(): + output = reference_path_for(req_file) + output.write_text(generate_reference_text(req_file, timestamp)) + written.append(output) + return written + + +def check_all_references() -> int: + timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") + missing: list[str] = [] + outdated: list[str] = [] + + for req_file in discover_requirements_files(): + output = reference_path_for(req_file) + relative = output.relative_to(REPO_ROOT).as_posix() + generated = generate_reference_text(req_file, timestamp) + if not output.exists(): + missing.append(relative) + continue + if normalize_for_check(output.read_text()) != normalize_for_check(generated): + outdated.append(relative) + + if missing or outdated: + if missing: + print("ERROR: missing requirements-reference.txt files:", file=sys.stderr) + for path in missing: + print(f" - {path}", file=sys.stderr) + if outdated: + print("ERROR: outdated requirements-reference.txt files:", file=sys.stderr) + for path in outdated: + print(f" - {path}", file=sys.stderr) + print( + "Run: python3 tools/releasing/report_tutorial_requirements.py", + file=sys.stderr, + ) + return 1 + + count = len(discover_requirements_files()) + print(f"OK: {count} requirements-reference.txt file(s) are up to date") + return 0 + + def main() -> int: parser = argparse.ArgumentParser( description="Report resolved tutorial Python dependencies from PyPI" @@ -166,37 +210,17 @@ def main() -> int: parser.add_argument( "--check", action="store_true", - help="Exit 1 if requirements-reference.txt is out of date", - ) - parser.add_argument( - "--output", - type=Path, - default=REFERENCE_FILE, - help="Output path (default: requirements-reference.txt at repo root)", + help="Exit 1 if any sibling requirements-reference.txt is missing or out of date", ) args = parser.parse_args() - generated = generate_reference_text() - if args.check: - if not args.output.exists(): - print( - f"ERROR: {args.output} not found. Run: python3 tools/report_tutorial_requirements.py", - file=sys.stderr, - ) - return 1 - current = args.output.read_text() - if normalize_for_check(current) != normalize_for_check(generated): - print( - f"ERROR: {args.output} is out of date. Run: python3 tools/report_tutorial_requirements.py", - file=sys.stderr, - ) - return 1 - print(f"OK: {args.output} is up to date") - return 0 - - args.output.write_text(generated) - print(f"Wrote {args.output}") + return check_all_references() + + written = write_all_references() + for path in written: + print(f"Wrote {path.relative_to(REPO_ROOT).as_posix()}") + print(f"Wrote {len(written)} requirements-reference.txt file(s)") return 0 diff --git a/turek-hron-fsi3/fluid-nutils/requirements-reference.txt b/turek-hron-fsi3/fluid-nutils/requirements-reference.txt new file mode 100644 index 000000000..70ea925ac --- /dev/null +++ b/turek-hron-fsi3/fluid-nutils/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: turek-hron-fsi3/fluid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +meshio==5.3.5 +gmsh==4.15.2 +matplotlib==3.11.0 diff --git a/turek-hron-fsi3/fluid-nutils/requirements.txt b/turek-hron-fsi3/fluid-nutils/requirements.txt index f324f08fe..aaa8e67b7 100644 --- a/turek-hron-fsi3/fluid-nutils/requirements.txt +++ b/turek-hron-fsi3/fluid-nutils/requirements.txt @@ -4,4 +4,4 @@ numpy >1, <2 pyprecice~=3.0 meshio>=5,<6 gmsh>=4,<5 -matplotlib>=3.5,<4 +matplotlib>=3,<4 diff --git a/turek-hron-fsi3/solid-nutils/requirements-reference.txt b/turek-hron-fsi3/solid-nutils/requirements-reference.txt new file mode 100644 index 000000000..67ac84718 --- /dev/null +++ b/turek-hron-fsi3/solid-nutils/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: turek-hron-fsi3/solid-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +meshio==5.3.5 +gmsh==4.15.2 +matplotlib==3.11.0 diff --git a/turek-hron-fsi3/solid-nutils/requirements.txt b/turek-hron-fsi3/solid-nutils/requirements.txt index f324f08fe..aaa8e67b7 100644 --- a/turek-hron-fsi3/solid-nutils/requirements.txt +++ b/turek-hron-fsi3/solid-nutils/requirements.txt @@ -4,4 +4,4 @@ numpy >1, <2 pyprecice~=3.0 meshio>=5,<6 gmsh>=4,<5 -matplotlib>=3.5,<4 +matplotlib>=3,<4 diff --git a/two-scale-heat-conduction/macro-nutils/requirements-reference.txt b/two-scale-heat-conduction/macro-nutils/requirements-reference.txt new file mode 100644 index 000000000..f8b4e622b --- /dev/null +++ b/two-scale-heat-conduction/macro-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: two-scale-heat-conduction/macro-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/two-scale-heat-conduction/micro-nutils/requirements-reference.txt b/two-scale-heat-conduction/micro-nutils/requirements-reference.txt new file mode 100644 index 000000000..6d7656335 --- /dev/null +++ b/two-scale-heat-conduction/micro-nutils/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: two-scale-heat-conduction/micro-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 +# micro-manager-precice>=0.11 # non-PyPI (system/PPA or no matching PyPI version) diff --git a/two-scale-heat-conduction/micro-nutils/requirements.txt b/two-scale-heat-conduction/micro-nutils/requirements.txt index 8256d3119..6d9aaf9dd 100644 --- a/two-scale-heat-conduction/micro-nutils/requirements.txt +++ b/two-scale-heat-conduction/micro-nutils/requirements.txt @@ -2,4 +2,4 @@ setuptools>=69.0.0 # required by nutils nutils~=7.3 numpy >1, <2 pyprecice~=3.0 -micro-manager-precice~=0.10 +micro-manager-precice>=0.11 diff --git a/volume-coupled-diffusion/solver-fenics/requirements-reference.txt b/volume-coupled-diffusion/solver-fenics/requirements-reference.txt new file mode 100644 index 000000000..5a56c4cda --- /dev/null +++ b/volume-coupled-diffusion/solver-fenics/requirements-reference.txt @@ -0,0 +1,13 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: volume-coupled-diffusion/solver-fenics/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +fenicsprecice==2.3.0 +numpy==1.26.4 +fenics-dijitso==2019.1.0 +# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version) +fenics-ffc==2019.1.0.post0 +fenics-fiat==2019.1.0 +fenics-ufl-legacy==2022.3.0 diff --git a/volume-coupled-flow/source-nutils/requirements-reference.txt b/volume-coupled-flow/source-nutils/requirements-reference.txt new file mode 100644 index 000000000..a92cba8aa --- /dev/null +++ b/volume-coupled-flow/source-nutils/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: volume-coupled-flow/source-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==7.3 +numpy==1.26.4 +pyprecice==3.4.0 diff --git a/water-hammer/fluid1d-left-nutils/requirements-reference.txt b/water-hammer/fluid1d-left-nutils/requirements-reference.txt new file mode 100644 index 000000000..6d2cc50ed --- /dev/null +++ b/water-hammer/fluid1d-left-nutils/requirements-reference.txt @@ -0,0 +1,12 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: water-hammer/fluid1d-left-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 +treelog==1.0 diff --git a/water-hammer/fluid1d-left-nutils/requirements.txt b/water-hammer/fluid1d-left-nutils/requirements.txt index 34177a257..a7b48c7ac 100644 --- a/water-hammer/fluid1d-left-nutils/requirements.txt +++ b/water-hammer/fluid1d-left-nutils/requirements.txt @@ -2,5 +2,5 @@ setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib>=3.5,<4 +matplotlib>=3,<4 treelog>=1,<2 \ No newline at end of file diff --git a/water-hammer/fluid1d-right-nutils/requirements-reference.txt b/water-hammer/fluid1d-right-nutils/requirements-reference.txt new file mode 100644 index 000000000..7f64108bb --- /dev/null +++ b/water-hammer/fluid1d-right-nutils/requirements-reference.txt @@ -0,0 +1,12 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: water-hammer/fluid1d-right-nutils/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +setuptools==83.0.0 +nutils==9.2 +numpy==1.26.4 +pyprecice==3.4.0 +matplotlib==3.11.0 +treelog==1.0 diff --git a/water-hammer/fluid1d-right-nutils/requirements.txt b/water-hammer/fluid1d-right-nutils/requirements.txt index 34177a257..a7b48c7ac 100644 --- a/water-hammer/fluid1d-right-nutils/requirements.txt +++ b/water-hammer/fluid1d-right-nutils/requirements.txt @@ -2,5 +2,5 @@ setuptools>=69.0.0 # required by nutils nutils~=9.0 numpy >1, <2 pyprecice~=3.0 -matplotlib>=3.5,<4 +matplotlib>=3,<4 treelog>=1,<2 \ No newline at end of file diff --git a/wolf-sheep-soil-creep/soil-creep-landlab/requirements-reference.txt b/wolf-sheep-soil-creep/soil-creep-landlab/requirements-reference.txt new file mode 100644 index 000000000..f2e020520 --- /dev/null +++ b/wolf-sheep-soil-creep/soil-creep-landlab/requirements-reference.txt @@ -0,0 +1,10 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +matplotlib==3.11.0 +landlab==2.11.0 +pyprecice==3.4.0 diff --git a/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt b/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt index b414e0236..99da7bae0 100644 --- a/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt +++ b/wolf-sheep-soil-creep/soil-creep-landlab/requirements.txt @@ -1,4 +1,4 @@ numpy >1, <2 -matplotlib>=3.5,<4 +matplotlib>=3,<4 landlab>=2.0,<3 pyprecice~=3.0 diff --git a/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements-reference.txt b/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements-reference.txt new file mode 100644 index 000000000..c66c19a65 --- /dev/null +++ b/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements-reference.txt @@ -0,0 +1,11 @@ +# Pinned Python dependency versions for this tutorial participant. +# Reference only: run scripts keep using loose requirements.txt constraints. +# Generated by tools/releasing/report_tutorial_requirements.py — do not edit manually. +# Source: wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt +# Generated: 2026-07-10T14:26:04Z + +numpy==1.26.4 +matplotlib==3.11.0 +mesa==3.5.1 +pyprecice==3.4.0 +networkx==3.6.1 diff --git a/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt b/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt index 355f9e10d..686df1c96 100644 --- a/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt +++ b/wolf-sheep-soil-creep/wolf-sheep-grass-mesa/requirements.txt @@ -1,5 +1,5 @@ numpy >1, <2 -matplotlib>=3.5,<4 +matplotlib>=3,<4 mesa>=3,<4 pyprecice~=3.0 networkx>=3,<4