Skip to content

ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#242

Open
korbonits wants to merge 1 commit intomicrosoft:mainfrom
korbonits:ci/ruff-precommit-and-actions
Open

ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#242
korbonits wants to merge 1 commit intomicrosoft:mainfrom
korbonits:ci/ruff-precommit-and-actions

Conversation

@korbonits
Copy link
Copy Markdown

Summary

  • Add Ruff config (E/F/I rules, 120-char line length, per-file ignores for __init__.py)
  • Add .pre-commit-config.yaml with Ruff lint + format hooks
  • Add .github/workflows/lint.yml triggering on PRs and pushes to main
  • Auto-fix violations (unsorted imports, unused imports, f-string placeholders)

Also fixed duplicate Sequence import in mattergen/evaluation/metrics/evaluator.py (F811).

Motivation

No linting or PR-level CI exists today. This PR adds lightweight enforcement using Ruff — fast, single dependency — and wires it up to run on every PR.

What's not included

  • No type checking — out of scope
  • No new lint rules beyond E/F/I selection

Testing

Ran ruff check . and ruff format --check . locally — all checks pass.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

- Add Ruff config (E/F/I rules, per-file ignores for __init__.py)
- Add .pre-commit-config.yaml with ruff lint + format hooks
- Add .github/workflows/lint.yml triggering on PRs
- Auto-fix 20 violations (unsorted imports, unused imports, f-strings)

Also fixed duplicate Sequence import in mattergen/evaluation/metrics/evaluator.py (F811).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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