Quality
Test coverage
Branch coverage is measured with coverage.py — a dev-only dependency. The runtime stays standard-library-only.
Threshold & gate
The enforced minimum total coverage is 98% — one number, fail_under in pyproject.toml under [tool.coverage.report], enforced by a dedicated coverage job in CI (Ubuntu / Python 3.13). CI fails if total coverage drops below that floor. The gate runs in a single job rather than across the whole matrix to keep CI cheap and free of cross-OS path noise.
The floor is deliberately set below what the suite actually reaches, and is raised on purpose as coverage improves — so the number above is the gate, not the measurement. The measurement is the figure at the top of this page.
What's measured
Branch coverage is enabled (branch = true) and the package is measured by import name (source = ["ai_jury"]). The number you see above is the total reported by coverage report on the latest run published to GitHub Pages.
Exclusions
Intentionally-untested paths are excluded so the number stays honest:
src/ai_jury/__main__.pyis omitted (a thinpython -mentry shim).- Lines matching these patterns are excluded from the count:
pragma: no cover,if __name__ == "__main__":,raise NotImplementedError,if TYPE_CHECKING:, and abstract-method decorators.
Add # pragma: no cover to any new line that is genuinely not worth testing.
Run it locally
Measure coverage with one command:
# run the suite under coverage, print the report, write htmlcov/
make coverage
# or, without make:
./scripts/coverage.sh
Either entry point runs:
python3 -m coverage run -m unittest discover -s tests
python3 -m coverage report