Closed ns-rse closed 11 months ago
Thanks @ns-rse! This came off a slightly out of date main so I rebased it, but then I couldn't push back here, so I used your commits in #217. It's now merged! 🎉 Thank you! It's a nice PR to have as a model for my other projects.
Though tbh I dislike the syntax in pyproject.toml relative to setup.cfg. But we don't get a say in that. 😂
Excellent, glad to hear it might be of use. :slightly_smiling_face:
Closes #213
Switches from
setup.{cfg,py}
topyproject.toml
.Installs locally ok and all tests pass.
This may not be quite ready though as I noticed however on starting
napari
I see the following about the declared entrypoint andskan
not being imported.I can however go to Plugins > Install/Uninstall Plugins and select
napari
and it loads ok. On restartingnapari
the error message isn't there. I suspect however this might be because this is downloading the plugin anew rather than using the entry point of the locally installed package.I read through the Your First Plugin — napari documentation which refers to both
setup.cfg
andpyproject.toml
being required and shows the entry point being defined insetup.cfg
.I have also looked at an new plugin brainglobe/brainrender-napari: A napari plugin to render BrainGlobe atlases and associated data as layers. and that only uses
pyproject.toml
and defines the entry point within and I've copied that approach, although the package isn't nested withinsrc/
which I think may be where I've gone wrong.Documentation on how to add such a nested entry point seems sparse, or perhaps more accurately my searching was futile. With...
I tried modifying the target to both
src:skan:napari.yaml
andsrc/skan:napari.yaml
but installation failed in both instances due to an invalidpython-entry-point-reference
.Any pointers to documentation, thoughts/suggestions/advice welcome as I wouldn't want to break anything.