Skip to content

[FEATURE] Add Ruff lint/format and pre-commit (CI + docs) #51

@bcExpt1123

Description

@bcExpt1123

Is your feature request related to a problem? Please describe.

Consider introducing Ruff as the project’s standard tool for linting and formatting. It could be integrated into pre-commit to support consistent local development workflows, and the same Ruff checks could also run in CI before tests to ensure alignment across environments.
It may also help to document how contributors can run Ruff manually, as well as how to optionally enable the pre-commit hooks. Adding a PR checklist item to explicitly verify ruff check locally before submission could further reduce avoidable linting issues early in the review process.

Describe the solution you'd like

Area Change
Dependencies Dev: ruff, pre-commit; lockfile updated (uv.lock).
pyproject.toml [tool.ruff] — target Python 3.13, src + tests, line length 88; lint extends B (bugbear), I (isort), UP (pyupgrade); format uses double quotes.
.pre-commit-config.yaml ruff-check, ruff-format with --check; local hook runs uv run pytest tests/ -q --no-cov on Python changes.
CI (.github/workflows/tests.yml) After uv sync, run uv run pre-commit run --all-files with SKIP=pytest so Ruff runs in CI without running the fast pytest hook twice before the covered test step.
Docs (CONTRIBUTING.md) Sections for Linting and formatting (ruff check / ruff format) and Pre-commit (install, manual run, SKIP for hooks).
PR template New checkbox: `uv run ruff check .` passes locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions