8000 Update pyproject.toml to fix coverage paths by psobolewskiPhD · Pull Request #7992 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update pyproject.toml to fix coverage paths #7992

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

psobolewskiPhD
Copy link
Member
@psobolewskiPhD psobolewskiPhD commented Jun 3, 2025 8000

References and relevant issues

Closes: #7961 (comment)

Description

So I think the issue is that now with src layout tests are actually using the installed package in site-packages and coverage gets the full path used to import. Before it was just the repo path.
Here I try to use relative_files so that the simple relative paths can be used, deleting the spurious full paths.
Docs: https://coverage.readthedocs.io/en/latest/config.html#run-relative-files
So in this PR I add full paths for macos/linux.

@psobolewskiPhD psobolewskiPhD requested a review from a team as a code owner June 3, 2025 03:31
@psobolewskiPhD psobolewskiPhD added the maintenance PR with maintance changes, label Jun 3, 2025
@psobolewskiPhD
Copy link
Member Author

Fingers crossed this passes in PR CI. If ti does then I think it will solve comprehensive fails too.

8000
Copy link
codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.71%. Comparing base (e845801) to head (6be25e4).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7992       +/-   ##
===========================================
- Coverage   92.91%   46.71%   -46.20%     
===========================================
  Files         647      645        -2     
  Lines       60875    60854       -21     
===========================================
- Hits        56560    28429    -28131     
- Misses       4315    32425    +28110     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Czaki
Copy link
Collaborator
Czaki commented Jun 3, 2025

We lost 28167 lines from coverage

@psobolewskiPhD psobolewskiPhD changed the title Update pyproject.toml to fix coverage paths to be relative Update pyproject.toml to fix coverage paths Jun 4, 2025
@TimMonko
Copy link
Contributor
TimMonko commented Jun 5, 2025

Wonder if it would be easier to almost just start over with a base codecov config designed for src and see what happens

@Czaki
Copy link
Collaborator
Czaki commented Jun 9, 2025

Wonder if it would be easier to almost just start over with a base codecov config designed for src and see what happens

The whole problem is that we have tests in the source tree.
The suggested design it is to have it in test directory next to src

@Czaki
Copy link
Collaborator
Czaki commented Jun 10, 2025

What did you think about merging #8001 and working here on codecov reports?

Czaki added a commit that referenced this pull request Jun 10, 2025
# References and relevant issues

alternative to first part of #7992
closes #7961

# Description

Modify path to use `**` in pattern matching to accept possible
localization of tox virtualenv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix coverage for new src layout
3 participants
0