Skip to content

Add admonition to gallery examples that require additional packages#1024

Open
TimMonko wants to merge 13 commits into
napari:mainfrom
TimMonko:gallery-deps
Open

Add admonition to gallery examples that require additional packages#1024
TimMonko wants to merge 13 commits into
napari:mainfrom
TimMonko:gallery-deps

Conversation

@TimMonko
Copy link
Copy Markdown
Contributor

@TimMonko TimMonko commented May 19, 2026

References and relevant issues

Similar reasoning as #1021. When doing drag and drop from the gallery and now that examples are growing in their complexity and dependencies, it's important for us to warn users that they may not have all the dependencies to run the example. It's especially important now that we feature homepage examples that do not have typical napari dependencies

Built on #1021 (and #1026). two-dot diff https://github.com/TimMonko/docs/compare/gallery-links..TimMonko:docs:gallery-deps

Description

This adds an admonition if examples require dependencies not in "typical" napari installs (bundle, napari[all]). It identifies the missing dependencie(s) adds to the instructions, and links to other resources to install.

This uses mostly llm generated logic to compare napari[gallery] dependencies against napari[all] dependencies. It requires extra logic because we build against a remote, so we can't just special case anything in napari[gallery].

Note that pooch is not a direct dependency of napari (it comes from skimage[data] for the sample data), I had to special case ignore it.

Updated PR:

image

Original PR look:
image

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 19, 2026
@TimMonko TimMonko marked this pull request as ready for review May 20, 2026 20:32
@TimMonko TimMonko added this to the 0.7.1 milestone May 21, 2026
Comment thread docs/conf.py Outdated
napari installations.
For this example to work in :doc:`recommended napari installations <{NAPARI_INSTALL_GUIDE}>`,
you will need to install additional packages: {deps}.
See the :doc:`the plugin installation guide <{PLUGIN_INSTALL_GUIDE}>`
Copy link
Copy Markdown
Contributor

@DragaDoncila DragaDoncila May 21, 2026

Choose a reason for hiding this comment

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

Discussed at docs meeting, we think this might still be confusing for users because the "plugin installation guide" doesn't really talk about additional/other non-plugin packages, so it may not be clear that you can install them the same way as plugins.

Let's add a short section to the bottom of the finding-and-installing-plugins guide that says how you can install additional packages via the plugin manager (even if it's a bit redundant with the plugins bit). Then link to that from here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, linking the plugin install guide feels off.
I think we'd want a page in the plugin manager docs on using the plugin installer to install arbitrary packages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I made napari/napari-plugin-manager#213 to address this and point the link now to that resource

@psobolewskiPhD
Copy link
Copy Markdown
Member

I noted this in the other PR too, but I really think this should be below the description.
I dislike how this distracts from the actual example!

Maybe the proper order is:
title
description
image
link buttons
code
?

@Czaki
Copy link
Copy Markdown
Contributor

Czaki commented May 26, 2026

I remove it form milestone. If you gen into conclusion, it might still get into release

@Czaki Czaki removed this from the 0.7.1 milestone May 26, 2026
@TimMonko
Copy link
Copy Markdown
Contributor Author

TimMonko commented May 27, 2026

Moved it below description like in #1021, and updated the admonition to address the comments. Hopefully this is favorable now! I would really like to see this in 0.7.1 :)

image

@TimMonko TimMonko added this to the 0.7.1 milestone May 27, 2026
@psobolewskiPhD
Copy link
Copy Markdown
Member

The screenshot posted above looks a lot better to me.
Thanks!
I also approved the napari-plugin-manager PR.

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

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants