Skip to content

chore: add pre-commit config#439

Merged
nanomad merged 1 commit intodevelopfrom
chore/pre-commit-setup
May 9, 2026
Merged

chore: add pre-commit config#439
nanomad merged 1 commit intodevelopfrom
chore/pre-commit-setup

Conversation

@nanomad
Copy link
Copy Markdown
Contributor

@nanomad nanomad commented May 9, 2026

Summary

Adds a `.pre-commit-config.yaml` so contributors can run the same checks the CI workflow runs (`mypy`, `ruff check`, `pytest`) before pushing. Mirrors the setup in the sister repo `saic-python-client-ng` so the two projects stay consistent.

Hooks

Stage Hooks
pre-commit `poetry-check`, `poetry-lock`, `ruff` (with `--fix --unsafe-fixes`), `ruff-format`, `mypy`, `check-yaml`, `check-added-large-files`
pre-push `pytest tests`

Deliberate differences vs. `saic-python-client-ng`

  • No `pylint` — this repo dropped pylint in favour of ruff and mypy in 0.10.0.
  • `pytest` is wired to `pre-push` rather than skipped entirely. Commits stay fast; pushes verify the test suite. Locally CI-equivalent without waiting for GitHub.

To enable locally

```
pipx install pre-commit
pre-commit install --hook-type pre-commit --hook-type pre-push
```

Test plan

  • `pre-commit run --all-files` passes on a clean checkout
  • `pre-commit run --hook-stage pre-push` runs the full pytest suite (177 tests pass)
  • CI passes

@nanomad nanomad merged commit d93b39f into develop May 9, 2026
6 checks passed
@nanomad nanomad deleted the chore/pre-commit-setup branch May 9, 2026 14:32
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