default_stages: [pre-commit]
minimum_prek_version: "0.2.25"
repos:
# prek builtin hooks - no network/env needed, instant execution
- repo: builtin
hooks:
- id: trailing-whitespace
priority: 0
- id: end-of-file-fixer
priority: 0
- id: check-yaml
priority: 0
- id: check-toml
priority: 0
- id: check-json
priority: 0
- id: check-added-large-files
priority: 0
- id: check-merge-conflict
priority: 0
- id: check-case-conflict
priority: 0
- id: check-symlinks
priority: 0
- id: check-executables-have-shebangs
priority: 0
- id: mixed-line-ending
args: [--fix=lf]
priority: 0
- id: detect-private-key
priority: 0
- id: no-commit-to-branch
args: [--branch=main]
priority: 0
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.0
hooks:
- id: markdownlint
args: [--config, config/.markdownlint.yaml, --fix]
priority: 1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10 # prek autoupdate will fill this
hooks:
- id: ruff
args: [--config, config/ruff.toml, --fix]
priority: 1
- id: ruff-format
args: [--config, config/ruff.toml]
priority: 1
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.21 # prek autoupdate will fill this
hooks:
- id: uv-lock
priority: 1
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10 # prek autoupdate will fill this
hooks:
- id: actionlint
priority: 1
- repo: local
hooks:
- id: ty
name: ty type checker
entry: uv run ty check
language: system
types: [python]
pass_filenames: false
priority: 1
- id: check-lfs-files
name: check LFS files are not pointers
entry: bash scripts/check_lfs_files.sh
language: system
pass_filenames: false
stages: [pre-push]
- id: docs-build
name: docs build check
entry: bash -c 'mkdir -p htmlcov && echo "<html><body>No coverage report yet</body></html>" > htmlcov/index.html && uv run poe docs-build'
language: system
pass_filenames: false
stages: [pre-push]
- id: tests
name: run tests
entry: uv run poe test
language: system
pass_filenames: false
stages: [pre-push]
- id: no-internal-urls
name: check for internal URLs in pyproject.toml and uv.lock
entry: bash scripts/check_no_internal_urls.sh
language: system
files: (pyproject\.toml|uv\.lock)
pass_filenames: false
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0 # prek autoupdate will fill this
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: ["--verbose"]