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

[test-bot] Comprehensive tests failing #5420

Closed
github-actions bot opened this issue Dec 19, 2022 · 2 comments · Fixed by #5423
Closed

[test-bot] Comprehensive tests failing #5420

github-actions bot opened this issue Dec 19, 2022 · 2 comments · Fixed by #5423
Assignees
Labels
bug Something isn't working

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2022

The Comprehensive Test workflow failed on 2022-12-20 18:07 UTC

The most recent failing test was on macos-latest py3.9
with commit: 59cd8a5

Full run: https://github.com/napari/napari/actions/runs/3742847471

(This post will be updated if another test fails, as long as this issue remains open.)

@github-actions github-actions bot added the bug Something isn't working label Dec 19, 2022
@andy-sweet
Copy link
Member

Pretty sure this is due to the numpy minor version release on 2022/12/18. I assume the new version is stricter about casts from nan (or something similar to that).

We can prevent use of that version temporarily to make tests pass again, or probably better fix the tests that now fail.

@andy-sweet andy-sweet self-assigned this Dec 19, 2022
@andy-sweet
Copy link
Member

Likely coming from numpy/numpy#21437, which was included in 1.24.0

I see we explicitly set the extent for all empty non-image layers (e.g. see Points._data_extent), to be full of nans. That's intuitively correct to me because if there's no data, then the extent isn't really defined, so I prefer nans over zeros.

But this breaks down with Layer.corner_pixels, since that is defined in data space and has integer values. That attribute is only really useful (inside napari) for 2D visualization of multi-scale image layers, but we also try to keep it up-to-date in general (which is where this warning is coming from) and it is part of the public/documented API. When there is no data and the extent is undefined, we'll eventually try to set a nan on an int array, so this warning is rightly issued.

I think the best quick fix is to check for an all-nan extent in Layer._update_draw, and just set corner pixels to zeros in this case. We could ignore the warning with a context manager, but that might hide more real failures. I think the best long term fix is to find some way to remove Layer.corner_pixels and capture it in slice input/requests instead.

@sofroniewn : as best as I can work out, you decided on nans in #1360 . That was over 2 years ago, but curious if you remember any thoughts here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant