-
Notifications
You must be signed in to change notification settings - Fork 9
MAINT: Add ruff for linting #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the project's linting infrastructure by replacing flake8 with ruff, a faster Python linter written in Rust. It also updates build system dependencies and adds pre-commit hooks for automated code quality checks.
Key changes:
- Migration from flake8 to ruff for linting with custom rule configuration
- Updated build system requirements (setuptools>=64, setuptools_scm>=8)
- Addition of pre-commit configuration with ruff and codespell hooks
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| setup.cfg | Updated build dependencies and added ruff to dev dependencies |
| pyproject.toml | Added ruff configuration, updated build-system requirements, and modified pytest config section |
| .pre-commit-config.yaml | Added new pre-commit configuration with ruff linting/formatting and codespell |
| .github/workflows/test.yml | Replaced flake8 command with ruff check in CI workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sphinxcontrib-bibtex | ||
| myst-nb | ||
| wget | ||
| ruff>=0.14.10 |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dev dependencies still include flake8 (line 65) even though it's being replaced by ruff. Since the linting command in the CI workflow is being changed to use ruff, flake8 should be removed from the dependencies to avoid confusion and reduce unnecessary dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I believe this is ready for a review and merge, but no rush. It's a very large number of lines of code change, but it's almost exclusively changes in formatting or typos. The only substantive change is here: pyAFQ/AFQ/tractography/utils.py Lines 17 to 46 in d4b7044
pyAFQ/AFQ/tests/test_tractography.py Lines 28 to 32 in d4b7044
n_seeds input is provided as a float (with integer value), which otherwise raises an error later on. I saw this error show up on my laptop, even though doesn't show up on the CI, so this might be platform specific. BTW: I upgraded my latpop's OS to the most recent and now I am getting segfaults on our test suite 😅
|
|
This pull request looks great! I am super excited for this more clean organization for pyAFQ's codebase. Merging |
Replaces #113