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
48 changes: 24 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
Expand Down Expand Up @@ -44,6 +44,7 @@ classifiers = [
dynamic = ["version"]

[project.optional-dependencies]
qs = ["bluesky-queueserver-api"]
dev = [
"pytest",
"pytest-cov",
Expand All @@ -54,6 +55,7 @@ dev = [
"pandas-stubs",
"coverage",
"pyright",
"blop[qs]",
]
cpu = [
# Empty extra - the source configuration below routes to CPU-only index
Expand Down Expand Up @@ -83,23 +85,23 @@ local_scheme = "no-local-version"
src = ["src", "examples", "docs/source/tutorials"]
line-length = 125
lint.select = [
"B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
"F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f
"W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
"UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
"SLF", # self - https://docs.astral.sh/ruff/settings/#lintflake8-self
"PLC2701", # private import - https://docs.astral.sh/ruff/rules/import-private-name/
"LOG015", # root logger call - https://docs.astral.sh/ruff/rules/root-logger-call/
"S101", # assert - https://docs.astral.sh/ruff/rules/assert/
"D", # docstring - https://docs.astral.sh/ruff/rules/#pydocstyle-d
"B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
"F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f
"W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
"UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
"SLF", # self - https://docs.astral.sh/ruff/settings/#lintflake8-self
"PLC2701", # private import - https://docs.astral.sh/ruff/rules/import-private-name/
"LOG015", # root logger call - https://docs.astral.sh/ruff/rules/root-logger-call/
"S101", # assert - https://docs.astral.sh/ruff/rules/assert/
"D", # docstring - https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
lint.ignore = [
"D", # TODO: Add docstrings, then enforce these errors
"SLF001", # TODO: Fix private member access, https://github.com/NSLS-II/blop/issues/94
"B901", # return-in-generator - https://docs.astral.sh/ruff/rules/return-in-generator/
"D", # TODO: Add docstrings, then enforce these errors
"SLF001", # TODO: Fix private member access, https://github.com/NSLS-II/blop/issues/94
"B901", # return-in-generator - https://docs.astral.sh/ruff/rules/return-in-generator/
]
lint.preview = true # so that preview mode PLC2701, and LOG015 is enabled

Expand All @@ -114,20 +116,18 @@ convention = "numpy"

[tool.pyright]
ignore = [
"sim/",
"src/blop/tests/",
"src/blop/bayesian/", # TODO: Remove this and fix type errors
"src/blop/ax/qserver_agent.py", # TODO: Remove this and fix type errors
"sim/",
"src/blop/tests/",
"src/blop/bayesian/", # TODO: Remove this and fix type errors
"src/blop/ax/qserver_agent.py", # TODO: Remove this and fix type errors
]

# Configure PyTorch CPU-only installation when [cpu] extra is requested
# This requires uv (https://docs.astral.sh/uv/)
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", marker = "extra == 'cpu'" },
]
torch = [{ index = "pytorch-cpu", marker = "extra == 'cpu'" }]

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true # Only use this index for torch-related packages
explicit = true # Only use this index for torch-related packages
2 changes: 0 additions & 2 deletions src/blop/ax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
from .dof import DOF, ChoiceDOF, DOFConstraint, RangeDOF
from .objective import Objective, OutcomeConstraint, ScalarizedObjective, to_ax_objective_str
from .optimizer import AxOptimizer
from .qserver_agent import BlopQserverAgent as QserverAgent

__all__ = [
"Agent",
"QserverAgent",
"DOF",
"RangeDOF",
"ChoiceDOF",
Expand Down
Loading
Loading