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

Use --skip-empty for coverage report #24

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

marcelofern
Copy link
Contributor

This is a better alternative to not running coverage against init.py files entirely. This could've been a problem if those files had code in it.

This is a better alternative to not running coverage against __init__.py
files entirely. This could've been a problem if those files had code in
it.
@marcelofern marcelofern requested a review from a team September 17, 2024 06:43
@marcelofern marcelofern marked this pull request as ready for review September 17, 2024 06:43
Copy link

Coverage Report Results

Name Stmts Miss Branch BrPart Cover
src/django_pg_migration_tools/management/commands/migrate_with_timeouts.py 25 0 10 0 100%
src/django_pg_migration_tools/operations.py 67 0 6 0 100%
src/django_pg_migration_tools/timeouts.py 73 5 36 2 92%
TOTAL 165 5 52 2 96%

3 empty files skipped.

Copy link

@DHUKK DHUKK left a comment

Choose a reason for hiding this comment

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

🚀

Copy link

@meshy meshy left a comment

Choose a reason for hiding this comment

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

Have you considered --skip-covered instead, so that this shows only files which need work?

@marcelofern marcelofern merged commit da43d1a into main Sep 18, 2024
10 checks passed
@marcelofern marcelofern deleted the use-skip-empty-for-coverage branch September 18, 2024 23:46
@marcelofern
Copy link
Contributor Author

marcelofern commented Sep 19, 2024

Have you considered --skip-covered instead, so that this shows only files which need work?

Thanks for the suggestion, I will have a look with more detail.
The output looks like this:

coverage report --skip-covered --skip-empty --format= --data-file=build/coverage

Name                                        Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------------------
src/django_pg_migration_tools/timeouts.py      73      5     36      2    92%
-----------------------------------------------------------------------------
TOTAL                                         165      5     52      2    96%

5 files skipped due to complete coverage.

EDIT: This looks a good addition for when we get to 100% coverage. So the bot can be conditional to only posting on PRs that decrease coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants