Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (126 loc) · 4.11 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (126 loc) · 4.11 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
# Workspace root — not a package itself; the distributions live in packages/.
[project]
name = "quints-monorepo"
version = "0"
requires-python = ">=3.10"
dependencies = [
"quints",
"beangulp-mt940",
"beangulp-stripe",
"beangulp-wise[sca]",
"beangulp-yapeal",
"beanprice-bazg",
]
[dependency-groups]
dev = [
"basedpyright>=1.39.9",
"beanprice>=2.1",
"deptry>=0.25.1",
"import-linter>=2.13",
"pytest>=8",
"pytest-cov>=7.1.0",
"ruff>=0.15.21",
"vulture>=2.16",
]
# Zensical is alpha (0.0.x) and regresses between patches — pin exactly,
# bump deliberately after checking the release notes.
docs = [
"zensical==0.0.50",
]
[tool.uv]
package = false
[tool.uv.workspace]
members = ["packages/*"]
[tool.uv.sources]
quints = { workspace = true }
beangulp-mt940 = { workspace = true }
beangulp-stripe = { workspace = true }
beangulp-wise = { workspace = true }
beangulp-yapeal = { workspace = true }
beanprice-bazg = { workspace = true }
# ---------------------------------------------------------------------------
# Quality tooling. Single entrypoint: `make check` (see Makefile).
# ---------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py310"
src = [
"packages/quints/src",
"packages/beangulp-mt940/src",
"packages/beangulp-stripe/src",
"packages/beangulp-wise/src",
"packages/beangulp-yapeal/src",
"packages/beanprice-bazg/src",
]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"BLE", # blind except — catch what you can handle, name it
"C4", # comprehensions
"SIM", # simplify
"S", # bandit (security)
"RUF", # ruff-specific
]
ignore = [
"B008", # function call in default — the standard typer.Option/Argument idiom
"RUF001", "RUF002", "RUF003", # ambiguous unicode — de/fr/it strings are core content here
]
[tool.ruff.lint.per-file-ignores]
"**/tests/*" = ["S101", "S105", "S106"] # asserts and hardcoded test credentials are fine in tests
[tool.pytest.ini_options]
# A warning in our code or a dependency is a defect until triaged.
filterwarnings = ["error"]
[tool.basedpyright]
include = ["packages"]
exclude = ["**/.venv", "**/__pycache__", "dist"]
pythonVersion = "3.10"
typeCheckingMode = "strict"
# beancount/beangulp/fava ship no type stubs — Unknown-type diagnostics on their
# APIs are unfixable noise, so only the Unknown* family is relaxed from strict.
reportMissingTypeStubs = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportUnknownLambdaType = false
[tool.vulture]
paths = ["packages"]
exclude = ["*/.venv/*", "*/tests/*"]
min_confidence = 80
ignore_names = ["cls"] # pydantic @field_validator signature
[tool.importlinter]
root_packages = [
"quints",
"beangulp_mt940",
"beangulp_stripe",
"beangulp_wise",
"beangulp_yapeal",
"beanprice_bazg",
]
# Layers within quints, top to bottom. Modules on the same line (":") may
# import each other; a module may only import from lines below its own.
# exhaustive: adding a new module without placing it in a layer is an error.
[[tool.importlinter.contracts]]
name = "quints is layered: entrypoints -> orchestration -> domain -> foundation"
type = "layers"
containers = ["quints"]
exhaustive = true
layers = [
"cli : fava : plugins",
"settlement : report_pdf : match : importing : init : closing : liability",
"mwst : kmu : vat : fx : prices : inbox : payables : receivables : invoice",
"config : ledger : ui",
]
[[tool.importlinter.contracts]]
name = "standalone importers stay standalone"
type = "independence"
modules = ["beangulp_mt940", "beangulp_stripe", "beangulp_wise", "beangulp_yapeal", "beanprice_bazg"]
[[tool.importlinter.contracts]]
name = "building blocks never depend on quints"
type = "forbidden"
source_modules = ["beangulp_mt940", "beangulp_stripe", "beangulp_wise", "beangulp_yapeal", "beanprice_bazg"]
forbidden_modules = ["quints"]