From 85b66e53b0c19a6aaf5f0b211245390dada27e3b Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 4 Mar 2026 01:55:15 +0100 Subject: [PATCH] =?UTF-8?q?pre-commit=20=E2=86=92=20prek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run_precommit.yml | 7 +++---- .github/workflows/update_precommit_hooks.yml | 6 +++--- README.md | 2 +- pyproject.toml | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run_precommit.yml b/.github/workflows/run_precommit.yml index 41ad5a69..1943167c 100644 --- a/.github/workflows/run_precommit.yml +++ b/.github/workflows/run_precommit.yml @@ -1,5 +1,5 @@ --- -name: pre-commit +name: prek on: pull_request: @@ -7,9 +7,8 @@ on: branches: [master] jobs: - pre-commit: + prek: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v6 - uses: actions/checkout@v6 - - uses: pre-commit/action@v3.0.1 + - uses: j178/prek-action@v1 diff --git a/.github/workflows/update_precommit_hooks.yml b/.github/workflows/update_precommit_hooks.yml index ce0a0b16..0e400d4b 100644 --- a/.github/workflows/update_precommit_hooks.yml +++ b/.github/workflows/update_precommit_hooks.yml @@ -38,10 +38,10 @@ jobs: with: python-version: '3.12' allow-prereleases: false - - name: Install pre-commit - run: pip install pre-commit + - name: Install prek + run: pip install prek - name: Update pre-commit hooks - run: pre-commit autoupdate + run: prek auto-update - name: Create Pull Request uses: peter-evans/create-pull-request@v8 with: diff --git a/README.md b/README.md index f8a6d250..d3d2594d 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,4 @@ cd neurodocker python -m pip install --no-cache-dir --editable .[all] ``` -Before committing changes, initialize `pre-commit` with `pre-commit install`. This will format code with each commit to keep the style consistent. _Neurodocker_ uses `ruff` for formatting. +Before committing changes, initialize `prek` with `prek install`, or `pre-commit` with `pre-commit install`. This will format code with each commit to keep the style consistent. _Neurodocker_ uses `ruff` for formatting. diff --git a/pyproject.toml b/pyproject.toml index 6ebb6f96..bbb0d00f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dev = [ "codecov", "coverage[toml]", "mypy", - "pre-commit", + "prek", "pytest >= 6.0", "pytest-cov >= 2.0.0", "pytest-reportlog >= 0.1.2",