|
| 1 | +# Codecov configuration for the sagemaker-python-sdk (v3) monorepo. |
| 2 | +# https://docs.codecov.com/docs/codecovyml-reference |
| 3 | +# |
| 4 | +# Why this file exists: |
| 5 | +# CI runs `pytest --cov=sagemaker` per sub-package and uploads to Codecov. Because |
| 6 | +# coverage is not scoped to the `src/` product code, executed test-support scripts |
| 7 | +# (notably `*/tests/data/*.py` training entry-scripts and model definitions) are |
| 8 | +# recorded and uploaded. With no ignore list these dominated the report — recent |
| 9 | +# commits show ~98% of the measured files/lines were test files, not product code, |
| 10 | +# which inflates the reported coverage and makes the number meaningless. |
| 11 | +# |
| 12 | +# The `ignore:` list below scopes the Codecov report to product code only. |
| 13 | + |
| 14 | +codecov: |
| 15 | + # Wait for all four sub-package unit-test jobs to upload before finalizing, so the |
| 16 | + # project % is computed over the complete report rather than whichever job lands first. |
| 17 | + notify: |
| 18 | + after_n_builds: 4 |
| 19 | + wait_for_ci: true |
| 20 | + |
| 21 | +coverage: |
| 22 | + status: |
| 23 | + project: |
| 24 | + default: |
| 25 | + # Explicit floor (not `auto`) so the one-time baseline reset from the old |
| 26 | + # test-file-inflated ~90% down to the true product-only number does not read |
| 27 | + # as a regression. Verified product-only coverage is ~70.7% (real CI union run, |
| 28 | + # 2026-07-16); 65% leaves headroom while still guarding against real drops. |
| 29 | + target: 65% |
| 30 | + threshold: 1% |
| 31 | + patch: |
| 32 | + default: |
| 33 | + # Coverage required on new/changed product lines. Kept at the current baseline |
| 34 | + # (~70%) rather than an aspirational 80% so contributors are not blocked while |
| 35 | + # overall coverage sits at ~71%; raise as coverage improves. |
| 36 | + target: 70% |
| 37 | + threshold: 1% |
| 38 | + |
| 39 | +comment: |
| 40 | + layout: "header, diff, flags, components" |
| 41 | + require_changes: true |
| 42 | + |
| 43 | +# Paths excluded from coverage measurement/reporting. These are test code, test |
| 44 | +# fixtures/data scripts, and build/codegen helpers — not shippable product code. |
| 45 | +ignore: |
| 46 | + - "**/tests/**" |
| 47 | + - "**/test_*.py" |
| 48 | + - "**/conftest.py" |
| 49 | + - "sagemaker-*/test_script.py" |
| 50 | + - "**/workflow_helper/**" |
| 51 | + - "**/tools/*_codegen.py" |
| 52 | + - "**/setup.py" |
| 53 | + - "docs/**" |
| 54 | + - "v3-examples/**" |
0 commit comments