🔧 config: migrate from pre-commit to prek#526
Merged
Conversation
Replace pre-commit references with prek in docs, CONTRIBUTING, copilot instructions, and the gitmoji skill. Remove the ci: block from .pre-commit-config.yaml and suppress the resulting PC901/902/903 repo-review warnings. Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Contributor
Author
|
Passes CI format. |
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the repository’s developer tooling references from pre-commit to prek, aligning dependency groups, nox automation, and contributor-facing documentation with the new hook runner while keeping the existing .pre-commit-config.yaml hook configuration.
Changes:
- Replace
pre-commitwithprekin dependency groups (pyproject.toml) and lockfile (uv.lock). - Update automation/docs to run hooks via
prek(nox session, README/docs/CONTRIBUTING, Copilot instructions, gitmoji skill). - Remove the
ci:block from.pre-commit-config.yamland add repo-review ignores for the resulting checks.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Swaps the dev/lint dependency from pre-commit to prek and updates the resolved package set accordingly. |
README.md |
Updates badges/links from pre-commit to prek. |
pyproject.toml |
Replaces the lint dependency and updates tool.repo-review ignores for pre-commit CI-related checks. |
noxfile.py |
Runs hook checks via prek in the precommit nox session. |
docs/dev.md |
Updates contributor workflow docs to reference prek instead of pre-commit. |
.pre-commit-config.yaml |
Removes the ci: configuration block. |
.github/skills/gitmoji-commit/SKILL.md |
Updates the config type description to reference prek. |
.github/copilot-instructions.md |
Updates tooling guidance to reference prek. |
.github/CONTRIBUTING.md |
Updates setup and usage instructions from pre-commit to prek. |
Comments suppressed due to low confidence (1)
docs/dev.md:88
- “runs all prek/pre-commit hooks” is ambiguous. The
precommitnox session runsprekagainst.pre-commit-config.yaml; consider rewording to clearly state what command is run (and which config file it uses) so contributors know what to expect.
- `uv run nox -s precommit`: runs all prek/pre-commit hooks.
- `uv run nox -s "pylint(package='coordinax')"`: run Pylint for the main package.
Comment on lines
+161
to
+163
| "PC901", # custom autoupdate_commit_msg set in .pre-commit-config.yaml | ||
| "PC902", # custom autofix_commit_msg set in .pre-commit-config.yaml | ||
| "PC903", # autoupdate_schedule set in .pre-commit-config.yaml |
|
|
||
| - `uv run nox -s all`: runs the default contributor gate: lint, test, and docs. | ||
| - `uv run nox -s lint`: runs `precommit`, `pylint`, and `ty`. | ||
| - `uv run nox -s lint`: runs `prek`, `pylint`, and `ty`. |
| ``` | ||
| - Common sessions: | ||
| - `nox -s lint`: pre-commit + pylint | ||
| - `nox -s lint`: prek + pylint |
| @@ -77,10 +77,10 @@ nox -s docs -- --serve | |||
|
|
|||
| # Pre-commit | |||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #526 +/- ##
=======================================
Coverage 92.91% 92.91%
=======================================
Files 249 249
Lines 7881 7881
=======================================
Hits 7323 7323
Misses 558 558 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace pre-commit references with prek in docs, CONTRIBUTING, copilot instructions, and the gitmoji skill. Remove the ci: block from .pre-commit-config.yaml and suppress the resulting PC901/902/903 repo-review warnings.