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

Enable code coverage via codecov.io #76

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

cgohlke
Copy link
Member

@cgohlke cgohlke commented Jun 27, 2024

Description

This PR enables code coverage reports via Codecov for all pull requests and pushes to the main branch.

Code coverage reports were previously generated automatically during pytest runs, but I don't think they got much attention.

Release note

Summarize the changes in the code block below to be included in the
release notes:

Enable code coverage via codecov.io

Checklist

  • The pull request title, summary, and description are concise.
  • Related issues are linked in the description.
  • New dependencies are explained.
  • The source code and documentation can be distributed under the MIT license.
  • The source code adheres to code standards.
  • New classes, functions, and features are thoroughly tested.
  • New, user-facing classes, functions, and features are documented.
  • New features are covered in tutorials.
  • No files other than source code, documentation, and project settings are added to the repository.

Copy link

codecov bot commented Jun 27, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Contributor

@bruno-pannunzio bruno-pannunzio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excelent idea @cgohlke. I thought about something like this a while back I don't know if I mentioned it or not. It's a good idea to have a report on coverage since what I've been doing is see the reports from pytest but this is much better.

If I saw correctly, you set the coverage to be at least 99% right? I know you modified the contributing documentation but maybe add explicitly the percentage coverage we aim to be clearer, anyway that will be also in the report so not much trouble with that.

@cgohlke
Copy link
Member Author

cgohlke commented Jun 27, 2024

set the coverage to be at least 99% right?

If I understood that 0.1% setting correctly, no new coverage report will be shown if the coverage changes are less than 0.1%. I did not set any code coverage threshold below which CI fails. There are cases which are/can not be tested, such as type annotation lines or large files, or exceptions for corrupted files. The coverage report is purely informational at the moment.

@bruno-pannunzio
Copy link
Contributor

You are right! I totally misunderstood the threshold parameter. Maybe we can discuss in the next meeting if it is needed or a good idea to add a minimun coverage to pass the tests, I think it is a good check, just in case we or other contributor overlook some case that is not tested.

@cgohlke cgohlke merged commit edd2fa1 into phasorpy:main Jun 27, 2024
16 checks passed
@cgohlke cgohlke deleted the codecov branch June 27, 2024 22:05
schutyb pushed a commit to schutyb/phasorpy that referenced this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants