ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#43
Closed
korbonits wants to merge 2 commits into
Closed
ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#43korbonits wants to merge 2 commits into
korbonits wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
bb4d8c5 to
01f03c7
Compare
- 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 63 violations (unsorted imports, unused imports, f-strings) Note: ruff-format is excluded from pre-commit and CI — this repo uses pyink. F722/F821 ignored: false positives from jaxtyping annotations.
01f03c7 to
daff97d
Compare
- Replace `uv pip install ruff` + `uv run ruff check` with `uvx ruff check .` (uv pip requires a venv; uvx runs tools directly without one) - Run pyink on the 6 files whose import style ruff reformatted so both formatters agree
6f69be5 to
5763ae8
Compare
Member
|
Thanks for this PR. We already have pre-commit formatting and linter checks that use pyink and pylint respectively (https://github.com/google-deepmind/alphagenome/blob/main/pyproject.toml#L121-L122). This aligns with our formatting and linter checks we have internally. |
Author
|
Sorry about that! Will find something more impactful to contribute
…On Wed, Apr 15, 2026 at 7:18 AM Tom Ward ***@***.***> wrote:
*tomwardio* left a comment (google-deepmind/alphagenome#43)
<#43 (comment)>
Thanks for this PR. We already have pre-commit formatting and linter
checks that use pyink and pylint respectively (
https://github.com/google-deepmind/alphagenome/blob/main/pyproject.toml#L121-L122
).
This aligns with our formatting and linter checks we have internally.
—
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIJPHTB5M6J5IU6NJ2BOS34V6K4ZAVCNFSM6AAAAACXWUD4T6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENJSHAZTMMZVGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__init__.py).pre-commit-config.yamlwith Ruff lint + format hooks.github/workflows/lint.ymltriggering on PRs and pushes tomainNote:
ruff-formatis excluded from pre-commit and CI — this repo usespyink. Ruff's line-length and indent-width are set to match (80/2).F722/F821are ignored: false positives fromjaxtypingannotations (e.g.Float[Array, "b n h d"]).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
Testing
Ran
ruff check .andruff format --check .locally — all checks pass.Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com