-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
205 lines (186 loc) · 5.65 KB
/
Copy pathpyproject.toml
File metadata and controls
205 lines (186 loc) · 5.65 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[build-system]
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"
[project]
name = "curveforge"
version = "0.1.0.post1"
description = "Build Dirac Live target curves from research-grounded base curves and composable transforms."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
authors = [{ name = "curveforge contributors" }]
keywords = ["audio", "dirac", "target-curve", "harman", "room-correction", "eq"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio",
]
dependencies = [
"click>=8.1",
"numpy>=1.26",
"pydantic>=2.6",
"pyyaml>=6.0",
]
[project.optional-dependencies]
plot = [
"matplotlib>=3.7",
]
dev = [
"hypothesis>=6.100",
"matplotlib>=3.7",
"mypy>=1.10",
"pyright>=1.1.360",
"pytest>=8.2",
"pytest-cov>=5.0",
"ruff>=0.5",
"types-pyyaml>=6.0",
]
[project.scripts]
curveforge = "curveforge.cli:main"
[project.urls]
Homepage = "https://github.com/teolbb/curveforge"
Issues = "https://github.com/teolbb/curveforge/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/curveforge"]
# ----------------------------- ruff ----------------------------------------
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # mccabe complexity
"N", # pep8-naming
"UP", # pyupgrade
"ANN", # flake8-annotations (explicit return types)
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"A", # flake8-builtins
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print (no print/pprint)
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PL", # pylint
"TRY", # tryceratops
"PERF", # perflint
"RUF", # ruff-specific
"D", # pydocstyle (public docstrings)
]
ignore = [
"COM812", # conflicts with formatter
"ISC001", # conflicts with formatter
"D203", # one-blank-line-before-class (incompatible with D211)
"D213", # multi-line-summary-second-line (incompatible with D212)
"PLR0913", # too-many-arguments — replaced by max-args below
"TRY003", # avoid-long-messages — pragmatic for clear errors
]
[tool.ruff.lint.mccabe]
# Cyclomatic complexity: 12 (matches llm-pipelines)
max-complexity = 12
[tool.ruff.lint.pylint]
# Mirror llm-pipelines: max 4 params, force param objects above that.
max-args = 4
max-statements = 50
max-branches = 12
max-returns = 6
max-locals = 15
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # asserts allowed
"D", # docstrings not required
"ANN", # annotations not required
"PLR2004", # magic numbers OK
"PLR0915", # long test bodies OK
]
"examples/**/*.py" = [
"T201", # print allowed
"D",
"INP001",
]
"src/curveforge/curves/__init__.py" = ["F401"] # re-exports for registry
"src/curveforge/transforms/__init__.py" = ["F401"] # re-exports for registry
"tools/**/*.py" = ["INP001"] # standalone scripts
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ----------------------------- mypy ----------------------------------------
[tool.mypy]
python_version = "3.11"
strict = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
# disallow_any_explicit is intentionally OFF: Pydantic boundary validators
# legitimately accept raw YAML/dict payloads (typed Any). Strict elsewhere
# (no implicit any, untyped defs disallowed, generics required).
disallow_any_explicit = false
disallow_any_generics = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
no_implicit_optional = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
disallow_any_explicit = false
# --------------------------- pydantic --------------------------------------
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
# --------------------------- pyright ---------------------------------------
[tool.pyright]
include = ["src", "tests"]
pythonVersion = "3.11"
# `standard` keeps pyright as a secondary checker (catches real bugs mypy
# may miss), while mypy in strict mode owns the substantive type contract.
# Strict mode trips on every Unknown introduced at the YAML/JSON-schema
# boundary, which is noise for this codebase.
typeCheckingMode = "standard"
reportMissingTypeStubs = "warning"
# --------------------------- pytest ----------------------------------------
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra --strict-markers --strict-config"
testpaths = ["tests"]
xfail_strict = true
[tool.coverage.run]
source = ["src/curveforge"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
show_missing = true
fail_under = 85