Browse Source

chore: update nox and test deps (#5594)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
pull/5599/head
Henry Schreiner 3 months ago committed by GitHub
parent
commit
55b1357d8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      .github/workflows/ci.yml
  2. 18
      noxfile.py
  3. 21
      tests/requirements.txt
  4. 7
      tools/make_changelog.py

6
.github/workflows/ci.yml

@ -52,6 +52,7 @@ jobs: @@ -52,6 +52,7 @@ jobs:
args: >
-DPYBIND11_FINDPYTHON=OFF
-DCMAKE_CXX_FLAGS="-D_=1"
-DPYBIND11_NUMPY_1_ONLY=ON
exercise_D_: 1
- runs-on: windows-2019
python: '3.8'
@ -65,6 +66,7 @@ jobs: @@ -65,6 +66,7 @@ jobs:
python: '3.9'
args: >
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
-DPYBIND11_NUMPY_1_ONLY=ON
- runs-on: windows-2022
python: '3.10'
args: >
@ -149,14 +151,12 @@ jobs: @@ -149,14 +151,12 @@ jobs:
# First build - C++11 mode and inplace
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here
# (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime).
- name: Configure C++11 ${{ matrix.args }}
run: >
cmake -S . -B .
-DPYBIND11_WERROR=ON
-DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
-DPYBIND11_NUMPY_1_ONLY=ON
-DPYBIND11_PYTEST_ARGS=-v
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
@ -180,13 +180,11 @@ jobs: @@ -180,13 +180,11 @@ jobs:
# Second build - C++17 mode and in a build directory
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here.
# (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime).
- name: Configure C++17
run: >
cmake -S . -B build2
-DPYBIND11_WERROR=ON
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
-DPYBIND11_NUMPY_1_ONLY=ON
-DPYBIND11_PYTEST_ARGS=-v
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON

18
noxfile.py

@ -1,11 +1,16 @@ @@ -1,11 +1,16 @@
#!/usr/bin/env -S uv run
# /// script
# dependencies = ["nox>=2025.2.9"]
# ///
from __future__ import annotations
import argparse
import nox
nox.needs_version = ">=2024.3.2"
nox.options.sessions = ["lint", "tests", "tests_packaging"]
nox.needs_version = ">=2025.2.9"
nox.options.default_venv_backend = "uv|virtualenv"
@ -49,7 +54,7 @@ def tests_packaging(session: nox.Session) -> None: @@ -49,7 +54,7 @@ def tests_packaging(session: nox.Session) -> None:
session.run("pytest", "tests/extra_python_package", *session.posargs)
@nox.session(reuse_venv=True)
@nox.session(reuse_venv=True, default=False)
def docs(session: nox.Session) -> None:
"""
Build the docs. Pass --non-interactive to avoid serving.
@ -83,16 +88,15 @@ def docs(session: nox.Session) -> None: @@ -83,16 +88,15 @@ def docs(session: nox.Session) -> None:
session.run("sphinx-build", "--keep-going", *shared_args)
@nox.session(reuse_venv=True)
@nox.session(reuse_venv=True, default=False)
def make_changelog(session: nox.Session) -> None:
"""
Inspect the closed issues and make entries for a changelog.
"""
session.install("ghapi", "rich")
session.run("python", "tools/make_changelog.py")
session.install_and_run_script("tools/make_changelog.py")
@nox.session(reuse_venv=True)
@nox.session(reuse_venv=True, default=False)
def build(session: nox.Session) -> None:
"""
Build SDists and wheels.

21
tests/requirements.txt

@ -1,13 +1,16 @@ @@ -1,13 +1,16 @@
--only-binary=:all:
build~=1.0; python_version>="3.8"
build>=1
numpy~=1.23.0; python_version=="3.8" and platform_python_implementation=="PyPy"
numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=='PyPy'
numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=="PyPy"
numpy~=2.2.0; python_version=="3.10" and platform_python_implementation=="PyPy"
numpy~=1.26.0; platform_python_implementation=="GraalVM" and sys_platform=="linux"
numpy~=1.21.5; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.8" and python_version<"3.10"
numpy~=1.22.2; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version=="3.10"
numpy~=1.26.0; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.11" and python_version<"3.13"
pytest~=7.0
numpy~=1.21.5; platform_python_implementation=="CPython" and python_version>="3.8" and python_version<"3.10"
numpy~=1.22.2; platform_python_implementation=="CPython" and python_version=="3.10"
numpy~=1.26.0; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13"
numpy~=2.2.0; platform_python_implementation=="CPython" and python_version=="3.13"
pytest>=7
pytest-timeout
scipy~=1.5.4; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version<"3.10"
scipy~=1.8.0; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version=="3.10" and sys_platform!='win32'
scipy~=1.11.1; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.11" and python_version<"3.13" and sys_platform!='win32'
scipy~=1.5.4; platform_python_implementation=="CPython" and python_version<"3.10"
scipy~=1.8.0; platform_python_implementation=="CPython" and python_version=="3.10" and sys_platform!="win32"
scipy~=1.11.1; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13" and sys_platform!="win32"
scipy~=1.15.2; platform_python_implementation=="CPython" and python_version=="3.13" and sys_platform!="win32"

7
tools/make_changelog.py

@ -1,4 +1,9 @@ @@ -1,4 +1,9 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run
# /// script
# dependencies = ["ghapi", "rich"]
# ///
from __future__ import annotations
import re

Loading…
Cancel
Save