Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-42534: Upload coverage report to Codecov #3

Merged
merged 4 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -53,4 +53,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:",
]

Loading