diff --git a/.github/workflows/test_minimum_versions.yml b/.github/workflows/test_minimum_versions.yml new file mode 100644 index 0000000..1e775fe --- /dev/null +++ b/.github/workflows/test_minimum_versions.yml @@ -0,0 +1,49 @@ +name: Minimum version tests + +on: + push: + branches: + - main + - 'stable/**' + pull_request: + branches: + - main + - 'stable/**' + +jobs: + tests: + name: minimum version tests (${{ matrix.os }}, ${{ matrix.python-version }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + os: [ubuntu-latest] + python-version: ["3.10"] + steps: + - uses: actions/checkout@v7 + with: + # The reference energies the tests check against come from data in the + # vendored upstream checkout, and setup.py needs its headers to compile. + submodules: recursive + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v7 + with: + python-version: ${{ matrix.python-version }} + - name: Install MPI and BLAS (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libopenmpi-dev openmpi-bin libopenblas-dev + - name: Install dependencies (minimum versions) + shell: bash + run: | + python -m pip install --upgrade pip + python -m pip install 'extremal-python-dependencies<2' + pip install "tox==$(extremal-python-dependencies get-tox-minversion)" + extremal-python-dependencies pin-dependencies-to-minimum --inplace + - name: Test using tox environments + shell: bash + run: | + tox -e py,notebook,mpi diff --git a/pyproject.toml b/pyproject.toml index a235da2..30b4ed8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=77", "wheel", "pybind11>=2.6.0", "mpi4py>=3.0.0"] +requires = ["setuptools>=77.0.1", "wheel", "pybind11>=2.12.0", "mpi4py>=4.0.0"] build-backend = "setuptools.build_meta" [project] @@ -27,8 +27,8 @@ classifiers = [ "Programming Language :: C++", ] dependencies = [ - "mpi4py>=3.0.0", - "numpy>=1.19.0", + "mpi4py>=4.0.0", + "numpy>=1.26.0", ] [project.optional-dependencies] @@ -83,4 +83,4 @@ testpaths = ["test"] # skips by default: a bare count of skips would not distinguish "this case is slow" or # "this backend was not built" from "the reference data is missing". --durations shows # where the time goes, the cases differing by orders of magnitude in cost. -addopts = "-rs --durations=10" \ No newline at end of file +addopts = "-rs --durations=10" diff --git a/releasenotes/notes/minimum-supported-dependencies-b1e7c5649c3201d1.yaml b/releasenotes/notes/minimum-supported-dependencies-b1e7c5649c3201d1.yaml new file mode 100644 index 0000000..e6c7250 --- /dev/null +++ b/releasenotes/notes/minimum-supported-dependencies-b1e7c5649c3201d1.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + The declared minimum versions of several dependencies have been raised to + the oldest ones this package actually builds and runs against: + ``numpy>=1.26.0`` (was 1.19.0), ``mpi4py>=4.0.0`` (was 3.0.0), + ``pybind11>=2.12.0`` (was 2.6.0), and ``setuptools>=77.0.1`` (was 77). + The previous floors were aspirational rather than tested.