Skip to content

Add ruff lint and format check to CI - #14

Merged
jhdark merged 1 commit into
pathsim:masterfrom
jhdark:ruff-ci
Nov 3, 2026
Merged

jhdark merged 1 commit into
pathsim:masterfrom
jhdark:ruff-ci

Conversation

@jhdark

@jhdark jhdark commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #13.

Adds a lint job to CI that runs ruff check and ruff format --check.

Changes

  • .github/workflows/ci.yml: new lint job using astral-sh/ruff-action@v3. It runs once rather than across the Python matrix, and reads the ruff version from pyproject.toml.
  • pyproject.toml: new lint extra pinning ruff==0.17.3, and a [tool.ruff] section (src = ["src", "tests"] so first-party imports sort correctly).
  • environment.yml: installs .[test,lint].
  • README.md: dev commands now include ruff.
  • docs/source/examples/linear_feedback.ipynb: sorted one import block, the only existing violation.

Choices on the open questions in #13

  • Rules: ruff's default set. In 0.17 that's already broad (pyflakes, isort, pyupgrade, bugbear, RUF, SIM, …), so there's no select list for now. The version is pinned because the default set changes between ruff releases. Without a pin, local runs and CI could disagree.
  • Formatting: enforced. The existing code is already ruff format-clean.

Locally, ruff check ., ruff format --check ., mypy src/pathsim_fusion and pytest (33 passed) all pass.

@jhdark
jhdark merged commit 0ac2e37 into pathsim:master Nov 3, 2026
5 checks passed
@jhdark
jhdark deleted the ruff-ci branch November 3, 2026 21:04
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.

Add ruff lint and format check to CI

1 participant