Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
7 changes: 6 additions & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ jobs:
uses: olegtarasov/[email protected]
- name: Install pandoc
run: sudo apt-get install -y pandoc
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install Poetry
uses: snok/install-poetry@v1
run: |
uv tool install poetry
- name: Install package and test dependencies
run: |
poetry install --with dev,nbtools
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/format_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install Poetry
uses: snok/install-poetry@v1
run: |
uv tool install poetry
- name: Install dependencies
run: |
poetry install --with dev
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,33 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
numpy-version: [">=1.25,<2", ">=2"]
exclude:
- python-version: "3.13"
numpy-version: ">=1.25,<2" # numpy<2 is not supported on Python 3.13

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Install Poetry
uses: snok/install-poetry@v1
run: |
uv tool install poetry
- name: Install test dependencies
run: |
poetry add "numpy${{ matrix.numpy-version }}"
poetry install --with dev,nbtools
poetry self add poetry-plugin-export
poetry export -f requirements.txt --with dev,nbtools --without-hashes --output requirements-dev.txt
echo "numpy${{ matrix.numpy-version }}" >> constraints.txt
uv pip compile requirements-dev.txt --output-file requirements.txt \
--python-version ${{ matrix.python-version }} \
--override constraints.txt
poetry run pip install -r requirements.txt
poetry install --only-root
- name: Test with pytest
run: |
poetry run pytest --cov-report xml --cov=bayes_opt/
Expand Down
52 changes: 32 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
[tool.poetry]
[project]
name = "bayesian-optimization"
version = "3.0.0b1"
description = "Bayesian Optimization package"
authors = ["Fernando Nogueira"]
license = "MIT"
authors = [{ name = "Fernando Nogueira", email = "[email protected]" }]
license = { file = "LICENSE" }
readme = "README.md"
packages = [{include = "bayes_opt"}]

[tool.poetry.dependencies]
python = "^3.9"
scikit-learn = "^1.0.0"
numpy = ">=1.25"
scipy = [
{version = "^1.0.0", python = "<3.13"},
{version = "^1.14.1", python = ">=3.13"}
requires-python = ">=3.9,<4.0"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"scikit-learn>=1.0.0,<2.0.0",
"numpy>=1.25; python_version<'3.13'",
"numpy>=2.1.3; python_version>='3.13'",
"scipy>=1.0.0,<2.0.0; python_version<'3.13'",
"scipy>=1.14.1,<2.0.0; python_version>='3.13'",
"colorama>=0.4.6,<1.0.0",
]
colorama = "^0.4.6"

[tool.poetry]
requires-poetry = ">=2.0"
packages = [{ include = "bayes_opt" }]


[tool.poetry.group.dev] # for testing/developing
[tool.poetry.group.dev] # for testing/developing
optional = true
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
Expand All @@ -28,7 +40,7 @@ ruff = "0.6.6"
pre-commit = "^3.7.1"


[tool.poetry.group.nbtools] # for running/converting notebooks
[tool.poetry.group.nbtools] # for running/converting notebooks
optional = true
[tool.poetry.group.nbtools.dependencies]
nbformat = "^5.9.2"
Expand All @@ -38,17 +50,17 @@ matplotlib = "^3.0"
nbsphinx = "^0.9.4"
sphinx-immaterial = "^0.12.0"
sphinx = [
{version = "^7.0.0", python = "<3.10"},
{version = "^8.0.0", python = ">=3.10"}
{ version = "^7.0.0", python = "<3.10" },
{ version = "^8.0.0", python = ">=3.10" },
]
sphinx-autodoc-typehints = [
{version = "^2.3.0", python = "<3.10"},
{version = "^2.4.0", python = ">=3.10"}
{ version = "^2.3.0", python = "<3.10" },
{ version = "^2.4.0", python = ">=3.10" },
]


[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=2.0"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.report]
Expand Down