build(#134): Coverage-Baseline (.coveragerc) + pytest-cov in dev-deps
Phase 3 von #134 / ADR 0007: 60%-Mindestschwelle pro Default-Lauf, mit show_missing fuer schnelle Lueckenanalyse. Konfiguration: - source = app, omits Hilfs-Skripte (reindex_embeddings, sync_abgeordnetenwatch) - exclude_lines: __repr__, NotImplementedError, __main__-Block, TYPE_CHECKING, Ellipsis-Stubs - htmlcov-Ordner via .gitignore ausgeschlossen Aufruf: pytest --cov=app --cov-report=term-missing pytest --cov=app --cov-report=html # detaillierte HTML-Ansicht in htmlcov/ ADR 0007 (Test-Taxonomie) erklaert das Gesamtschema.
This commit is contained in:
parent
7e20f910fe
commit
3262f17458
30
.coveragerc
Normal file
30
.coveragerc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[run]
|
||||||
|
source = app
|
||||||
|
omit =
|
||||||
|
# Hilfs-Skripte und Migrations-Tools — nicht produktiver Code
|
||||||
|
app/reindex_embeddings.py
|
||||||
|
app/sync_abgeordnetenwatch.py
|
||||||
|
# Generated / Auto-Discovery
|
||||||
|
app/__init__.py
|
||||||
|
|
||||||
|
[report]
|
||||||
|
# Faustregel ADR 0007: keine 100%-Jagd, aber 70% pro Kern-Modul ist
|
||||||
|
# der Mindeststandard. Der show_missing-Flag macht Luecken im CI-Output
|
||||||
|
# sofort sichtbar.
|
||||||
|
show_missing = true
|
||||||
|
skip_covered = false
|
||||||
|
precision = 1
|
||||||
|
fail_under = 60
|
||||||
|
|
||||||
|
# Zeilen, die nicht gezaehlt werden sollen — typische Boilerplate ohne
|
||||||
|
# eigentliche Testbarkeit.
|
||||||
|
exclude_lines =
|
||||||
|
pragma: no cover
|
||||||
|
def __repr__
|
||||||
|
raise NotImplementedError
|
||||||
|
if __name__ == .__main__.:
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
\.\.\.
|
||||||
|
|
||||||
|
[html]
|
||||||
|
directory = htmlcov
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -18,4 +18,8 @@ reports/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
site/
|
site/
|
||||||
|
|
||||||
|
# Coverage reports (Phase 3 von #134, ADR 0007)
|
||||||
.coverage
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
htmlcov/
|
||||||
|
|||||||
@ -11,3 +11,4 @@
|
|||||||
|
|
||||||
pytest>=8.0.0
|
pytest>=8.0.0
|
||||||
pytest-asyncio>=0.24.0
|
pytest-asyncio>=0.24.0
|
||||||
|
pytest-cov>=5.0.0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user