Skip to content

DOC: update developer instructions for prek and autofix.ci - #315

Draft
redeboer wants to merge 3 commits into
dependabot/lock-e1a8396f4bfrom
prek-and-autofix-ci
Draft

redeboer wants to merge 3 commits into
dependabot/lock-e1a8396f4bfrom
prek-and-autofix-ci

Conversation

@redeboer

@redeboer redeboer commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Closes #313

Tip

See preview here.

⚠️ Preview pins

This branch runs against the tips of the two upstream migration PRs, so that their implementation can be tested end-to-end. Both pins have to be replaced with a release before this PR is merged:

📝 Documentation

docs/develop.md is updated for the new developer setup:

  • The quick-start block installs prek with uv tool install prek and prek install --prepare-hooks. pre-commit-uv is gone, since prek uses uv natively.
  • The "Pre-commit" section is now "Prek". An explicit (pre-commit)= target keeps the old https://compwa.github.io/develop#pre-commit anchor alive, and all in-page {ref} cross-references are updated to develop:Prek. The section documents prek run --all-files, states that .pre-commit-config.yaml and the hook definitions are unchanged, and adds two admonitions: one on replacing the pre-commit Git hook shims under .git/hooks (either prek install --prepare-hooks again, or policy migrate, following the behaviour implemented in ENH: switch to prek policy#695), and one on prek's workspace mode and the .prekignore file that a repository with a nested .pre-commit-config.yaml test fixture needs.
  • The "Checks" section shows that poe style, pixi run style, and prek run --all-files are equivalent, and describes the upgrade task with its _upgrade-prek helper (prek autoupdate -j8). "Pinning dependency versions" mentions that lock.yml bumps hook revisions with uvx prek autoupdate.
  • A new "autofix.ci" subsection under "GitHub Actions" replaces the pre-commit.ci guidance: how fixes reach a pull request, that fork pull requests are covered where the old push job could not, that the workflow file name is load-bearing, that no patch is applied when the last four commits were authored by a bot, and that style.yml skips its own push job when it detects the workflow.

🖱️ Developer experience

  • [tool.poe.tasks.style] runs prek run --all-files, and _upgrade-precommit becomes _upgrade-prek with prek autoupdate -j8. The rename and the CONTRIBUTING.md update are what check-dev-files writes with the new policy; the style task body is not generated by policy and is edited by hand.
  • README.md swaps the pre-commit.ci badge for a prek badge.
  • prek and prekignore are added to .cspell.json.

⚙️ CI

  • New .github/workflows/autofix.ci.yml, taken from the template in ENH: run style checks with prek actions#178. It runs prek run --all-files, updates the Jupyter kernel names with upload-artifact: false, and hands the patch to autofix.ci.
  • The ci: block is removed from .pre-commit-config.yaml, which retires pre-commit.ci for this repository. get-skipped-pre-commit-hooks then reports ALL, so the style job runs the full poe style instead of only the hooks that pre-commit.ci skipped.

🚧 Action needed outside this repository

  • The pre-commit.ci GitHub App has to be uninstalled for this repository. Removing the ci: block does not stop the app: it still runs on every pull request, and it now runs the hooks that the skip: list used to hold back. Those hooks need network access that pre-commit.ci does not grant, so its check on this PR fails on check-jsonschema and tombi. Disabling the app in the repository settings resolves it; the equivalent checks already run in style.yml.
  • The autofix.ci GitHub App has to be installed for the workflow to commit anything.

Validation

  • prek run --all-files passes.
  • poe doc builds without warnings, and the built develop.html contains the pre-commit, prek, and autofix-ci anchors.
  • poe linkcheck passes.
  • A workflow_dispatch run of ci.yml on this branch (run 34461762380) passes with the prek-based style.yml. Both Update Jupyter kernels and Push changes are skipped, which is the has-autofix-ci detection from ENH: run style checks with prek actions#178 working as intended.
  • ci.yml and autofix.ci.yml only trigger on pull requests against main, epic/*, or a x.y.x branch, so neither runs on this pull request while it is stacked on MAINT: upgrade lock files #314. The dispatch above is the substitute for the style.yml half; autofix.ci can only be exercised once the base is main and the app is installed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JhTXb2pf4HiV92gpxG6wmi

@redeboer redeboer added 📝 Docs Improvements or additions to documentation 🖱️ DX Improvements to the Developer Experience labels Sep 10, 2026
@redeboer
redeboer added this pull request to stack #316 September 10, 2026 09:46
@redeboer redeboer self-assigned this Sep 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 Docs Improvements or additions to documentation 🖱️ DX Improvements to the Developer Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update developer instructions for prek and autofix.ci

1 participant