Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
268 lines (240 loc) · 6.88 KB
/
Copy pathpyproject.toml
File metadata and controls
268 lines (240 loc) · 6.88 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
[project]
name = "fluvo"
version = "0.0.3"
description = "Fast data into Odoo — high-performance Polars-backed ETL."
readme = "README.md"
requires-python = ">=3.10"
license = "LGPL-3.0-only"
license-files = ["LICENSE"]
authors = [
{ name = "Strategic Efficiency B.V." },
]
maintainers = [
{ name = "bosd", email = "c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"click >=8.0.1",
"odoo-client-lib >=2.0.1",
"httpx",
"lxml",
"rich",
"polars",
"pyarrow",
"pyyaml >=6.0",
]
[project.urls]
Homepage = "https://github.com/getfluvo/fluvo"
Repository = "https://github.com/getfluvo/fluvo"
Documentation = "https://fluvo.readthedocs.io"
Changelog = "https://github.com/getfluvo/fluvo/releases"
# --- Added for mypyc integration ---
[build-system]
# This now includes all dependencies needed for mypyc to compile the code.
requires = [
"setuptools>=77.0",
"mypy>=1.0",
"click >=8.0.1",
"odoo-client-lib",
"httpx",
"lxml",
"rich",
"polars",
"pyarrow",
"pyyaml >=6.0",
]
build-backend = "setuptools.build_meta"
# This section is the standard for defining extras for pip/uv install
[project.optional-dependencies]
dev = [
"coverage[toml] >= 6.2",
"pre-commit >=2.16.0",
"pre-commit-hooks >=4.6.0",
"pytest >=6.2.5",
"pygments >=2.10.0",
"nox >=2024.04.14",
"pytest-mock",
]
lint = ["ruff >=0.5.5", "pydoclint >=0.5.0"]
docs = [
"shibuya >=2025.5.30",
"myst-parser >= 3.0.1",
"sphinx >= 4.3.2",
"sphinx-autobuild >=2021.3.14",
"sphinx-click >=3.0.2",
"sphinx_mermaid",
"sphinx_copybutton",
"pygments", # pin lifted (was <2.20 for a shibuya linespan crash); verified against docs-build
]
mypy = ["mypy >=0.930", "pytest-mock", "types-pyyaml >=6.0"]
typeguard = ["typeguard >=2.13.3"]
xdoctest = ["xdoctest[colors] >=0.15.10"]
[dependency-groups]
dev = [
"coverage[toml] >= 6.2",
"pre-commit >=2.16.0",
"pre-commit-hooks >=4.6.0",
"pytest >=6.2.5",
"pygments >=2.10.0",
"nox >=2024.04.14",
"pytest-mock",
]
lint = ["ruff >=0.5.5", "pydoclint >=0.5.0"]
docs = [
"shibuya >=2025.5.30",
"myst-parser >= 3.0.1",
"sphinx >= 4.3.2",
"sphinx-autobuild >=2021.3.14",
"sphinx-click >=3.0.2",
"sphinx_mermaid",
"sphinx_copybutton",
"pygments", # pin lifted (was <2.20 for a shibuya linespan crash); verified against docs-build
]
mypy = ["mypy >=0.930", "pytest-mock", "types-pyyaml >=6.0"]
typeguard = ["typeguard >=2.13.3"]
xdoctest = ["xdoctest[colors] >=0.15.10"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.uv]
package = true
[project.scripts]
fluvo = "fluvo.__main__:cli"
[tool.coverage.paths]
source = ["src", "*/site-packages"]
tests = ["tests", "*/tests"]
[tool.coverage.run]
branch = true
# The import/export pipelines run in worker threads; without this, coverage
# never counts the lines executed inside them.
concurrency = ["thread"]
source = ["fluvo", "tests"]
omit = [
# Exclude the legacy v9 workflow from coverage reports
"src/fluvo/lib/workflow/invoice_v9.py",
# The e2e harness runs only under the Docker stack (nox -s e2e), never in the
# unit-coverage job, so it would otherwise report as 0% noise.
"tests/e2e/*",
]
[tool.coverage.report]
show_missing = true
fail_under = 85
# exclude_also appends to the built-in default (`pragma: no cover`). These are
# lines that are unreachable-by-design or pure boilerplate, so requiring coverage
# for them would only add noise. Business logic and error handlers are NOT here —
# those get real tests.
exclude_also = [
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"raise AssertionError",
"@(?:typing\\.)?overload",
"@(?:abc\\.)?abstractmethod",
]
[tool.mypy]
strict = true
warn_unreachable = true
pretty = true
show_column_numbers = true
show_error_context = true
# Add this to ignore missing stubs for third-party libraries
ignore_missing_imports = true
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "odoo"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.e2e.*"
ignore_errors = true
[tool.ruff]
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C90", # mccabe
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"COM812",
"COM819",
"D107", # undocumented-public-init conflicts with DOC301
"D206",
"D300",
"E111",
"E114",
"E117",
"ISC001",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"UP038", # `isinstance(x, X | Y)` is slower than the tuple form; ruff deprecated its fix
"W191",
]
exclude = [
".git",
".mypy_cache",
".nox",
".pytest_cache",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"docs/conf.py",
# Add the file you want to ignore to this list
"pydoclint-baseLine.txt",
"pydoclint-baseline.txt",
"uv.lock",
]
[tool.ruff.lint.per-file-ignores]
"*/test_*.py" = ["S101"]
"noxfile.py" = ["S101"]
"**/conftest.py" = ["S101"]
# The e2e harness is operational tooling, not library code: the assertion module
# is assert-based (S101), uses short A/G import aliases by convention (N812), and
# its runtime driver shells out to compose / runs an internal DB-exists query
# (S603/S608). Optional style (UP045) matches the rest of the codebase.
"tests/e2e/*" = ["S101", "N812", "S603", "S608", "UP045"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.cibuildwheel]
# Build mypyc-compiled wheels for the supported CPython versions (used by the
# Release workflow). mypyc targets CPython, so PyPy/musllinux/32-bit are skipped.
build = "cp310-* cp311-* cp312-* cp313-* cp314-*"
skip = "*-musllinux* *_i686 *-win32 pp*"
environment = "FLUVO_COMPILE_MYPYC=1"
# Smoke-test that each built wheel's compiled extension imports.
test-command = "python -c \"import fluvo\""
build-verbosity = 1
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
[tool.pydoclint]
style = 'google'
exclude = '\.git|\.nox|noxfile.py'
arg-type-hints-in-docstring = false
baseline = 'pydoclint-baseline.txt'
auto-generate-baseline = 'False'
[tool.pytest.ini_options]
addopts = "--doctest-modules src tests --ignore=tests/e2e"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS IGNORE_EXCEPTION_DETAIL"
markers = [
"large: opt-in large-dataset e2e stress runs (deselected unless -m large).",
"chaos: opt-in resilience tests under injected transport faults (Toxiproxy).",
]