Skip to content

Commit 6d46d7b

Browse files
committed
Review coverage config and ratchet package coverage gates to 100%
Adopt the remaining useful patterns from covdefaults (exclude `assert_never` lines, skip fully-covered files in reports) and raise all package coverage thresholds to the current 100% baseline, making the Codecov targets explicit in a new codecov.yml. Closes #155
1 parent 5924de4 commit 6d46d7b

4 files changed

Lines changed: 21 additions & 4 deletions

File tree

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ src =
1717
[report]
1818
precision = 1
1919
show_missing = true
20-
skip_covered = false
20+
skip_covered = true
2121
fail_under = 50
2222

2323
# Some of the patterns below were taken or adapted
@@ -36,6 +36,7 @@ exclude_lines =
3636
: \.\.\.(\s*#.*)?$
3737
^ +\.\.\.$
3838
-> ['"]?NoReturn['"]?:
39+
^\s*assert_never\b
3940
# non-runnable code
4041
if __name__ == ['"]__main__['"]:$
4142
partial_branches =

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ def _coerce_to_densities(...):
209209
## CI/CD Pipeline
210210

211211
GitHub Actions runs tests on Python 3.10–3.14 across Ubuntu, macOS, and Windows.
212-
Codecov minimums are 98% overall and 100% diff coverage for new code.
212+
Codecov minimums are 100% overall and 100% diff coverage for new code.
213+
Intentionally-untested lines must carry an explicit `# pragma: no cover` comment.
213214

214215
## Notes for AI Assistants
215216

codecov.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Codecov configuration
2+
# ref: https://docs.codecov.com/docs/codecov-yaml
3+
#
4+
# Note: CI only uploads the combined coverage report
5+
# (see the coverage-combine env in tox.ini), which omits
6+
# "cicd_utils/*" and "tests/*", so these targets apply
7+
# to the src/ridgeplot package only.
8+
coverage:
9+
status:
10+
project:
11+
default:
12+
target: 100%
13+
patch:
14+
default:
15+
target: 100%

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ commands =
3535

3636
pytest: pytest --no-cov {posargs}
3737

38-
tests-unit: pytest tests/unit --doctest-modules src {env:_COV_REPORT_XML} --cov-fail-under=95 {posargs:}
38+
tests-unit: pytest tests/unit --doctest-modules src {env:_COV_REPORT_XML} --cov-fail-under=100 {posargs:}
3939
tests-unit: diff-cover {env:_DIFFCOVER_DFLT_ARGS} --fail-under=100
4040

4141
tests-e2e: pytest tests/e2e --cov=cicd_utils/ridgeplot_examples {env:_COV_REPORT_XML} --cov-fail-under=74 {posargs:}
@@ -49,7 +49,7 @@ commands =
4949
coverage-combine: mv .coverage {env:COVERAGE_FILE}
5050
coverage-combine: coverage xml --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" -o {env:COVERAGE_XML_FILE}
5151
coverage-combine: coverage html --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*"
52-
coverage-combine: coverage report --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" --fail-under=98
52+
coverage-combine: coverage report --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" --fail-under=100
5353
coverage-combine: diff-cover {env:_DIFFCOVER_DFLT_ARGS} --fail-under=100
5454

5555
[testenv:pre-commit-{all,quick,autoupgrade}]

0 commit comments

Comments
 (0)