Skip to content
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

Enable Ruff's NumPy rules #103

Open
jakirkham opened this issue Sep 24, 2024 · 7 comments
Open

Enable Ruff's NumPy rules #103

jakirkham opened this issue Sep 24, 2024 · 7 comments

Comments

@jakirkham
Copy link
Member

jakirkham commented Sep 24, 2024

Ruff ships with a few NumPy checks. It may be worth considering adding these to the Ruff checks that we include in RAPIDS projects

Note: NPY201 specifically checks for NumPy 2 support. Though there are other checks, which may be worth including too

@vyasr
Copy link
Contributor

vyasr commented Sep 24, 2024

Most RAPIDS repos don't use ruff at all yet, so getting that set up would be a good first step (presumably replacing flake8).

@jakirkham
Copy link
Member Author

Interesting saw things like...

So assumed we were already using this somehow

If not, agree that setting up Ruff would be the first step

@vyasr
Copy link
Contributor

vyasr commented Sep 24, 2024

cudf is the only repository using ruff so far AFAIK.

@vyasr
Copy link
Contributor

vyasr commented Sep 25, 2024

Oh cool! Then we've come further with that than I thought. I'd say a coordinated migration to ruff from flake8 at least is warranted.

@jameslamb
Copy link
Member

+1 to that. @bdice also rightly pointed out in #101 (comment) that if projects were all using ruff instead of flake8, the effort to fix something like #101 would have been lower because ruff can auto-fix so many of the issues it raises.

@jakirkham
Copy link
Member Author

FWIW am personally encouraged by the fact that projects are adopting Ruff on their own and making this transition

Perhaps we could provide some guidelines if they would be helpful. This probably works best if we pick one RAPIDS project and concentrate effort on bringing its Ruff configuration up-to-date and then point to that as an example for others

That said, am happy to see projects continue to make these changes themselves. Though it might be worth raising awareness of this (say at the PIC meeting) and see if more projects will sign up to make these changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants