Repository navigation
Conversation
Closes stac-utils#1587. The ruff, ruff-format, codespell, doc8 and mypy hooks were `repo: local` hooks with `language: system`, so each one ran whatever version happened to be installed in the contributor's environment, and failed outright when the tool was missing. They now come from their upstream hook repositories, and the sync-with-uv hook keeps every `rev` at the version resolved in uv.lock, so uv.lock stays the single source of truth for tool versions. mypy now runs in an isolated hook environment, so the packages it type checks against are listed as `additional_dependencies`. Each of those pins carries the `# sync-with-uv` pragma, so they follow uv.lock as well. `pytest-pystac` is added to `mypy_path` so the extension tests' `pytest_pystac.plugin` imports resolve without its editable install. The `ruff` hook id becomes upstream's `ruff-check`; the example in the contributing guide is updated to match.
codespell reads [tool.codespell] from pyproject.toml through tomllib on Python >= 3.11 and needs tomli below that. The isolated hook environment had no tomli, so on the 3.10 CI job it silently ignored skip = "CHANGELOG.md" and flagged an existing typo in the changelog. The pin follows uv.lock via sync-with-uv like the others.
gadomski
self-requested a review
September 15, 2026 13:22
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue(s):
Description:
The ruff, ruff-format, codespell, doc8 and mypy hooks were
repo: local/language: system, so each ran whatever version was installed in the contributor's environment (and failed outright when the tool was missing). They now come from their upstream hook repos, and async-with-uvhook keeps everyrevat the version inuv.lock.mypy now runs in an isolated hook environment, so the packages it type-checks against are listed as
additional_dependencies; each pin carries the sync-with-uv pragma, so those followuv.locktoo.pytest-pystacis added to[tool.mypy] mypy_pathso the extension tests'pytest_pystac.pluginimports resolve without its editable install. Theruffhook id becomes upstream'sruff-check, anddocs/contributing.rstis updated to match.One trade-off to be aware of: when Dependabot bumps ruff, mypy or a
types-*package inuv.lock,pre-commit run --all-fileswill report the config as out of date until someone runs pre-commit once and commits the re-synced.pre-commit-config.yaml.No runtime code changes. After rebasing onto current
mainI re-ransync-with-uv(0 of 20 pins changed) and the isolated mypy hook (2.3.0, no issues in 127 source files); ruff, codespell and doc8 were run through their new hook environments when the branch was written, and the rebase touched nothing they cover.PR Checklist:
pre-commit run --all-files)pytest)AI tool usage: