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

Update finding and installing plugin docs #541

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

melissawm
Copy link
Member

@melissawm melissawm commented Dec 17, 2024

References and relevant issues

Closes #122
Closes #354
Closes #532
Closes #508

Description

  • Update screenshots and text to reflect current state of napari plugin manager (also adds links to their docs)
  • Update instructions on deploying your plugin to conda-forge

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 17, 2024
@melissawm melissawm marked this pull request as ready for review December 19, 2024 16:43
@melissawm
Copy link
Member Author

@TimMonko would you mind reviewing these changes? I'd be more than happy to address any suggestion you may have for improvements. Cheers!

Copy link
Contributor

@TimMonko TimMonko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pinging me to leave a review. This is the first time I've reviewed a PR, so it took me a bit to figure everything out. Let me know if there is some review-specific etiquette or something that I've missed

metadata, to produce a more user friendly way to find napari plugins.
- **conda-forge:** You can search for napari plugins from
the conda-forge [package search page](https://conda-forge.org/packages/).
- **napari hub:** The [napari hub](https://napari-hub.org) uses this data, together with additional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'This data' is ambiguous. I'm not sure how necessary it is. Maybe just something like' The napari-hub uses plugin-provided metadata to produce a more user-friendly way to find napari plugins.


Similarly, the napari application lists plugins, annotated on PyPI with `Framework :: napari`,
in the `Plugins > Install/Uninstall Plugins` menu.

## Installing plugins with napari

All PyPI packages annotated with the `Framework :: napari` tag can be installed
directly from within napari:
Firstly, from the “Plugins” menu, select “Install/Uninstall Plugins...”.
directly from within napari, using the [napari plugin manager](https://napari.org/napari-plugin-manager/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it should be stated that npm is only installed with pip install napari[all], conda install napari, and the bundled app?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is a good point! The plugin manager has been devolved, so it's not in napari/napari anymore.

the “Install” button next to the input bar. This method allows for more flexibility
in the plugins you can install, but it is also a bit more advanced.
2. Install plugins via manual input: at the bottom of the napari plugin manager window, there is a text box that will
say either "install with 'pip' by name/url, or drop file...", or "install with 'pip' by name/url, or drop file..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is meant to say 'conda' or something for one of them? Right now both say 'pip'. (my npm is currently not connecting in any install, no idea why, so I can't check)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops yes, wrong copy/paste!

If you want to install `napari-svg` from a specific release, enter `napari-svg==0.1.0` in the text field.
```

3. Advanced installation: after you have searched for the plugin you with to install, clicking on "Installation Info"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Advanced installation: after you have searched for the plugin you with to install, clicking on "Installation Info"
3. Advanced installation: after you have searched for the plugin you wish to install, clicking on "Installation Info"

Comment on lines 13 to 14
Similarly, the napari application lists plugins, annotated on PyPI with `Framework :: napari`,
in the `Plugins > Install/Uninstall Plugins` menu.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Similarly, the napari application lists plugins, annotated on PyPI with `Framework :: napari`,
in the `Plugins > Install/Uninstall Plugins` menu.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant with below section, but especially with testing_and_publish/deploy.md

(deploying-to-anaconda)=
## Deploying to Anaconda
(deploying-to-conda-forge)=
## Deploying to conda-forge
This is only a brief guide to deploying to `conda-forge`. More information can be found in the [conda-forge docs](https://conda-forge.org/docs/maintainer/adding_pkgs.html).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that in order to deploy to `conda-forge` *all* build and run requirements (i.e. dependencies) *must* be available on `conda-forge`.

@@ -102,7 +93,7 @@ This is only a brief guide to deploying to `conda-forge`. More information can b
4. Update the **meta.yaml** file to include your package's build and run requirements
5. Commit and open a PR to https://github.com/conda-forge/staged-recipes

Once your recipe is approved and merged, the rest happens *automagically*, and your package will appear on the anaconda cloud.
Once your recipe is approved and merged, the rest happens *automagically*, and your package will appear on the [conda-forge package list](https://conda-forge.org/packages/).

This is **far** easier if you already have an `sdist` published to PyPI.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is **far** easier if you already have an `sdist` published to PyPI.
This is **far** easier if you already have an `sdist` published to PyPI.
Updating your package on conda-forge: By default, when a new release is detected on PyPI, conda-forge bots will automatically make a pull requests to your `conda-forge/package-name-feedstock` and you must address any changes and approve the pull request.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style this better than I have, but I think this is really important to add

Copy link
Contributor

@TimMonko TimMonko Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. What comes to mind as missing is mention of how to upgrade plugins. I think, by default, a user working through npm has to uninstall and then reinstall the version they want. Is that correct? Is this the recommended way for most users?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new plugin manager should update plugins too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automagically? I remember there used to be an 'upgrade' button or something, but on main that doesn't seems to be the case -- just uninstall is available (the plugin here has v0.9.7 available through npm, I intentionally used npm to download v0.9.5):
image

napari: 0.5.6.dev10+g224f8e9c
Platform: Windows-11-10.0.22631-SP0
Python: 3.12.8 | packaged by conda-forge | (main, Dec 5 2024, 14:06:27) [MSC v.1942 64 bit (AMD64)]
Qt: 5.15.2
PyQt5: 5.15.11
NumPy: 1.26.4
SciPy: 1.14.1
Dask: 2024.12.1
VisPy: 0.14.3
magicgui: 0.10.0
superqt: 0.7.0
in-n-out: 0.2.1
app-model: 0.3.1
psygnal: 0.11.1
npe2: 0.7.7
pydantic: 2.10.4

OpenGL:
- GL version: 4.6.0 NVIDIA 551.78
- MAX_TEXTURE_SIZE: 32768
- GL_MAX_3D_TEXTURE_SIZE: 16384

Screens:
- screen 1: resolution 1920x1080, scale 2.0
- screen 2: resolution 1440x2560, scale 1.0

Optional:
- numba: 0.60.0
- triangle: 20230923
- napari-plugin-manager: 0.1.3

Settings path:
- C:\Users\timmo\AppData\Local\napari\napari-testing_e9e6cb9e948feb28aa4661b58255680aebaae620\settings.yaml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um it should work?
https://napari.org/napari-plugin-manager/index.html#updating-a-plugin
Maybe there's been a regression somewhere or it's another conda vs pip difference?

@TimMonko
Copy link
Contributor

Another thing that I've just come across is this little bugger that could go into the documentation (or get a PR to change the behavior):

Right now, when you install a plugin through npm, the little loading animation will keep going and going AND if you've clicked off napari, then you won't know that isn't what the issue is. Instead its... the little npe2 restart popup causing npm to hang as if it was still installing
image

Once this little popup is closed, the loading animation stops and everything looks normal. Even to me as a user with experience, I often forget that it is actually done installing the plugin when I'm helping users work through npm (because the animation continues)

@psobolewskiPhD
Copy link
Member

@TimMonko that sounds like a bug -- can you open an issue here https://github.com/napari/napari-plugin-manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
3 participants