Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 9 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_notebooks_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
Loading