From e57c154e5cd429efbc6d766f50946c1c615af198 Mon Sep 17 00:00:00 2001 From: xuefei-wang Date: Wed, 5 Aug 2026 15:44:13 -0700 Subject: [PATCH] docs(tutorial): restore the napari screenshot + result images The v0.1.0 monorepo merge replaced both napari screenshot cells and the two embedded result images with the prose "Static documentation builds do not execute or embed GUI screenshots." The tutorial's two visual payoffs -- the multiplexed image with the CellSAM segmentation overlaid, and the per-cell-type label layers -- therefore vanished from the rendered page, leaving the "Visualizing results" sections with no output at all. The premise was wrong: napari renders headlessly under Xvfb + llvmpipe, which is how the currently-deployed site was built -- it still serves both _static/_generated/*.png. Restore the two `hide-cell` screenshot cells and the embeds so the repo source matches the build that actually works. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Qvo32Wvq8EHyA9jmFCXuXi --- docs/site/tutorial.md | 45 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/docs/site/tutorial.md b/docs/site/tutorial.md index dfa7a19..ef0a516 100644 --- a/docs/site/tutorial.md +++ b/docs/site/tutorial.md @@ -247,8 +247,26 @@ mask_lyr = nim.add_labels(mask, name="CellSAM segmentation") mask_lyr.contour = 3 # Relatively thick borders for static viz ``` -The image and segmentation layers appear directly in the interactive Napari -viewer. Static documentation builds do not execute or embed GUI screenshots. +```{code-cell} ipython3 +:tags: [hide-cell] + +# For static rendering - can safely be ignored if running notebook interactively +from pathlib import Path + +screenshot_path = Path("../_static/_generated") +screenshot_path.mkdir(parents=True, exist_ok=True) +nim.screenshot( + path=screenshot_path / "napari_img_and_segmentation.png", + canvas_only=False, +); +``` + +
+ Napari window of multiplexed image and computed segmentation mask +
### Cell-type inference with `deepcell-types` @@ -401,9 +419,26 @@ for k, l in labels_by_celltype.items(): ) ``` -When running interactively, the new label layers appear directly in the Napari -viewer and can be toggled independently. Static documentation builds do not -execute or embed GUI screenshots. +```{code-cell} ipython3 +:tags: [hide-cell] + +# For static rendering - can safely be ignored if running notebook interactively +from pathlib import Path + +screenshot_path = Path("../_static/_generated") +screenshot_path.mkdir(parents=True, exist_ok=True) +nim.screenshot( + path=screenshot_path / "napari_celltype_layers.png", + canvas_only=False, +); +``` + +
+ Napari window of multiplexed image with celltype predictions +
[hubmap-data-portal]: https://portal.hubmapconsortium.org/search/datasets [zarr]: https://zarr.readthedocs.io/en/stable/