Skip to content

Use URI repo for uv-pre-commit hook in requirements.txt tool#1589

Merged
nathanjmcdougall merged 5 commits intomainfrom
copilot/update-usethis-tool-requirements
Mar 27, 2026
Merged

Use URI repo for uv-pre-commit hook in requirements.txt tool#1589
nathanjmcdougall merged 5 commits intomainfrom
copilot/update-usethis-tool-requirements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

  • Change RequirementsTxtToolSpec.pre_commit_config() to use UriRepo with https://github.com/astral-sh/uv-pre-commit and FALLBACK_UV_VERSION rev instead of LocalRepo
  • Add config_spec() to RequirementsTxtToolSpec for [tool.sync-with-uv.repo-to-package] mapping in pyproject.toml
  • Update use_requirements_txt() in _core/tool.py to add uv dep to uv group (non-default) and add configs
  • Add default parameter to add_deps_to_group() in _deps.py to allow non-default dependency groups
  • Suppress output for uv dependency group add/remove (internal implementation detail)
  • Restore exhaustive backend checking with assert_never in _register_default_group
  • Update existing tests to match new behavior
  • Run static checks (ruff, basedpyright) - all pass
  • Run code review and address feedback
  • Run CodeQL security check - no alerts

Skills used: usethis-qa-static-checks


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI and others added 2 commits March 27, 2026 10:07
…hook

Changes:
- Use UriRepo with https://github.com/astral-sh/uv-pre-commit instead of LocalRepo
- Add sync-with-uv repo-to-package config to pyproject.toml
- Add 'uv' dependency to 'uv' group (non-default) for sync-with-uv
- Add 'default' parameter to add_deps_to_group for non-default groups
- Update test expectations for new pre-commit config format

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/134ba007-5ede-4f61-8803-e7fa3a6976b2

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Update usethis tool requirements with URI repo for uv and pre-commit Use URI repo for uv-pre-commit hook in requirements.txt tool Mar 27, 2026
Copilot AI requested a review from nathanjmcdougall March 27, 2026 10:13
…ration

Extract _register_default_group helper to keep assert_never pattern
while staying within the branch limit.

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/98eadb13-f716-4990-b807-154bf9064bc7

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
…rements.txt tool

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/58e11ac0-09a6-4cf2-ad63-422a4f3a5354

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 27, 2026 10:36
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

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 Mar 27, 2026

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing copilot/update-usethis-tool-requirements (776a09e) with main (c48db09)

Open in CodSpeed

@nathanjmcdougall nathanjmcdougall merged commit 9c933bd into main Mar 27, 2026
20 checks passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/update-usethis-tool-requirements branch March 27, 2026 11:38
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.

usethis tool requirements.txt with uv and pre-commit should use URI repo

2 participants