-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (140 loc) · 3.99 KB
/
Copy pathpyproject.toml
File metadata and controls
155 lines (140 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
[project]
name = "spotoptim"
version = "1.0.2"
description = "Sequential Parameter Optimization Toolbox"
readme = "README.md"
license = { text = "AGPL-3.0-or-later" }
classifiers = [
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
authors = [
{ name = "bartzbeielstein", email = "32470350+bartzbeielstein@users.noreply.github.com" }
]
requires-python = ">=3.13"
dependencies = [
"numpy>=1.24.3",
"scipy>=1.10.1",
"scikit-learn>=1.5.0",
"pandas>=2.1.0",
"tabulate>=0.9.0",
"dill>=0.4.1",
]
# Default-installed dev tooling (plain `uv sync`). The canonical dev command
# is `uv sync --extra dev`, whose `dev` extra additionally pulls the runtime
# extras (`spotoptim[all]`) and `spotdesirability` needed to run the full
# test suite — those cannot be expressed in a PEP 735 group.
[dependency-groups]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-xdist>=3.5.0",
"pytest-timeout>=2.3.0",
"black>=24.1.0",
"isort>=5.13.0",
"ruff>=0.3.0",
"safety>=3.0.0",
"bandit>=1.8.0",
"pre-commit>=3.7.0",
"ty>=0.0.29",
]
[project.optional-dependencies]
torch = [
"torch>=2.9.1",
"tensorboard>=2.20.0",
]
viz = [
"matplotlib>=3.10.7",
"seaborn>=0.13.2",
]
stats = [
"statsmodels>=0.14.6",
]
remote = [
"requests>=2.32.3",
]
all = [
"spotoptim[torch,viz,stats,remote]",
]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-xdist>=3.5.0",
"pytest-timeout>=2.3.0",
"black>=24.1.0",
"isort>=5.13.0",
"ruff>=0.3.0",
"safety>=3.0.0",
"bandit>=1.8.0",
"pre-commit>=3.7.0",
"ty>=0.0.29",
"spotoptim[all]",
"spotdesirability>=0.0.1",
]
docs = [
# Quarto API documentation generator (replaces mkdocstrings)
"quartodoc>=0.11.1",
# Google-style docstring parser used by quartodoc
"griffe>=1.7.3",
# Quarto Jupyter integration
"jupyter>=1.1.1",
# Transitive dependencies for griffe CLI
"colorama>=0.4.6",
"importlib_metadata",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Keep slow-test timings visible on every run; the registry lives in tests/conftest.py.
addopts = ["--durations=15"]
# Safety net: no single test may hang the suite (e.g. a stuck network call).
# Provided by pytest-timeout (dev dependency).
timeout = 300
markers = [
"slow: heavy end-to-end test; deselect with -m \"not slow\". Runs in nightly/full CI.",
]
filterwarnings = [
"ignore::UserWarning:matplotlib",
]
[build-system]
requires = ["uv_build>=0.9.18"]
build-backend = "uv_build"
[tool.uv]
package = true
# PyTorch CPU-only index — used ONLY for torch to avoid pulling
# incompatible wheels for other packages (markupsafe, importlib-metadata, etc.)
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
[tool.hatch.build.targets.wheel]
packages = ["src/spotoptim"]
[tool.hatch.build]
include = ["src/spotoptim/datasets/*.csv"]
# ── Tooling baseline (roadmap #6): converge on the spot* standard ────────────
# Ruff replaces the removed legacy .flake8. Line length matches black; CI runs
# `ruff check` non-blocking.
[tool.ruff]
line-length = 88
target-version = "py313"
[tool.black]
target-version = ["py313"]
[tool.isort]
profile = "black"
[tool.coverage.run]
branch = true
source = ["src/spotoptim"]
[tool.coverage.report]
# Ratchet: lock in the current ~71% fast-suite coverage so it cannot regress;
# 68 leaves margin for platform variance. Raise deliberately as coverage
# improves. The fast CI gate runs pytest with --cov, enforcing this.
fail_under = 68
# Astral `ty` type checker. Run non-blocking in CI (continue-on-error) so it
# surfaces type debt without failing the build; tighten to a gate later.
[tool.ty.environment]
python-version = "3.13"