Skip to content

Use relative paths in Coverage.py configuration#1235

Merged
nathanjmcdougall merged 1 commit intomainfrom
930-use-relative-paths-with-coveragepy
Dec 28, 2025
Merged

Use relative paths in Coverage.py configuration#1235
nathanjmcdougall merged 1 commit intomainfrom
930-use-relative-paths-with-coveragepy

Conversation

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

No description provided.

@nathanjmcdougall nathanjmcdougall linked an issue Dec 28, 2025 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 28, 2025

CodSpeed Performance Report

Merging #1235 will not alter performance

Comparing 930-use-relative-paths-with-coveragepy (4fc9758) with main (de72743)

Summary

✅ 2 untouched

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the relative_files = true configuration option to Coverage.py settings across all supported configuration file formats. This change ensures that coverage reports generated in CI environments have consistent relative paths between jobs, addressing issue #930.

Key Changes

  • Added relative_files = true configuration to Coverage.py tool implementation
  • Updated test expectations to verify the new configuration is applied
  • Applied the configuration to the project's own pyproject.toml

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/usethis/_tool/impl/coverage_py.py Adds new ConfigItem for relative_files setting across all Coverage.py config file formats
tests/usethis/_tool/impl/test_coverage_py.py Adds test to verify relative_files is set to true in pyproject.toml
tests/usethis/_core/test_core_tool.py Updates expected output in integration tests to include relative_files setting
pyproject.toml Applies the relative_files configuration to the project itself

@nathanjmcdougall nathanjmcdougall merged commit 631540c into main Dec 28, 2025
19 checks passed
@nathanjmcdougall nathanjmcdougall deleted the 930-use-relative-paths-with-coveragepy branch December 28, 2025 21:45
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.

Use relative paths with Coverage.py

2 participants