Skip to content

Commit

Permalink
Merge pull request #3 from lsst-dm/tickets/DM-42534
Browse files Browse the repository at this point in the history
DM-42534: Upload coverage report to Codecov
  • Loading branch information
arunkannawadi committed Sep 3, 2024
2 parents 6275c0f + 68a5deb commit 2df35ac
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Any changes to this file should be validated before pushing.
# curl --data-binary @.github/.codecov.yml https://codecov.io/validate
codecov:
require_ci_to_pass: false

coverage:
precision: 2
round: down
range: 65...85
# Coverage below 65% is flagged red, and above 85% is green.

status:
project:
default:
# Each PR must increase the coverage, but allow a slippage of 10%.
target: auto
threshold: 10%

comment: false # Turn on/off Codecov commenting on the PRs.
7 changes: 6 additions & 1 deletion .github/workflows/lsst-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ jobs:
shell: bash -l {0}
run: |
# we run metadetect/tests and metadetect/lsst/tests
pytest -v -n 4 --cov=metadetect --cov-report term-missing metadetect
pytest -v -n 4 --cov=metadetect --cov-report=xml --cov-report=term-missing --cov-branch metadetect
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![tests](https://github.com/lsst-dm/metadetect/actions/workflows/tests.yml/badge.svg?branch=lsst-dev)](https://github.com/lsst-dm/metadetect/actions/workflows/tests.yml)
[![shear-tests](https://github.com/lsst-dm/metadetect/actions/workflows/shear_test.yml/badge.svg?branch=lsst-dev)](https://github.com/lsst-dm/metadetect/actions/workflows/shear_test.yml)
[![lsst-tests](https://github.com/lsst-dm/metadetect/actions/workflows/lsst-tests.yml/badge.svg?branch=lsst-dev)](https://github.com/lsst-dm/metadetect/actions/workflows/lsst-tests.yml)
[![codecov](https://codecov.io/gh/lsst-dm/metadetect/graph/badge.svg?token=3ZVPF4L11E)](https://codecov.io/gh/lsst-dm/metadetect)

Library for meta-detection, combining detection and metacalibration.
The algorithm is explained in detail in [Sheldon et al., (2020)](https://ui.adsabs.harvard.edu/abs/2020ApJ...902..138S/abstract) and its applicability with LSST data structures is demonstrated using simulations in [Sheldon et al., (2023)](https://ui.adsabs.harvard.edu/abs/2023OJAp....6E..17S/abstract).
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

0 comments on commit 2df35ac

Please sign in to comment.