diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..a054c1b --- /dev/null +++ b/.coveragerc @@ -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 diff --git a/.gitignore b/.gitignore index 4eae9af..f124ae5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,8 @@ reports/ .DS_Store Thumbs.db site/ + +# Coverage reports (Phase 3 von #134, ADR 0007) .coverage +.coverage.* +htmlcov/ diff --git a/requirements-dev.txt b/requirements-dev.txt index 0f66d22..13fe0ea 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,3 +11,4 @@ pytest>=8.0.0 pytest-asyncio>=0.24.0 +pytest-cov>=5.0.0