Skip to content

Use pre-commit-uv to speed up pre-commit hook environment installs - #396

Closed
tpvasconcelos wants to merge 1 commit into
mainfrom
219-pre-commit-uv
Closed

Use pre-commit-uv to speed up pre-commit hook environment installs#396
tpvasconcelos wants to merge 1 commit into
mainfrom
219-pre-commit-uv

Conversation

@tpvasconcelos

@tpvasconcelos tpvasconcelos commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Description

Another small step for the uv adoption tracked in #219 - this time on the pre-commit front.

Adds pre-commit-uv alongside pre-commit (in the pre-commit-* tox envs and in the local-dev dependency group), so that pre-commit builds its hook environments with uv instead of virtualenv+pip. No configuration changes are needed - the plugin activates automatically when installed next to pre-commit:

[INFO] Using pre-commit with uv 0.11.32 via pre-commit-uv 4.3.0

Locally validated: tox -e pre-commit-quick --recreate and tox -e pre-commit-all both pass, with all hook environments (cold install) built via uv in ~22s total.

Note on the remaining "pre-commit integration" checklist item in #219: the official uv pre-commit guide only covers the uv-pre-commit hooks (uv-lock, uv-export, pip-compile), all of which require a committed uv.lock or requirements files - neither of which this repo has (by design, after #388). So that item is blocked on the (separate) decision of whether to adopt a committed uv.lock. This PR covers what can be done on the pre-commit front today.

Related issues

Related to #219.

PR check list

  • Read the contributing guidelines.
  • Provided the relevant details in the PR's description.
  • Referenced relevant issues in the PR's description.
  • Added tests for all my changes. (N/A - dev tooling only)
  • Updated the docs for relevant changes. (N/A)
  • Changes are documented in docs/reference/changelog.md.
  • The CI check are all passing, or I'm working on fixing them!
  • I have reviewed my own code! 🤠

📚 Documentation preview 📚: https://ridgeplot--396.org.readthedocs.build/en/396/

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4b7cf77) to head (1d82f1d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #396   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          674       674           
  Branches        88        88           
=========================================
  Hits           674       674           
Flag Coverage Δ
combined-src 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant