napari / napari-animation

A napari plugin for making animations
https://napari.github.io/napari-animation/
Other
74 stars 27 forks source link

plugin_name in manifest doesn't match Python package name #193

Closed psobolewskiPhD closed 6 months ago

psobolewskiPhD commented 6 months ago

Python package name is napari_animation: https://github.com/napari/napari-animation/blob/5760ee2902f59edf6eeb85bd10651452f39746a4/setup.cfg#L2 napari.yaml manifest has napari-animation: https://github.com/napari/napari-animation/blob/5760ee2902f59edf6eeb85bd10651452f39746a4/napari_animation/napari.yaml#L1

This results in errors:

 ERROR : MainThread : napari.manifest -> 'napari_animation' could not be imported: The name field in the manifest ('napari-animation') must match the package name ('napari_animation')

npe2 docs say the manifest should use the Python package name: https://napari.org/stable/plugins/manifest.html#fields

Note I don't understand why I didn't observe this previously...

Solutions: change the Python package name or change the plugin name in the manifest. I think the latter choice is less disruptive?

jni commented 6 months ago

No, we need to update the setup.cfg: it's confusing, but I think the "package name" is the name of the package on PyPI — e.g. scikit-image. Why do I think this? In the manifest documentation, see that name is example-plugin. Which obviously cannot be the import name.

Further, if you look at PyPI the name is actually napari-animation — I think PyPI no longer allows _ in package names. So I think the name field in setup.cfg is actually just plain wrong.