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
Add size and ndim to LayerDataProtocol #6494
Conversation
add the corresponding ( |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6494 +/- ##
==========================================
- Coverage 92.24% 92.19% -0.05%
==========================================
Files 601 601
Lines 53210 53236 +26
==========================================
- Hits 49081 49079 -2
- Misses 4129 4157 +28 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to raise NotImplementedError()
or add pass
to coverage:report
exclude_lines
in setup.cfg
in `napari/layers/image/image.py`, `_calc_data_range(self...)` calls `calc_data_range(input_data,...)` where `input_data` is a `LayerDataProtocol` `calc_data_range(...)` needs it to have a size, and ndim. So my guess is we need to make sure that LayerDataProtocol has size and ndim, is that correct ?
* main: Fix labels mapping cache by filling it with background, not 0 (napari#6580) Simplify unused parameters of Quaternion functions. (napari#6424) Add size and ndim to LayerDataProtocol (napari#6494) Fix label direct mode for installation without numba (napari#6571) Fix test in napari_builtins to remove import from conftest (napari#6568) Remove `app-model!=0.2.4` from test constraints (napari#6577) Bump mypy version and fix errors (napari#6557) Update test to work with `app-model==0.2.4` (napari#6573) Added support for features in surface layers (napari#6515)
in
napari/layers/image/image.py
,_calc_data_range(self...)
callscalc_data_range(input_data,...)
whereinput_data
is aLayerDataProtocol
calc_data_range(...)
needs it to have a size, and ndim. So my guess is we need to make sure that LayerDataProtocol has size and ndim, is that correct ?Thoughts ?
Typing all the things that need to be types for this problem to show up is quite long, please see all my other typing PRs to start enabling type checking for these files, mostly opening this separately to know if this is something we wan to add to LayerDataProtocol