diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 800182e0..f7502ca5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-13, macos-14] arch: [auto, aarch64] - py: [cp38, cp39, cp310, cp311, cp312] + py: [cp39, cp310, cp311, cp312] exclude: - os: windows-latest arch: aarch64 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34d91d57..7597e72f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,10 +24,10 @@ jobs: python-version: "3.11" installs: "numpy>=2.0.0rc1" - os: macos-14 - python-version: "3.8" + python-version: "3.9" installs: "numpy==1.21.0 scipy matplotlib" - os: ubuntu-latest - python-version: "pypy-3.8" + python-version: "pypy-3.9" - os: ubuntu-latest python-version: "3.12" installs: "'numpy>=2.0.0rc1' scipy matplotlib" diff --git a/noxfile.py b/noxfile.py index f65b6df7..2d95046f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -15,6 +15,8 @@ "COVERAGE_CORE": "sysmon", # faster coverage on Python 3.12 } +nox.options.sessions = ["test", "mintest", "maxtest"] + @nox.session(reuse_venv=True) def test(session: nox.Session) -> None: @@ -23,14 +25,14 @@ def test(session: nox.Session) -> None: session.run("pytest", *session.posargs, env=ENV) -@nox.session(reuse_venv=True) -def np2test(session: nox.Session) -> None: +@nox.session(python="3.12", reuse_venv=True) +def maxtest(session: nox.Session) -> None: """Run the unit and regular tests.""" - session.install("-e.", "scipy", "pytest", "--pre") + session.install("-e.", "scipy", "matplotlib", "pytest", "--pre") session.run("pytest", *session.posargs, env=ENV) -@nox.session(venv_backend="uv") +@nox.session(python="3.9", venv_backend="uv") def mintest(session: nox.Session) -> None: """Run the unit and regular tests.""" session.install("-e.", "--resolution=lowest-direct") @@ -38,6 +40,14 @@ def mintest(session: nox.Session) -> None: session.run("pytest", *session.posargs) +@nox.session(python="pypy3.9", venv_backend="uv") +def pypy(session: nox.Session) -> None: + """Run the unit and regular tests.""" + session.install("-e.") + session.install("pytest") + session.run("pytest", *session.posargs) + + # Python-3.12 provides coverage info faster @nox.session(python="3.12", reuse_venv=True) def cov(session: nox.Session) -> None: diff --git a/pyproject.toml b/pyproject.toml index 2ab3b87d..9533edee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ maintainers = [ { email = "hans.dembinski@gmail.com" }, ] readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.9" license = { file = "LICENSE" } classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/tests/test_issue.py b/tests/test_issue.py index 270f7c99..b2c3bccf 100644 --- a/tests/test_issue.py +++ b/tests/test_issue.py @@ -1,4 +1,5 @@ import numpy as np +import warnings def test_issue_424(): @@ -152,7 +153,9 @@ def model(x, sig_n, sig_mu, sig_sigma, bkg_n, bkg_tau): m = Minuit(nll, sig_n=33, sig_mu=ymu, sig_sigma=ysigma, bkg_n=66, bkg_tau=ytau) # with Simplex the fit never yields NaN, which is good but not what we want here - m.migrad(use_simplex=False) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", RuntimeWarning) + m.migrad(use_simplex=False) if np.isnan(m.fmin.edm): assert not m.valid