# Coverage configuration for the wiki stack's test suite.
#
# Why here and not in pytest.ini: coverage.py reads `.coveragerc`, `setup.cfg`,
# `tox.ini` and `pyproject.toml`, and none of them is `pytest.ini` - a
# `[coverage:*]` section there would be silently ignored. pytest's own settings
# stay in pytest.ini; this file holds only what coverage.py itself parses.
#
# The measurement is deliberately *not* wired into pytest's addopts. `pytest-cov`
# is a CI-only dependency (see .gitea/workflows/ci.yml) and is absent from
# tools/requirements.txt on purpose - an instance runs the wiki, it does not
# measure the stack's tests - so an addopts entry would break the plain
# `pytest -q` that every local run and the CI "Tests" step use.
#
# `fail_under` lives here rather than as a `--cov-fail-under` flag in the CI
# step, so the number sits next to the reasoning that produced it and applies to
# any `--cov` run, not just the one CI happens to write.
#
# 85, against a measured 87.0% (CI run 163, 6498 statements, 975 tests). The
# floor was held back until the number had been watched: the first measurement
# was 86.9% of 5105 statements over 730 tests (CI run 87), and between the two
# the measured code grew by a quarter and the suite by a third while the quota
# moved a tenth of a point. That stability is what the threshold rests on.
#
# The two points of headroom are not slack. They are the room the report's own
# taxonomy asks for: a new thin Typer wrapper lowers the total without anything
# having got worse, because its logic is tested beside it (see EVALS.md § "How
# much of the stack the suite reaches"). A threshold at the measured number
# would go red on exactly that commit, and a threshold that goes red for a
# non-reason gets lowered rather than earned - which is the failure mode that
# holding the floor back existed to avoid, arriving from the other side.
#
# What this number does *not* do is close the genuine gaps - provenance_cmd.py,
# migrate_cmd.py, type_resolver.py. It freezes the state that was reached; the
# gaps are their own work, tracked separately.
[run]
source = chemenu
omit =
    chemenu/tests/*

[report]
show_missing = True
precision = 1
fail_under = 85
