Skip to content

chore: add ruff pre-commit, commitizen, and CI lint gate - #69

Merged
tomtranjr merged 4 commits into
feature/migrate-uv-semantic-releasefrom
chore/add-ruff-precommit-commitizen
Aug 3, 2026
Merged

chore: add ruff pre-commit, commitizen, and CI lint gate#69
tomtranjr merged 4 commits into
feature/migrate-uv-semantic-releasefrom
chore/add-ruff-precommit-commitizen

Conversation

@tomtranjr

Copy link
Copy Markdown
Member

summary

Adds developer tooling on top of the uv migration (#67): a local pre-commit hook that auto-fixes lint/format, a commit-msg hook that enforces Conventional Commits (which python-semantic-release now depends on), and a CI lint gate that only checks (never fixes).

  • .pre-commit-config.yaml: ruff v0.15.21 (ruff-check --fix + ruff-format) at the pre-commit stage, commitizen at the commit-msg stage. default_install_hook_types wires both up with one pre-commit install.
  • pyproject.toml: ruff==0.15.21 (pinned to match the hook) + pre-commit added to the dev group; minimal [tool.ruff] using defaults, recycling_bin/ excluded as dead code.
  • .github/workflows/release.yml: new lint job (ruff check . + ruff format --check ., no --fix); release now needs [lint, test].
  • docs/contributing.md: pre-commit setup step + note that CI enforces the same checks.
  • One-time cleanup so the gate is green: style: commits apply ruff format + autofixes; fix: commit resolves the 15 non-auto-fixable lint errors (unused vars, bare excepts, ambiguous name, mid-file imports, == True).

why draft / base branch

Based on #67's branch, not main, since #67 rewrites pyproject.toml and the CI workflow this touches. Draft for teammate visibility while #67 is in review. Retarget base to main after #67 merges.

division of labor

local pre-commit CI gate
ruff lint ruff check --fix (fixes) ruff check (fails, no fix)
ruff format ruff-format (rewrites) ruff format --check (fails)
commit msg commitizen (commit-msg) not in CI

test plan

  • uv run ruff check . and uv run ruff format --check . clean
  • uv run pytest — 65 passed
  • uv run pre-commit run --all-files passes
  • commit-msg hook rejects non-conventional messages, accepts conventional

@tomtranjr
tomtranjr merged commit 8fa8935 into main Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant