Skip to content

Commit 9b464c8

Browse files
committed
Merge remote-tracking branch 'origin/main' into 240-pytest-good-practices
# Conflicts: # docs/reference/changelog.md
2 parents e585588 + 82f436a commit 9b464c8

5 files changed

Lines changed: 22 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%

docs/reference/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Unreleased changes
77

88
### CI/CD
99

10+
- Review the coverage configuration in light of `covdefaults`, adopting its `assert_never` exclusion and `skip_covered` report setting, and raising all package coverage gates to 100% ({gh-pr}`390`)
1011
- Adopt pytest's strict mode, following the recommendations from pytest's "Good Integration Practices" guide ({gh-pr}`387`)
1112
- Bump actions/download-artifact from 7 to 8 ({gh-pr}`368`)
1213
- Bump actions/upload-artifact from 6 to 7 ({gh-pr}`369`)

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)