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

Add 'Plugin manager' section to 'napari architecture guide' #321

Open
lucyleeow opened this issue Jan 17, 2024 · 9 comments
Open

Add 'Plugin manager' section to 'napari architecture guide' #321

lucyleeow opened this issue Jan 17, 2024 · 9 comments
Labels
content Ideas for new or improved content plugins related to plugins task

Comments

@lucyleeow
Copy link
Collaborator

🧰 Task

We are lacking documentation on the npe2 Plugin manager. The 'plugins' section talks about building plugins, and information about the plugin manager would not be relevant here. Plugin manager information is more relevant to napari developers. Currently there is some mention of it in NAP 2.

E.g., information about the plugin manager command registry and indexing would fit here, see: napari/npe2#314

cc @jaimergp and @DragaDoncila who may have the knowledge to add such a section.

@lucyleeow lucyleeow added task content Ideas for new or improved content labels Jan 17, 2024
@DragaDoncila
Copy link
Contributor

Ahh @lucyleeow when you mentioned this, I was thinking about the plugin installation manager but I see now that you mean the internal plugin manager. It would probably be nice for us to disambiguate this in the docs also 😆 .

@DragaDoncila
Copy link
Contributor

Information that would be good to include:

  • how to access the plugin manager during a napari session and check discovered plugins etc.
  • how to dynamically register a plugin? maybe?
  • where/when the manager is initialized and plugins discovered
  • the npe2 shim? related but maybe not directly relevant?

@lucyleeow
Copy link
Collaborator Author

lucyleeow commented Jan 24, 2024

how to dynamically register a plugin? maybe?

Is this in the context of testing? Either way, I think it would be useful to have a section on testing plugins in napari, Dynamic Plugin and how to add contributions via the ContributionDecorators (and how they work under the hood).

I was thinking about the plugin installation manager but I see now that you mean the internal plugin manager.

This has tripped me up too. Naming is hard.

@psobolewskiPhD psobolewskiPhD added the plugins related to plugins label Mar 4, 2024
@lucyleeow
Copy link
Collaborator Author

lucyleeow commented Mar 12, 2024

Noticed in #370 that we do not have info on DynamicPlugins and how to add plugin contributions with the decorators. I think this task could fall under here.

(I know its mentioned above in #321 (comment) but just highlighting again)

@jaimergp
Copy link
Contributor

I was thinking about the plugin installation manager but I see now that you mean the internal plugin manager

Oh wow, yes, that's confusing, I had to read that sentence a few times to actually parse it 😬

  • Plugin manager as in the library to handle plugin registration. This is napari-plugin-engine and npe2, right?
  • Plugin (installation) manager as the UI to handle the installation of plugins with conda and pip. This is napari-plugin-manager.

Are there better terms we can use? Should we exclusively refer to the plugin registration library as the "plugin engine" instead of manager?

@lucyleeow
Copy link
Collaborator Author

lucyleeow commented Mar 21, 2024

Yes there should be different terms!

npe1 and npe2 (the plugin engines) both have a class called PluginManager (see: npe2 PM). I think this keeps a registry of plugins, their status etc.

Maybe Plugin installation manager GUI, could be "plugin manager widget"? or "plugin installation manager"?

cc @DragaDoncila

@DragaDoncila
Copy link
Contributor

Mmm yeah this is a sad state of affairs 😆 . I think we should rename the internal plugin manager(s) rather than the plugin installation manager, since that is a public facing package and also is named in the menus, while the internal plugin managers aren't. I would be in favour of renaming to something like PluginRegistry for the internal one(s). Would probably want to do this post npe1 deprecation I guess?

@lucyleeow
Copy link
Collaborator Author

lucyleeow commented Mar 21, 2024

I think we should rename the internal plugin manager(s) rather than the plugin installation manager, since that is a public facing package and also is named in the menus

Yeah good point. I just don't think of the GUI when I hear 'plugin manager' and then have to remind myself it's the GUI thing.

something like PluginRegistry for the internal one

Any potential with confusion that this would be an app-model thing because app-model has the CommandRegistry, MenuRegistry...etc ?

@psobolewskiPhD
Copy link
Member

What a can of worms...

the plugin manager used to install/etc. plugins isn't live yet--0.4.19 uses the old UI--so in principle we could still change that if it would make life easier...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Ideas for new or improved content plugins related to plugins task
Projects
Development

No branches or pull requests

4 participants