Skip to content

Commit

Permalink
Merge pull request #66 from aphp/codecov
Browse files Browse the repository at this point in the history
Codecov
  • Loading branch information
svittoz committed May 28, 2024
2 parents af4fb1e + d9608c6 commit faa5a74
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 20 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,25 @@ jobs:
- name: Run tests
shell: bash {0}
run: ./build_tools/github/test.sh
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: coverage-data-${{ matrix.python-version }}
path: .coverage.*
if-no-files-found: ignore
if: success()
- name: Check dependencies licenses
run: |
liccheck
Coverage:
needs: Testing
uses: aphp/foldedtensor/.github/workflows/coverage.yml@main
with:
base-branch: main
coverage-data-pattern: coverage-data-*
coverage-report: coverage.txt
coverage-badge: coverage.svg
coverage-branch: coverage

Documentation:
needs: check_skip
Expand Down
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,15 @@
#

<p align="center">
<a href="https://aphp.github.io/eds-scikit/" target="_blank">
<img src="https://img.shields.io/badge/docs-passed-brightgreen" alt="Documentation">
</a>
<a href="https://github.com/aphp/eds-scikit/commits/main" target="_blank">
<img src="https://github.com/aphp/eds-scikit/actions/workflows/testing.yml/badge.svg" alt="Pipeline Status">
</a>
<a href="https://codecov.io/github/aphp/eds-scikit?branch=main">
<img src="https://codecov.io/github/aphp/eds-scikit/coverage.svg?branch=main" alt="Coverage" >
</a>
<a href="https://github.com/psf/black" target="_blank">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Black">
</a>

<a href="https://www.python.org/" target="_blank">
<img src="https://img.shields.io/badge/python-%3E%3D%203.7.1%20%7C%20%3C%203.8-brightgreen" alt="Supported Python versions">
</a>
<a href="https://zenodo.org/badge/latestdoi/571584236"><img src="https://zenodo.org/badge/571584236.svg" alt="DOI"></a>

![Tests](https://img.shields.io/github/actions/workflow/status/aphp/eds-scikit/testing.yml?branch=main&label=tests&style=flat-square)
[![Documentation](https://img.shields.io/github/actions/workflow/status/aphp/eds-scikit/publish_doc.yml?branch=main&label=docs&style=flat-square)](https://aphp.github.io/eds-scikit/latest/)
[![PyPI](https://img.shields.io/pypi/v/eds-scikit?color=blue&style=flat-square)](https://pypi.org/project/eds-scikit/)
[![Supported Python](https://img.shields.io/badge/python-%3E%3D%203.7.1%20%7C%20%3C%203.8-brightgreen?style=flat-square)](https://www.python.org/)
[![Black](https://img.shields.io/badge/code%20style-black-black?style=flat-square)]([https://www.python.org/](https://github.com/psf/black))
[![Coverage](https://codecov.io/github/aphp/eds-scikit/coverage.svg)](https://raw.githubusercontent.com/aphp/eds-scikit/coverage/coverage.txt)
[![DOI](https://zenodo.org/badge/571584236.svg)](https://zenodo.org/badge/latestdoi/571584236&style=flat-square)

</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion build_tools/github/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x

pip install -U "pip<23"
python -m pytest --pyargs tests -m "" --cov=eds_scikit
coverage run -m pytest
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,27 @@ unauthorized_licenses = [
dependencies = true
optional_dependencies = ["dev", "doc"]
as_regex = true

[tool.coverage.report]
include = ["eds_scikit/*"]
omit = [
"tests/*",
]
exclude_lines = [
"def __repr__",
"if __name__ == .__main__.:",
"@overload",
"pragma: no cover",
"raise .*Error",
"raise .*Exception",
"warn\\(",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]

[tool.coverage.run]
include = ["eds_scikit/*"]
concurrency = ["multiprocessing"]
parallel = true

0 comments on commit faa5a74

Please sign in to comment.