From 3c285cdf88005e434f7dddbf7250f27c2056151f Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Wed, 4 Mar 2026 14:32:28 +0000 Subject: [PATCH 1/2] chore: bump shared workflows to v14 and use uv run in prek --- .github/workflows/docs.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/tests.yml | 8 ++++---- .github/workflows/wheels.yml | 2 +- prek.toml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8c68874945..51b911ca57 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ env: jobs: Docs: - uses: tskit-dev/.github/.github/workflows/docs.yml@v12 + uses: tskit-dev/.github/.github/workflows/docs.yml@v14 with: pyproject-directory: python additional-apt-packages: doxygen diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4826bfc17b..82ff02f86a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,6 @@ on: jobs: Lint: - uses: tskit-dev/.github/.github/workflows/lint.yml@v12 + uses: tskit-dev/.github/.github/workflows/lint.yml@v14 with: pyproject-directory: python diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0846488b48..ae0398c7a9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,21 +13,21 @@ jobs: packaging: name: Python packaging - uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v12 + uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v14 with: pyproject-directory: python cli-test-cmd: tskit --help test-c: name: C tests - uses: tskit-dev/.github/.github/workflows/c-tests.yml@v12 + uses: tskit-dev/.github/.github/workflows/c-tests.yml@v14 with: library-directory: c secrets: inherit test-python-c: name: Python-C tests - uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@v12 + uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@v14 with: tests: python/tests/test_python_c.py python/tests/test_dict_encoding.py pyproject-directory: python @@ -36,7 +36,7 @@ jobs: test: name: Python - uses: tskit-dev/.github/.github/workflows/python-tests.yml@v12 + uses: tskit-dev/.github/.github/workflows/python-tests.yml@v14 with: os: ${{ matrix.os }} python-version: ${{ matrix.python }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c45863ef8a..d15b8e378e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -8,7 +8,7 @@ on: jobs: build-wheels: - uses: tskit-dev/.github/.github/workflows/build-wheels.yml@v12 + uses: tskit-dev/.github/.github/workflows/build-wheels.yml@v14 with: pyproject-directory: python diff --git a/prek.toml b/prek.toml index 7c5c2aeeaf..fe2e9df3b0 100644 --- a/prek.toml +++ b/prek.toml @@ -35,7 +35,7 @@ hooks = [ id = "ruff-check", name = "ruff check", language = "system", - entry = "ruff check --fix --force-exclude", + entry = "uv run --project=python --group=lint ruff check --fix --force-exclude", types = ["python"], }, ] @@ -47,7 +47,7 @@ hooks = [ id = "ruff-format", name = "ruff format", language = "system", - entry = "ruff format --force-exclude", + entry = "uv run --project=python --group=lint ruff format --force-exclude", types = ["python"], }, ] @@ -59,7 +59,7 @@ hooks = [ id = "clang-format", name = "clang-format", language = "system", - entry = "clang-format -i", + entry = "uv run --project=python --group=lint clang-format -i", types = ["c"], verbose = true, }, From 0ea62361e8053d4a6bcc23ba10c5308d27f070ec Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Wed, 4 Mar 2026 15:10:48 +0000 Subject: [PATCH 2/2] Update to use only-group --- prek.toml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/prek.toml b/prek.toml index fe2e9df3b0..94f1a73982 100644 --- a/prek.toml +++ b/prek.toml @@ -4,22 +4,11 @@ # rules implementing lint workflows. We do not use any remote # workflow repos. -# files = { glob = [ -# "tskit/**", -# "benchmark/**", -# "tests/**", -# "_tskitmodule.c", -# "*.toml", -# "docs/**", -# ]} - exclude = { glob = ["c/subprojects/**"]} [[repos]] repo = "builtin" hooks = [ - # { id = "trailing-whitespace" }, - # { id = "end-of-file-fixer" }, { id = "check-added-large-files" }, { id = "check-merge-conflict" }, { id = "mixed-line-ending" }, @@ -35,7 +24,7 @@ hooks = [ id = "ruff-check", name = "ruff check", language = "system", - entry = "uv run --project=python --group=lint ruff check --fix --force-exclude", + entry = "uv run --project=python --only-group=lint ruff check --fix --force-exclude", types = ["python"], }, ] @@ -47,7 +36,7 @@ hooks = [ id = "ruff-format", name = "ruff format", language = "system", - entry = "uv run --project=python --group=lint ruff format --force-exclude", + entry = "uv run --project=python --only-group=lint ruff format --force-exclude", types = ["python"], }, ] @@ -59,7 +48,7 @@ hooks = [ id = "clang-format", name = "clang-format", language = "system", - entry = "uv run --project=python --group=lint clang-format -i", + entry = "uv run --project=python --only-group=lint clang-format -i", types = ["c"], verbose = true, },