Repository navigation
Commit d261c4a
committed
fix: scope Codecov report to product code, excluding test files
CI runs `pytest --cov=sagemaker` per sub-package and uploads to Codecov,
but coverage is not scoped to `src/` product code. Executed test-support
scripts (notably `*/tests/data/*.py` training entry-scripts and model
definitions) get recorded and uploaded.
With no `codecov.yml` ignore list, these dominate the report: recent
commits on master show ~98% of the measured files/lines are test files
rather than product code (e.g. commit 3f810c6: 285 of 290 reported
files are under tests/). This inflates the reported project coverage
(~88-90%) far above the true product-code coverage and makes the number
unreliable and unstable across commits.
Add a repo-root `codecov.yml` that scopes the report to product code via
an `ignore:` list (tests, conftest, test-data scripts, codegen and
workflow_helper utilities), and defines project/patch status targets and
`after_n_builds: 4` so the percentage is computed over all four
sub-package uploads. Validated with the Codecov config validator.
This follows how peer projects configure Codecov (scikit-learn ignores
conftest/externals; aws-cdk ignores non-product paths).1 parent 3f810c6 commit d261c4a
1 file changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments