Add basic spin config and linting commands#167226
Add basic spin config and linting commands#167226zklaus wants to merge 10 commits intogh/zklaus/19/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/167226
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 0c1fbb7 with merge base 2c846bb ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
albanD
left a comment
There was a problem hiding this comment.
Thanks!
Is "spin lint" all green for you locally?
|
@albanD, I think I've addressed all comments and the tests are green. What do you think? |
albanD
left a comment
There was a problem hiding this comment.
Sounds good!
As a follow up question. Is there a way to have a version where I can pass, as a user, any flag I want to lintrunner?
For example, doing some lint bringup work, I want to run lintrunner --take RUFF --all-files.
Doesn't have to be in this PR, but can be a followup.
| } | ||
|
|
||
|
|
||
| ALL_LINTERS = VERY_FAST_LINTERS | FAST_LINTERS | SLOW_LINTERS |
There was a problem hiding this comment.
What will happen to new lints as they're being added?
There was a problem hiding this comment.
They need to be categorized. As it is now, an unknown linter will abort the operation. We could change that to a warning while still moving ahead otherwise.
There was a problem hiding this comment.
I'm happy with an error as long as the error message is very clear on what the dev seeing it should do (I guess timing it and putting it in the right category).
There was a problem hiding this comment.
The warning (in yellow) for an uncategorized linter TESTI is Unknown linters found; please add them to the correct category in .spin/cmds.py: TESTI. All other linters will be run, but not this one.
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
ghstack-source-id: 8126018 Pull-Request: pytorch/pytorch#167226
This PR adds a basic spin configuration to allow for linting. It is designed as a drop-in replacement for the current Makefile based solution, i.e. it sets up and updates lintrunner based on the hashes of certain configuration files. Lintrunner is called via Uv's `uvx` command, separating its environment from the general development environment in an effort to reduce instances of competing requirements breaking environments. Pull Request resolved: pytorch#167226 Approved by: https://github.com/atalman, https://github.com/albanD
This adds basic documentation of the linting features for Spin added in #167226 to the CONTRIBUTING.md document. Pull Request resolved: #167227 Approved by: https://github.com/atalman, https://github.com/albanD
This adds basic documentation of the linting features for Spin added in #167226 to the CONTRIBUTING.md document. Pull Request resolved: #167227 Approved by: https://github.com/atalman, https://github.com/albanD
This PR adds a basic spin configuration to allow for linting. It is designed as a drop-in replacement for the current Makefile based solution, i.e. it sets up and updates lintrunner based on the hashes of certain configuration files.
Lintrunner is called via Uv's
uvxcommand, separating its environment from the general development environment in an effort to reduce instances of competing requirements breaking environments.Stack from ghstack (oldest at bottom):