You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taking a look through the npe2 cookiecutter, instead of a PR, just want to put some tasks here that we can tackle individually:
we shouldn't use from numpy.typing import ArrayLike in _writer for two reasons: first, it's only available in pretty new versions of numpy (I think 1.20+) and we didn't pin numpy in the users' setup.cfg. Second, it's not an accurate type., layer data can come in many types. We're trying to codify this with the LayerDataProtocol, but i wouldn't use that either. Just call it typing.Any for now.
writers need more docstrings with clearer expectations about what they expect, and what they should do. I know there's a link there, but it would be nice if the cookiecutter stood alone a bit more.
... obviously, we should make the equivalent of the hook_specifications.py for npe2, so we have one authoritative place to look for all signatures expected by npe2. (See Start to make command APIs clearer npe2#61)
commands:
- id: napari-foobar.get_readerpython_name: napari_foobar._reader:napari_get_readertitle: Open data with napari FooBar
- id: napari-foobar.writerpython_name: napari_foobar._reader:napari_get_readertitle: Save data with napari FooBar
(This one is in main like this, but just noting this so I don't forget)... in _widget.py, we should prefer viewer: 'napari.viewer.Viewer'over using the param named napari_viewer, and we should add at the top:
hey @nclack
Taking a look through the npe2 cookiecutter, instead of a PR, just want to put some tasks here that we can tackle individually:
from numpy.typing import ArrayLike
in_writer
for two reasons: first, it's only available in pretty new versions of numpy (I think 1.20+) and we didn't pin numpy in the users' setup.cfg. Second, it's not an accurate type., layer data can come in many types. We're trying to codify this with the LayerDataProtocol, but i wouldn't use that either. Just call ittyping.Any
for now.hook_specifications.py
for npe2, so we have one authoritative place to look for all signatures expected by npe2. (See Start to make command APIs clearer npe2#61)python_name
for commandnapari-foobar.writer
is duplicated in the commands list #70_widget.py
, we should preferviewer: 'napari.viewer.Viewer'
over using the param namednapari_viewer
, and we should add at the top:The text was updated successfully, but these errors were encountered: