-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
187 lines (166 loc) · 4.28 KB
/
pyproject.toml
File metadata and controls
187 lines (166 loc) · 4.28 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[build-system]
requires = ["uv_build>=0.9.15,<0.10.0"]
build-backend = "uv_build"
[project]
name = "optimal-classification-cutoffs"
version = "2.0.1"
description = "Utilities for computing optimal classification cutoffs for binary and multiclass classification"
readme = "README.md"
license = "MIT"
dependencies = [
"numpy>=1.20.0",
"scipy",
"scikit-learn",
]
authors = [
{name = "Gaurav Sood", email = "contact@gsood.com"}
]
requires-python = ">=3.12"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Mathematics",
]
[tool.uv.build-backend]
module-name = "optimal_cutoffs"
module-root = "."
[tool.ruff]
target-version = "py312"
line-length = 88
exclude = [
"docs/",
"*.ipynb", # Exclude Jupyter notebooks
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line-too-long
"W291", # trailing-whitespace
"W292", # no-newline-at-end-of-file
"W293", # blank-line-with-whitespace
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"B007", # unused-loop-control-variable (acceptable in test fixtures)
]
[tool.pytest.ini_options]
filterwarnings = [
# Suppress specific expected warnings in tests
"ignore:Multiclass probabilities don't sum to 1.0:UserWarning",
"ignore:unique_scan with micro averaging uses independent:UserWarning",
"ignore:invalid value encountered in divide:RuntimeWarning",
]
[dependency-groups]
# For examples and visualizations
examples = ["matplotlib", "pandas", "ipywidgets"]
# For performance optimization
performance = ["numba>=0.57.0"]
# For adaptive optimization methods
adaptive = ["scikit-optimize>=0.9.0"]
# For documentation generation
docs = [
"sphinx>=5.0",
"furo",
"sphinx-autodoc-typehints>=1.0",
"nbsphinx>=0.8.0",
"nbconvert>=6.0",
"jupyter",
"matplotlib",
"pandas",
"ipywidgets"
]
# For development and testing
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.7.0",
"mypy>=1.0",
"pre-commit>=3.0",
"hypothesis>=6.0",
"psutil>=5.0",
"nbsphinx>=0.9.8",
"matplotlib>=3.10.7",
"seaborn>=0.13.2",
"pandas>=2.3.3",
"jupyter>=1.1.1",
"pydoclint>=0.5.0",
]
# For running all tests with full coverage (numba optional - use 'performance' group for numba-accelerated tests)
test = [
"pytest>=7.0",
"pytest-cov>=4.0",
"hypothesis>=6.0",
"psutil>=5.0",
"ruff>=0.7.0"
]
# All optional dependencies
all = [
"matplotlib",
"pandas",
"numba>=0.57.0",
"scikit-optimize>=0.9.0",
"psutil>=5.0"
]
[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
allow_redefinition = true
no_implicit_optional = true
allow_untyped_calls = true
allow_untyped_decorators = true
warn_no_return = true
warn_redundant_casts = true
[[tool.mypy.overrides]]
module = [
"sklearn.*",
"numba.*",
"scipy.*",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"optimal_cutoffs.optimize",
"optimal_cutoffs.multilabel",
]
allow_untyped_defs = true
allow_untyped_calls = true
[tool.pydoclint]
style = "numpy"
check-return-types = true
check-arg-order = true
check-class-attributes = true
arg-type-hints-in-docstring = false
should-document-star-arguments = true
ignore-underscore-args = true
ignore-private-args = false
show-filenames-in-every-violation-message = true
baseline = "pydoclint-baseline.txt"
[tool.deptry]
# Exclude specific paths from analysis
exclude = [".venv", "build", "dist", ".*\\.ipynb$"]
extend_exclude = ["tests", "examples", "docs"]
known_first_party = ["optimal_cutoffs"]
# Package name to module name mappings
[tool.deptry.package_module_name_map]
scikit-optimize = "skopt"
ipywidgets = "ipywidgets"
psutil = "psutil"
[tool.deptry.per_rule_ignores]
# DEP004: Allow optional performance dependency in specific file
DEP004 = ["numba"]
# DEP003: Allow transitive dependencies in examples/notebooks
DEP003 = ["IPython"]