diff --git a/.coveragerc b/.coveragerc index b3fdad5f..d7546b55 100644 --- a/.coveragerc +++ b/.coveragerc @@ -17,7 +17,7 @@ src = [report] precision = 1 show_missing = true -skip_covered = false +skip_covered = true fail_under = 50 # Some of the patterns below were taken or adapted @@ -36,6 +36,7 @@ exclude_lines = : \.\.\.(\s*#.*)?$ ^ +\.\.\.$ -> ['"]?NoReturn['"]?: + ^\s*assert_never\b # non-runnable code if __name__ == ['"]__main__['"]:$ partial_branches = diff --git a/AGENTS.md b/AGENTS.md index 0c5010e9..caa236fc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -209,7 +209,8 @@ def _coerce_to_densities(...): ## CI/CD Pipeline GitHub Actions runs tests on Python 3.10–3.14 across Ubuntu, macOS, and Windows. -Codecov minimums are 98% overall and 100% diff coverage for new code. +Codecov minimums are 100% overall and 100% diff coverage for new code. +Intentionally-untested lines must carry an explicit `# pragma: no cover` comment. ## Notes for AI Assistants diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..514a8f98 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,15 @@ +# Codecov configuration +# ref: https://docs.codecov.com/docs/codecov-yaml +# +# Note: CI only uploads the combined coverage report +# (see the coverage-combine env in tox.ini), which omits +# "cicd_utils/*" and "tests/*", so these targets apply +# to the src/ridgeplot package only. +coverage: + status: + project: + default: + target: 100% + patch: + default: + target: 100% diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index e7bf832f..807a9c98 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -7,6 +7,7 @@ Unreleased changes ### CI/CD +- 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`) - Bump actions/download-artifact from 7 to 8 ({gh-pr}`368`) - Bump actions/upload-artifact from 6 to 7 ({gh-pr}`369`) - Bump sigstore/gh-action-sigstore-python from 3.2.0 to 3.3.0 ({gh-pr}`370`) diff --git a/tox.ini b/tox.ini index 721c6ec4..8f90a9ce 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = pytest: pytest --no-cov {posargs} - tests-unit: pytest tests/unit --doctest-modules src {env:_COV_REPORT_XML} --cov-fail-under=95 {posargs:} + tests-unit: pytest tests/unit --doctest-modules src {env:_COV_REPORT_XML} --cov-fail-under=100 {posargs:} tests-unit: diff-cover {env:_DIFFCOVER_DFLT_ARGS} --fail-under=100 tests-e2e: pytest tests/e2e --cov=cicd_utils/ridgeplot_examples {env:_COV_REPORT_XML} --cov-fail-under=74 {posargs:} @@ -49,7 +49,7 @@ commands = coverage-combine: mv .coverage {env:COVERAGE_FILE} coverage-combine: coverage xml --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" -o {env:COVERAGE_XML_FILE} coverage-combine: coverage html --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" - coverage-combine: coverage report --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" --fail-under=98 + coverage-combine: coverage report --data-file={env:COVERAGE_FILE} --omit="cicd_utils/*,tests/*" --fail-under=100 coverage-combine: diff-cover {env:_DIFFCOVER_DFLT_ARGS} --fail-under=100 [testenv:pre-commit-{all,quick,autoupgrade}]