| 1 |
# Sprint 15 — pre-commit hygiene for DocumentLanguageModel. |
| 2 |
# |
| 3 |
# Install via `uv run pre-commit install` once per clone. CI matches the |
| 4 |
# same hook set so local failures mirror the PR check. |
| 5 |
# |
| 6 |
# `pytest-unit` runs the fast tier only (no -m slow, no online, no gpu) |
| 7 |
# — the full slow suite lives in .github/workflows/integration-slow.yml. |
| 8 |
|
| 9 |
default_language_version: |
| 10 |
python: python3.11 |
| 11 |
|
| 12 |
repos: |
| 13 |
- repo: https://github.com/astral-sh/ruff-pre-commit |
| 14 |
rev: v0.9.7 |
| 15 |
hooks: |
| 16 |
- id: ruff |
| 17 |
args: [--fix] |
| 18 |
- id: ruff-format |
| 19 |
|
| 20 |
- repo: https://github.com/pre-commit/mirrors-mypy |
| 21 |
rev: v1.13.0 |
| 22 |
hooks: |
| 23 |
- id: mypy |
| 24 |
args: [--strict, src/dlm] |
| 25 |
# Match pyproject's dep surface; keeping this in sync with |
| 26 |
# pyproject.toml is a manual step checked by the `mypy` hook |
| 27 |
# failing loudly when it can't resolve a third-party symbol. |
| 28 |
additional_dependencies: |
| 29 |
- pydantic>=2.13 |
| 30 |
- pydantic_core |
| 31 |
- types-pyyaml |
| 32 |
|
| 33 |
- repo: local |
| 34 |
hooks: |
| 35 |
- id: no-sprint-references |
| 36 |
name: refuse new sprint/audit IDs in src/dlm/ |
| 37 |
entry: ./scripts/check-no-sprint-references.sh --staged |
| 38 |
language: system |
| 39 |
pass_filenames: false |
| 40 |
stages: [pre-commit] |
| 41 |
- id: pytest-unit |
| 42 |
name: pytest (unit + non-slow integration) |
| 43 |
entry: uv run pytest -m "not slow and not gpu and not online" |
| 44 |
language: system |
| 45 |
pass_filenames: false |
| 46 |
stages: [pre-commit] |
| 47 |
|