Skip to content

Always use --build-backend hatch for uv init subprocesses from `u…#901

Merged
nathanjmcdougall merged 2 commits intomainfrom
900-use-the-hatch-backend-for-usethis-init
Jul 23, 2025
Merged

Always use --build-backend hatch for uv init subprocesses from `u…#901
nathanjmcdougall merged 2 commits intomainfrom
900-use-the-hatch-backend-for-usethis-init

Conversation

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

…sethis init`

@nathanjmcdougall nathanjmcdougall linked an issue Jul 23, 2025 that may be closed by this pull request
@nathanjmcdougall nathanjmcdougall requested a review from Copilot July 23, 2025 05:56
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 modifies the opinionated_uv_init function to explicitly specify the build backend as "hatch" when initializing projects with uv init. The change ensures consistent use of the hatchling build system across all project initializations.

Key changes:

  • Added --build-backend hatch arguments to the uv init subprocess call
  • Added a test to verify that the build backend is correctly set to "hatchling.build"

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/usethis/_integrations/uv/init.py Modified opinionated_uv_init to include --build-backend hatch arguments
tests/usethis/_integrations/uv/test_init.py Added test case to verify build backend configuration
Comments suppressed due to low confidence (1)

tests/usethis/_integrations/uv/test_init.py:50

  • [nitpick] The test method name should be more descriptive. Consider renaming to test_opinionated_uv_init_sets_build_backend_to_hatch to better describe what specific behavior is being tested.
    def test_build_backend_is_hatch(self, tmp_path: Path):

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 23, 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 Jul 23, 2025

CodSpeed Instrumentation Performance Report

Merging #901 will not alter performance

Comparing 900-use-the-hatch-backend-for-usethis-init (0cd67e0) with main (39206d3)

Summary

✅ 2 untouched benchmarks

@nathanjmcdougall nathanjmcdougall merged commit 4a05d76 into main Jul 23, 2025
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the 900-use-the-hatch-backend-for-usethis-init branch July 23, 2025 06:17
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 the hatch backend for usethis init

2 participants