-
Notifications
You must be signed in to change notification settings - Fork 667
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
Ruff #4825
Ruff #4825
Conversation
The current failure with |
@MDAnalysis/coredevs please speak up if you have something against this addition. See #2450 and #4810 (review) for context. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4825 +/- ##
===========================================
+ Coverage 86.08% 86.40% +0.31%
===========================================
Files 177 189 +12
Lines 21742 22809 +1067
Branches 3055 3055
===========================================
+ Hits 18717 19708 +991
- Misses 2593 2668 +75
- Partials 432 433 +1 ☔ View full report in Codecov by Sentry. |
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.
@RMeli could you please add it to the agenda for the next business?
I'm blocking because with these things we really want folks to know what the tool is doing and the expected workflow when something happens. It's best to take it slow here, unless there's a rush.
Can you please briefly summarize what the PR is accomplishing and what the implications are? I have no idea what ruff is. |
PR #4810 removes mutable data structures in function calls. This was already done a long time ago in #590, but since no checks were in place the issue creeped back into the codebase. This PR enable such checks, so that this is caught during PRs.
In this PR, B006 | mutable-argument-default | Do not use mutable data structures for argument defaults The expected workflow if something happens is to ask the developer submitting the PR to fix the issue as part of the review process.
Ruff An extremely fast Python linter and code formatter, written in Rust. Because it's fast and encompass the checks of many other tools, it has seen very rapid adoption across many Python projects. In this PR I only enable the two rules mentioned above, as suggested by @tylerjereddy. Once the formatting PRs are over, we can eventually think of introducing more checks (see rules).
I can do that, although I think this is somewhat uncontroversial (it's only two checks enabled), and might be better discussed asynchronously instead of taking up precious meeting time. |
FYI, this is what the
|
Seems "ok" to me, though it was my suggestion to begin with. Makes sense that folks want to take it slow. Some community examples of usage:
That's fair, their tooling (https://astral.sh/) is nice. I did see some criticism about how they got their funding or something like that, but so far the experience has been fast/very good tooling (their |
Thanks for the explanation, if it's reasonable / ok with folks, I would still like to ask that this go up at the next business meeting though. |
Ok, will do. |
I closed simply because we don't yet know when the next developer meeting is (unless I missed something) and I'm not sure I can participate, so things might slip of months. For this reason I prefer not to pollute the PR board; it's easy to re-open if we decide we want to, and I can re-open while incorporating eventual feedback. If you prefer to have it open, I don't mind either way since it does not affect the files touched by |
I'll keep an eye out for the next business meeting. |
I added a discussion item to the agenda for the next meeting. |
Suggested in #4810. Enable
ruff
with very minimal checksB006
andB008
. Currently blocked by #4810.This can be eventually expanded once the re-formatting with
black
is over. Related to #2450.PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4825.org.readthedocs.build/en/4825/