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

Prevent edge cases in XArrayInterface from crashing #5809

Merged
merged 2 commits into from
Jul 15, 2023
Merged

Conversation

ahuang11
Copy link
Collaborator

Closes holoviz/geoviews#663 and #4910

The examples in the issues above no longer crashes. I suspect datashade was peddling numpy arrays into XArrayInterface, but there was no handling for that so this PR implements that.

Also, there was NaNs in the bounds and casting to int raised an exception; this simply sets NaNs to 0s to prevent it from crashing.

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2023

Codecov Report

Merging #5809 (d7a2b90) into main (ae79eec) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5809      +/-   ##
==========================================
+ Coverage   88.15%   88.17%   +0.02%     
==========================================
  Files         307      307              
  Lines       62908    62916       +8     
==========================================
+ Hits        55459    55479      +20     
+ Misses       7449     7437      -12     
Flag Coverage Δ
ui-tests 22.40% <20.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
holoviews/core/sheetcoords.py 66.88% <ø> (ø)
holoviews/core/data/xarray.py 88.86% <100.00%> (ø)
holoviews/tests/core/data/test_xarrayinterface.py 98.80% <100.00%> (+0.02%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

holoviews/core/sheetcoords.py Outdated Show resolved Hide resolved
holoviews/core/sheetcoords.py Outdated Show resolved Hide resolved
@hoxbro
Copy link
Member

hoxbro commented Jul 15, 2023

LGTM. Thank you for the fix 👍

@hoxbro hoxbro merged commit 003be41 into main Jul 15, 2023
13 of 14 checks passed
@hoxbro hoxbro deleted the error_bounds branch July 15, 2023 11:56
@ahuang11
Copy link
Collaborator Author

Cool 😎 no problem! This bug had me do work arounds 2 years ago; I'm glad it's finally fixed haha

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XArrayInterface expects gridded data (when data is empty)
3 participants