187 tests currently run in CI and pre-push, but nothing measures what fraction of faircode/ they actually exercise. There's no pytest-cov (or equivalent), and no coverage badge on README.
Propose:
- Add
pytest-cov to the test/dev install (requirements.txt's dev extra, or wherever pytest itself is documented as installed - see make setup)
- Wire
--cov=faircode --cov-report=term-missing into make test (or a separate make coverage target, to keep make test's output exactly as-is for anyone relying on it)
- Optionally, a coverage badge on README once a baseline number exists
Should be informational, not a CI gate - no PR should fail because coverage dropped by some arbitrary threshold. The point is visibility into which branches of faircode/metrics.py, strategies.py, etc. the existing 187 tests actually reach, not a new merge requirement.
187 tests currently run in CI and pre-push, but nothing measures what fraction of
faircode/they actually exercise. There's nopytest-cov(or equivalent), and no coverage badge on README.Propose:
pytest-covto the test/dev install (requirements.txt's dev extra, or whereverpytestitself is documented as installed - seemake setup)--cov=faircode --cov-report=term-missingintomake test(or a separatemake coveragetarget, to keepmake test's output exactly as-is for anyone relying on it)Should be informational, not a CI gate - no PR should fail because coverage dropped by some arbitrary threshold. The point is visibility into which branches of
faircode/metrics.py,strategies.py, etc. the existing 187 tests actually reach, not a new merge requirement.