Skip to content

Commit 86c658a

Browse files
authored
Merge pull request #4 from colour-science/feature/prek
PR: Replace *pre-commit* with *prek*.
2 parents 99a43be + 291408c commit 86c658a

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
@@ -23,10 +23,6 @@ jobs:
2323
# https://github.com/scipy/scipy/issues/20613
2424
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
2525
shell: bash
26-
- name: Set up Python 3.10 for Pre-Commit
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: "3.10"
3026
- name: Set up Python ${{ matrix.python-version }}
3127
uses: actions/setup-python@v5
3228
with:
@@ -39,9 +35,10 @@ jobs:
3935
run: |
4036
uv sync --all-extras
4137
shell: bash
42-
- name: Pre-Commit (All Files)
38+
- name: Prek (All Files)
39+
if: matrix.os == 'macOS-latest'
4340
run: |
44-
uv run pre-commit run --all-files
41+
uv run prek run --all-files
4542
shell: bash
4643
- name: Test Optimised Python Execution
4744
run: |

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ dev = [
6868
"hatch",
6969
"invoke",
7070
"jupyter",
71-
"pre-commit",
71+
"prek",
7272
"pyright",
7373
"pytest",
7474
"pytest-cov<7.0.0",

tasks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"clean",
4949
"formatting",
5050
"quality",
51-
"precommit",
51+
"prek",
5252
"tests",
5353
"examples",
5454
"preflight",
@@ -270,18 +270,18 @@ def quality(
270270

271271

272272
@task
273-
def precommit(ctx: Context) -> None:
273+
def prek(ctx: Context) -> None:
274274
"""
275-
Run the "pre-commit" hooks on the codebase.
275+
Run the "prek" hooks on the codebase.
276276
277277
Parameters
278278
----------
279279
ctx
280280
Context.
281281
"""
282282

283-
message_box('Running "pre-commit" hooks on the codebase...')
284-
ctx.run("pre-commit run --all-files")
283+
message_box('Running "prek" hooks on the codebase...')
284+
ctx.run("prek run --all-files")
285285

286286

287287
@task
@@ -329,7 +329,7 @@ def examples(ctx: Context) -> None:
329329
ctx.run(f"python {os.path.join(root, filename)}")
330330

331331

332-
@task(formatting, quality, precommit, tests, examples)
332+
@task(formatting, quality, prek, tests, examples)
333333
def preflight(ctx: Context) -> None: # noqa: ARG001
334334
"""
335335
Perform the preflight tasks.

0 commit comments

Comments
 (0)