Adopt ruff across SciTools? #5254
Replies: 16 comments 18 replies
-
Of course, we could adopt it in one repo as a trial and see how it rolls, otherwise how can we see what's evolving? |
Beta Was this translation helpful? Give feedback.
-
Also, for any (noisy) future style changes, I'd recommend that we keep using .git-blame-ignore-revs. We've already started that journey, see: The use of |
Beta Was this translation helpful? Give feedback.
-
@trexfeathers When are you going to call it and close this poll? |
Beta Was this translation helpful? Give feedback.
-
I'm not too convinced about the advantages listed above:
but maybe there are other advantages that have not been listed above? In the linked pull request I saw that @bjlittle discovered more issues with the code using |
Beta Was this translation helpful? Give feedback.
-
Sounds good. Almost an internal detail with linting taking place using pre-commit anyway. However, I do have a couple of potential concerns:
EDIT: Sounds good otherwise though! |
Beta Was this translation helpful? Give feedback.
-
Just so you know... Seems to me like some of the biggest popular "on-piste" tools are supported by only a couple of developers at most... That's the harsh reality of the ecosystem that we live in. The many leaning on the shoulders of the few. So, I find it hard to disambiguate between your so called "off-piste" and "on-piste" packages. Or am I missing something obvious? |
Beta Was this translation helpful? Give feedback.
-
Interesting... in the two weeks since this poll started ruff has gone from To put that into context:
|
Beta Was this translation helpful? Give feedback.
-
I opened SciTools/cf-units#364, which I think makes it easier to see the difference ruff makes to cf-units. |
Beta Was this translation helpful? Give feedback.
-
Note that, @tkknight and I are keen to nibble away at #4721, as the That said, |
Beta Was this translation helpful? Give feedback.
-
Another 2 weeks pass ... and |
Beta Was this translation helpful? Give feedback.
-
Ruff is now hosted under Astral, so the first point can be crossed off the "against" list. |
Beta Was this translation helpful? Give feedback.
-
Just to be clear I'm not against this. Any perceived 'heel dragging' is just prioritising this against other Iris work. |
Beta Was this translation helpful? Give feedback.
-
Oooh the ruff formatter makes it a drop-in for black now too... (except ruff being much faster) Incredible the extent of what it supports
https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black
|
Beta Was this translation helpful? Give feedback.
-
This discussion has been going for several months about a tool that is faster and that simplifies the config. I feel at this point this is a no brainer. I suggest we get SciTools/cf-units#364 over the line and then follow up for implementing ruff in Iris. If @bjlittle is still up for this I am happy to pair up to get this done - my interest is the numpydoc stuff #4721 |
Beta Was this translation helpful? Give feedback.
-
ruff
ruff is an alternative linter that can replace flake8 and isort, which @bjlittle has discovered. I'll do my best to summarise the arguments for adopting, but I'm a ruff-novice so please edit this as appropriate.
I consider this a decision for all SciTools repositories, as we want to keep our repo architecture aligned wherever possible.
For
12k
stars!), so keeps us in line with the communityAgainst
charliermarsh
- rather than an organisation -PyCQA
v0.0.261
Of course, something is worth some pain if it offers benefits
11 votes ·
Beta Was this translation helpful? Give feedback.
All reactions