diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index be8c036d..4b3a061b 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -13,17 +13,19 @@ permissions: jobs: build: - name: Python ${{ matrix.python-version }} - numpy ${{ matrix.numpy-version }} + name: Python ${{ matrix.python-version }} - NumPy ${{ matrix.numpy-major }}.x runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] - numpy-version: [">=1.25,<2", ">=2"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] + numpy-major: ["1", "2"] exclude: - python-version: "3.13" # numpy<2 is not supported on 3.13+ - numpy-version: ">=1.25,<2" + numpy-major: "1" - python-version: "3.14" - numpy-version: ">=1.25,<2" + numpy-major: "1" + - python-version: "3.14t" + numpy-major: "1" steps: - uses: actions/checkout@v3 @@ -34,7 +36,12 @@ jobs: - name: Install test dependencies run: | uv sync --extra dev - uv pip install "numpy${{ matrix.numpy-version}}" + - name: Install NumPy 1.x compatibility dependencies + if: matrix.numpy-major == '1' + run: uv pip install "numpy>=1.25,<2" "scipy<1.18" # scipy>=1.18 is not supported on numpy<2 + - name: Install NumPy 2.x compatibility dependencies + if: matrix.numpy-major == '2' + run: uv pip install "numpy>=2" - name: Run pytest run: uv run --no-sync pytest --cov-report xml --cov=bayes_opt/ - name: Upload coverage to Codecov diff --git a/pyproject.toml b/pyproject.toml index 46b9dae7..78b2f9e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,15 +16,20 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: Free Threading" ] dependencies = [ "colorama>=0.4.6", "numpy>=1.25; python_version<'3.13'", - "numpy>=2.1.3; python_version>='3.13'", - "packaging>=20.0", - "scikit-learn>=1.0.0", + "numpy>=2.1.3; python_version>='3.13' and python_version<'3.14'", + "numpy>=2.3.0; python_version>='3.14'", + "packaging>=20.0; python_version<'3.14'", + "packaging>=26.0; python_version>='3.14'", + "scikit-learn>=1.0.0; python_version<'3.14'", + "scikit-learn>=1.8.0; python_version>='3.14'", "scipy>=1.0.0; python_version<'3.13'", - "scipy>=1.14.1; python_version>='3.13'", + "scipy>=1.14.1; python_version>='3.13' and python_version<'3.14'", + "scipy>=1.17.0; python_version>='3.14'", ] [project.optional-dependencies] diff --git a/tests/test_notebooks_run.py b/tests/test_notebooks_run.py index 29ce4e33..f1fbf6ea 100644 --- a/tests/test_notebooks_run.py +++ b/tests/test_notebooks_run.py @@ -16,7 +16,7 @@ # get all notebooks: -@pytest.mark.parametrize("notebook", this_file_loc.with_name("examples").glob("*.ipynb")) +@pytest.mark.parametrize("notebook", sorted(this_file_loc.with_name("examples").glob("*.ipynb"))) def test_all_notebooks_run(notebook: Path): as_string = str(notebook) if any([nb in as_string for nb in _NOTEBOOKS_NOT_TO_RUN]):