From 7c48b4b3002c877db6d15f8c0ebb300c6bcc822b Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 29 Jul 2026 17:38:19 -0400 Subject: [PATCH 1/5] Move keywords out of the optional-dependencies table --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 71f889b..a4b0265 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,13 +25,6 @@ dependencies = [ "pathspec" ] -[project.optional-dependencies] -dev = [ - "pytest", - "ruff", - "pre-commit" -] - keywords = [ "checksum", "md5", @@ -44,6 +37,13 @@ keywords = [ "file-verification", ] +[project.optional-dependencies] +dev = [ + "pytest", + "ruff", + "pre-commit" +] + [project.urls] Homepage = "https://github.com/Imageomics/sum-buddy" Repository = "https://github.com/Imageomics/sum-buddy.git" From 9093ce01326b797b7d19a3022b0ca21fbd4583ae Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 29 Jul 2026 17:38:36 -0400 Subject: [PATCH 2/5] Pin Ruff to 0.16.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a4b0265..8f35e8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ keywords = [ [project.optional-dependencies] dev = [ "pytest", - "ruff", + "ruff==0.16.0", "pre-commit" ] From 1c9ec594e7f8edcbe9730e1c872eb8d484c7380e Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 29 Jul 2026 17:38:36 -0400 Subject: [PATCH 3/5] Run Ruff from the pyproject pin in pre-commit --- .pre-commit-config.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ecc4517..0d42a14 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,9 @@ repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.2 + - repo: local hooks: - id: ruff - + name: ruff + entry: uv run --extra dev ruff check --force-exclude + language: system + types_or: [python, pyi] + require_serial: true From a25f4b58de7acb8f9a93982472e22f1f58b89372 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 29 Jul 2026 17:38:36 -0400 Subject: [PATCH 4/5] Ignore uv.lock --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e2fcd9b..63b828c 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,9 @@ ipython_config.py # https://pdm.fming.dev/#use-with-ide .pdm.toml +# uv +uv.lock + # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ From 66089ffad939c26184f752c29bd32ac83eb99ed0 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 29 Jul 2026 17:38:36 -0400 Subject: [PATCH 5/5] Document linting and the uv requirement --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4710938..7ce79bb 100644 --- a/README.md +++ b/README.md @@ -215,11 +215,15 @@ To develop the package further: ```bash pip install -e ".[dev]" ``` -3. Install pre-commit hook +3. Install pre-commit hook. This requires [uv](https://docs.astral.sh/uv/), which the hook uses to run Ruff at the version pinned in `pyproject.toml`. ```bash pre-commit install ``` +### Linting + +Ruff is pinned in `pyproject.toml`, which is the single source of truth for the pre-commit hook, CI, and local `ruff check .` runs. Ruff version bumps and their repo-wide application should get their own PRs so lint compliance can stay focused and intentional. + ### Tests To run all tests: