Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
71 lines (65 loc) · 2.27 KB
/
Copy pathpyproject.toml
File metadata and controls
71 lines (65 loc) · 2.27 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
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "-q"
[tool.coverage.run]
source = ["app"]
omit = [
"app/main.py",
"app/app.py",
# Route handlers — thin FastAPI wrappers; require DI + running server to exercise
"app/api/deps.py",
"app/api/routes/admin.py",
"app/api/routes/auth.py",
"app/api/routes/expenses.py",
"app/api/routes/health.py",
"app/api/routes/users.py",
"app/api/routes/webauthn.py",
"app/api/routes/web.py",
"app/api/routes/analytics.py",
"app/api/csrf_helper.py",
# DB connection layer — requires a real MongoDB instance
"app/db/mongo.py",
# Error/telemetry registration — wired at startup, not unit-testable
"app/core/errors.py",
"app/core/telemetry.py",
"app/core/tracing.py",
"app/core/idempotency.py",
# External-API-dependent services — require Gemini/SMTP/FIDO2/OAuth
"app/services/analytics_agent_service.py",
"app/services/analytics_narrative.py",
"app/services/chart_builder.py",
"app/services/expense_extraction_service.py",
"app/services/expense_chat_service.py",
"app/services/expense_service.py",
"app/services/gemini_client.py",
"app/services/email_service.py",
"app/services/webauthn_service.py",
"app/services/oauth_service.py",
"app/services/profile_service.py",
]
[tool.coverage.report]
show_missing = true
# Coverage gate. Incrementally widened as tests are backfilled.
# Current: enforced on new SaaS modules only (see CI --cov flags).
# Next: repo-wide 80% once test backfill reaches that threshold (C2).
fail_under = 80
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# E/W: pycodestyle, F: pyflakes, I: isort, N: naming, UP: pyupgrade
select = ["E", "W", "F", "I", "N", "UP"]
ignore = [
"E501", # line too long — handled by formatter, not linter
"N802", # function name should be lowercase (some FastAPI deps use PascalCase)
"N803", # argument name should be lowercase
"UP007", # Use X | Y for union type (keep Optional for now during TS migration)
]
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
# Gradually tighten: start permissive, add strict flags incrementally.
warn_unused_ignores = true
warn_return_any = false
disallow_untyped_defs = false