Skip to content

Rename coverage to Coverage.py #631

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

Merged
merged 7 commits into from
May 19, 2025

Conversation

nathanjmcdougall
Copy link
Owner

We're not changing the CLI interface from usethis tool coverage but everything else needs to change.

We're not changing the CLI interface from `usethis tool coverage` but everything else needs to change.
@nathanjmcdougall nathanjmcdougall linked an issue May 19, 2025 that may be closed by this pull request
Copy link

codspeed-hq bot commented May 19, 2025

CodSpeed Performance Report

Merging #631 will not alter performance

Comparing 619-give-the-correct-name-for-coveragepy (a744de6) with main (49ab363)

Summary

✅ 1 untouched benchmarks

Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.55%. Comparing base (0f7e421) to head (a744de6).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/usethis/_tool/impl/coverage_py.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #631   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         102      102           
  Lines        4453     4454    +1     
=======================================
+ Hits         4344     4345    +1     
  Misses        109      109           

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

@nathanjmcdougall nathanjmcdougall requested a review from Copilot May 19, 2025 02:44
Copy link
Contributor

@Copilot 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 renames the internal CoverageTool class and associated calls to CoveragePyTool and updates help messages and test expectations to reference "Coverage.py" while keeping the CLI command as coverage.

  • Renamed CoverageToolCoveragePyTool (class, imports, and function calls)
  • Updated name property and help outputs to use "Coverage.py"
  • Adjusted tests to reference the new class and display name

Reviewed Changes

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

Show a summary per file
File Description
tests/usethis/_tool/impl/test_coverage.py Updated import and calls to use CoveragePyTool
tests/usethis/_interface/test_tool.py Changed help text and command‐matching logic for Coverage.py
tests/usethis/_core/test_list.py Updated expected tool name to "Coverage.py"
tests/usethis/_core/test_core_tool.py Switched use_coverageuse_coverage_py and updated output
src/usethis/_tool/impl/pytest.py Replaced CoverageTool references with CoveragePyTool
src/usethis/_tool/impl/pyproject_toml.py Swapped import of CoverageTool for CoveragePyTool
src/usethis/_tool/impl/coverage.py Renamed class and updated print_how_to_use messages
src/usethis/tool/all.py Replaced CoverageTool with CoveragePyTool in tool list
src/usethis/_interface/tool.py Renamed internal function use and help text to Coverage.py
src/usethis/_core/tool.py Changed use_coverageuse_coverage_py and imports
Comments suppressed due to low confidence (2)

tests/usethis/_tool/impl/test_coverage.py:9

  • [nitpick] Rename the test class to TestCoveragePyTool to match the renamed CoveragePyTool class for consistency.
class TestCoverageTool:

tests/usethis/_tool/impl/test_coverage.py:1

  • [nitpick] Consider renaming this test file to test_coverage_py.py to align with the class under test.
tests/usethis/_tool/impl/test_coverage.py

@nathanjmcdougall nathanjmcdougall merged commit f3c9bcb into main May 19, 2025
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the 619-give-the-correct-name-for-coveragepy branch May 19, 2025 03:42
nathanjmcdougall added a commit that referenced this pull request May 19, 2025
nathanjmcdougall added a commit that referenced this pull request May 19, 2025
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.

Give the correct name for coverage.py
1 participant