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

Apply ruff everywhere (notebooks and scripts) #17820

Open
wants to merge 3 commits into
base: branch-25.02
Choose a base branch
from

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Jan 24, 2025

Description

This PR applies ruff (check and format) everywhere, including notebooks and utility scripts. This allows us to drop our use of nbqa, since ruff natively supports notebooks. (xref: #17819, #17805)

I manually updated a few notebooks that were using old NumPy syntax for generating random values.
Closes #17461.

I also updated the ruff version to 0.9.3.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@bdice bdice requested review from a team as code owners January 24, 2025 22:13
@bdice bdice requested review from gforsyth, vyasr, Matt711 and vuule January 24, 2025 22:13
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. cudf.pandas Issues specific to cudf.pandas cudf.polars Issues specific to cudf.polars pylibcudf Issues specific to the pylibcudf package labels Jan 24, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #17461, @wence- were you trying to say you are hesitant to apply ruff without a config for sorting cudf into a separate section? I am okay with the diff shown here, but if you're not, I wanted to let you opine. We could use an import section config of some kind, but I find it unimportant in notebooks (only within the library internals).

@bdice bdice added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 24, 2025
@bdice bdice mentioned this pull request Jan 24, 2025
3 tasks
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of this approach but given the nature of the change it's best if we get at least one more approval before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudf.pandas Issues specific to cudf.pandas cudf.polars Issues specific to cudf.polars improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[FEA] Update pre-commit hooks for jupyter notebooks to use nbqa ruff
2 participants