Skip to content

Commit 30bf96a

Browse files
committed
Replace *pre-commit* with *prek*.
1 parent 7ce5243 commit 30bf96a

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

.github/workflows/continuous-integration-quality-unit-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ jobs:
2020
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
2121
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
2222
shell: bash
23-
- name: Set up Python 3.10 for Pre-Commit
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: "3.10"
2723
- name: Set up Python ${{ matrix.python-version }}
2824
uses: actions/setup-python@v5
2925
with:
@@ -37,9 +33,10 @@ jobs:
3733
uv sync --all-extras
3834
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
3935
shell: bash
40-
- name: Pre-Commit (All Files)
36+
- name: Prek (All Files)
37+
if: matrix.os == 'macOS-latest'
4138
run: |
42-
uv run pre-commit run --all-files
39+
uv run prek run --all-files
4340
shell: bash
4441
- name: Test Optimised Python Execution
4542
run: |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dev = [
8585
"hatch",
8686
"invoke",
8787
"jupyter",
88-
"pre-commit",
88+
"prek",
8989
"pyright",
9090
"pytest",
9191
"pytest-cov<7.0.0",

tasks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"clean",
4444
"formatting",
4545
"quality",
46-
"precommit",
46+
"prek",
4747
"tests",
4848
"examples",
4949
"preflight",
@@ -183,18 +183,18 @@ def quality(
183183

184184

185185
@task
186-
def precommit(ctx: Context) -> None:
186+
def prek(ctx: Context) -> None:
187187
"""
188-
Run the "pre-commit" hooks on the codebase.
188+
Run the "prek" hooks on the codebase.
189189
190190
Parameters
191191
----------
192192
ctx
193193
Context.
194194
"""
195195

196-
message_box('Running "pre-commit" hooks on the codebase...')
197-
ctx.run("pre-commit run --all-files")
196+
message_box('Running "prek" hooks on the codebase...')
197+
ctx.run("prek run --all-files")
198198

199199

200200
@task
@@ -238,7 +238,7 @@ def examples(ctx: Context) -> None:
238238
ctx.run(f"python {os.path.join(root, filename)}")
239239

240240

241-
@task(formatting, quality, precommit, tests, examples)
241+
@task(formatting, quality, prek, tests, examples)
242242
def preflight(ctx: Context) -> None: # noqa: ARG001
243243
"""
244244
Perform the preflight tasks.

0 commit comments

Comments
 (0)