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

refactor: Add NPY to ruff rules #1368

Merged
merged 2 commits into from
Nov 7, 2024
Merged

refactor: Add NPY to ruff rules #1368

merged 2 commits into from
Nov 7, 2024

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Nov 6, 2024

Enable Numpy rules: https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy

The changes are related to NPY002: https://docs.astral.sh/ruff/rules/numpy-legacy-random/#numpy-legacy-random-npy002

I'm not sure why layout.py is part of datashader.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 67.56757% with 12 lines in your changes missing coverage. Please review.

Project coverage is 88.59%. Comparing base (ebd2561) to head (5394e85).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
datashader/tests/benchmarks/test_extend_line.py 28.57% 5 Missing ⚠️
datashader/tests/benchmarks/test_canvas.py 25.00% 3 Missing ⚠️
datashader/tests/test_tiles.py 0.00% 3 Missing ⚠️
datashader/layout.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1368      +/-   ##
==========================================
- Coverage   88.60%   88.59%   -0.01%     
==========================================
  Files          93       93              
  Lines       18620    18627       +7     
==========================================
+ Hits        16498    16503       +5     
- Misses       2122     2124       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

I'm not sure why layout.py is part of datashader.

If these algorithms are available elsewhere in a usable form, I'd be happy to import them conditionally when using Datashader's network rendering. Otherwise, where would they go if not here, if Datashader is to support rendering networks?

@hoxbro
Copy link
Member Author

hoxbro commented Nov 7, 2024

Otherwise, where would they go if not here, if Datashader is to support rendering networks?

I'm not sure. I've never seen it as part of Datashader to support rendering networks. But I don't have any strong opinions about this.

@hoxbro hoxbro merged commit 662530f into main Nov 7, 2024
12 checks passed
@hoxbro hoxbro deleted the ruff_npy branch November 7, 2024 07:43
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

Successfully merging this pull request may close these issues.

2 participants