Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
environment:
PIP_CONSTRAINT: ../napari/resources/constraints/constraints_py3.10_docs.txt
- store_artifacts:
path: docs/docs/_build/html/
path: docs/_build/html/
- persist_to_workspace:
root: .
paths:
- docs/docs/_build/html/
- docs/_build/html/
workflows:
build-docs:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: html
path: docs/docs/_build/html/
path: docs/_build/html/

deploy:
name: Download & Deploy Artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLECI_TOKEN }}
artifact-path: 0/docs/docs/_build/html/index.html
artifact-path: 0/docs/_build/html/index.html
circleci-jobs: build-docs
job-title: Check the rendered docs here!
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ napari/view_layers.pyi
napari/components/viewer_model.pyi

# Sphinx documentation
docs/_build
_build
docs/_tags/
docs/api/napari*
docs/gallery/
Expand All @@ -148,8 +148,8 @@ docs/guides/_layer_events.md
docs/guides/_layerlist_events.md
docs/guides/_viewer_events.md
docs/images/_autogenerated/
docs/jupyter_execute/
docs/sg_execution_times.rst
jupyter_execute

# come from npe2 docs
docs/plugins/_npe2_*.md
Expand Down
36 changes: 29 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ docs_dir := $(current_dir)docs
clean:
echo clean
echo $(current_dir)
rm -rf $(docs_dir)/_build/
rm -rf _build/
rm -rf $(docs_dir)/api/napari*.rst
rm -rf $(docs_dir)/gallery/*
rm -rf $(docs_dir)/_tags
Expand All @@ -27,18 +27,35 @@ docs-install:
prep-docs:
python $(docs_dir)/_scripts/prep_docs.py

organize-docs:
mv _build/unversioned/html/*.html _build/html/
mv _build/unversioned/html/developers _build/html/
mv _build/unversioned/html/naps _build/html/
mv _build/unversioned/html/release _build/html/
mv _build/unversioned/html/roadmaps _build/html/
mv _build/unversioned/html/objects.inv _build/html/dev_objects.inv

docs-build: prep-docs
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -M html docs/ docs/_build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -M html docs/ _build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
mv _build/html/objects.inv _build/napari_objects.inv
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -M html unversioned/ _build/unversioned $(SPHINXOPTS)
mv _build/napari_objects.inv _build/html/objects.inv
$(MAKE) organize-docs

docs-xvfb: prep-docs
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -M html docs/ docs/_build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -M html docs/ _build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
mv _build/html/objects.inv _build/napari_objects.inv
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -M html unversioned/ _build/unversioned $(SPHINXOPTS)
mv _build/napari_objects.inv _build/html/objects.inv
$(MAKE) organize-docs

docs: clean docs-install docs-build

html: clean docs-build

# Implies noplot, but no clean - call 'make clean' manually if needed
# Autogenerated paths need to be ignored to prevent reload loops
# TODO: Fix this to work with two folders
html-live: prep-docs
NAPARI_APPLICATION_IPY_INTERACTIVE=0 \
sphinx-autobuild \
Expand All @@ -56,13 +73,18 @@ html-live: prep-docs
$(SPHINXOPTS)

html-noplot: clean prep-docs
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -M html docs/ docs/_build -D plot_gallery=0 -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -M html docs/ _build -D plot_gallery=0 -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
mv _build/html/objects.inv _build/napari_objects.inv
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -M html unversioned/ _build $(SPHINXOPTS)
mv _build/napari_objects.inv _build/html/objects.inv
$(MAKE) organize-docs

linkcheck-files:
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b linkcheck -D plot_gallery=0 --color docs/ docs/_build ${FILES} -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b linkcheck -D plot_gallery=0 --color docs/ _build/html ${FILES} -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b linkcheck --color unversioned/ _build/unversioned/html ${FILES} $(SPHINXOPTS)

fallback-videos:
for video in $(basename $(wildcard docs/_static/images/*.webm)); do \
for video in $(basename $(wildcard _static/images/*.webm)); do \
if [ -a $$video.mp4 ]; then \
echo "skipping $$video.mp4"; \
continue; \
Expand All @@ -71,4 +93,4 @@ fallback-videos:
done

fallback-videos-clean:
rm -f docs/_static/images/*.mp4
rm -f _static/images/*.mp4
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
102 changes: 2 additions & 100 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
root: index
subtrees:
- entries:
- file: usage
- file: usage/index
subtrees:
- titlesonly: True
entries:
Expand Down Expand Up @@ -132,105 +132,7 @@ subtrees:
- file: community/working_groups
- file: community/meeting_schedule
- file: community/licensing
- file: developers/index
subtrees:
- entries:
- file: developers/contributing/index
subtrees:
- entries:
- file: developers/contributing/dev_install
- file: developers/contributing/testing
- file: developers/contributing/translations
- file: developers/contributing/performance/index
subtrees:
- entries:
- file: developers/contributing/performance/profiling
- file: developers/contributing/performance/benchmarks
- file: developers/contributing/documentation/index
subtrees:
- entries:
- file: developers/contributing/documentation/docs_template
- file: developers/contributing/documentation/docs_deployment
- file: developers/coredev/core_dev_guide
subtrees:
- entries:
- file: developers/coredev/maintenance
- file: developers/coredev/release
- file: developers/coredev/packaging
- file: developers/architecture/index
subtrees:
- entries:
- file: developers/architecture/dir_organization
- file: developers/architecture/napari_models
- file: developers/architecture/app_model
- file: developers/architecture/magicgui_type_reg
- file: naps/index
subtrees:
- maxdepth: 1
entries:
- file: naps/0-nap-process
- file: naps/1-institutional-funding-partners
- file: naps/2-conda-based-packaging
- file: naps/3-spaces
- file: naps/4-async-slicing
- file: naps/5-new-logo
- file: naps/6-contributable-menus
- file: naps/7-key-binding-dispatch
- file: naps/8-telemetry
- file: naps/9-multiple-canvases
- file: release/index
subtrees:
- entries:
- file: release/release_0_4_19
- file: release/release_0_4_18
- file: release/release_0_4_17
- file: release/release_0_4_16
- file: release/release_0_4_15
- file: release/release_0_4_14
- file: release/release_0_4_13
- file: release/release_0_4_12
- file: release/release_0_4_11
- file: release/release_0_4_10
- file: release/release_0_4_9
- file: release/release_0_4_8
- file: release/release_0_4_7
- file: release/release_0_4_6
- file: release/release_0_4_5
- file: release/release_0_4_4
- file: release/release_0_4_3
- file: release/release_0_4_2
- file: release/release_0_4_1
- file: release/release_0_4_0
- file: release/release_0_3_8
- file: release/release_0_3_7
- file: release/release_0_3_6
- file: release/release_0_3_5
- file: release/release_0_3_4
- file: release/release_0_3_3
- file: release/release_0_3_2
- file: release/release_0_3_1
- file: release/release_0_3_0
- file: release/release_0_2_12
- file: release/release_0_2_11
- file: release/release_0_2_10
- file: release/release_0_2_9
- file: release/release_0_2_8
- file: release/release_0_2_7
- file: release/release_0_2_6
- file: release/release_0_2_5
- file: release/release_0_2_4
- file: release/release_0_2_3
- file: release/release_0_2_1
- file: release/release_0_2_0
- file: release/release_0_1_5
- file: release/release_0_1_3
- file: release/release_0_1_0
- file: roadmaps/index
subtrees:
- entries:
- file: roadmaps/0_4
- file: roadmaps/0_3_retrospective
- file: roadmaps/0_3
- file: developers
- file: api/index
subtrees:
- titlesonly: True
Expand Down
16 changes: 10 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@
"navbar_persistent": [],
"header_links_before_dropdown": 6,
"secondary_sidebar_items": ["page-toc"],
"pygment_light_style": "napari",
"pygment_dark_style": "napari",
"pygments_light_style": "napari",
"pygments_dark_style": "napari",
"announcement": "https://napari.org/dev/_static/announcement.html",
"back_to_top_button": False,
}
Expand All @@ -125,8 +125,8 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_logo = "images/logo.png"
html_static_path = ['../_static']
html_logo = "../_static/images/logo.png"
html_sourcelink_suffix = ''
html_title = 'napari'

Expand Down Expand Up @@ -171,6 +171,10 @@
'http://app-model.readthedocs.io/en/latest/',
'http://app-model.readthedocs.io/en/latest/objects.inv',
],
'napari-dev': ( # for napari unversioned pages/development docs
'https://melissawm.github.io',
(None, '../unversioned/dev_objects.inv')
)
}

myst_enable_extensions = [
Expand Down Expand Up @@ -221,7 +225,7 @@ def get_supported_python_versions(project_name):
suppress_warnings = ['myst.header', 'etoc.toctree']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ['../_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -288,7 +292,7 @@ def napari_scraper(block, block_vars, gallery_conf):
'gallery_dirs': 'gallery', # path to where to save gallery generated output
'filename_pattern': '/*.py',
'ignore_pattern': 'README.rst|/*_.py',
'default_thumb_file': Path(__file__).parent / 'images' / 'logo.png',
'default_thumb_file': Path(__file__).parent.parent / '_static' / 'images' / 'logo.png',
'plot_gallery': "'True'", # https://github.com/sphinx-gallery/sphinx-gallery/pull/304/files
'download_all_examples': False,
'min_reported_time': 10,
Expand Down
3 changes: 3 additions & 0 deletions docs/developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<meta http-equiv=refresh content="0;url=./developers/index.html">

# Contributing
30 changes: 15 additions & 15 deletions docs/howtos/layers/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ layer:

Use this tool to manually erase a label on the `labels layer`. Other layers
will not be affected. The label eraser tool looks like this:
![image: eraser tool](../../images/labels-layer-eraser.png)
![image: eraser tool](../../../_static/images/labels-layer-eraser.png)

* **Paintbrush**

Expand Down Expand Up @@ -306,9 +306,9 @@ common editing tasks on connected components (keep the `contiguous` box checked)
```{raw} html
<figure>
<video width="100%" controls autoplay loop muted playsinline>
<source src="../../_static/images/draw_component.webm" type="video/webm" />
<source src="../../_static/images/draw_component.mp4" type="video/mp4" />
<img src="../../_static/images/draw_component.png"
<source src="../../../_static/images/draw_component.webm" type="video/webm" />
<source src="../../../_static/images/draw_component.mp4" type="video/mp4" />
<img src="../../../_static/images/draw_component.png"
title="Your browser does not support the video tag"
alt="Using the paintbrush and fill bucket tools to draw a connected component."
>
Expand All @@ -326,9 +326,9 @@ common editing tasks on connected components (keep the `contiguous` box checked)
```{raw} html
<figure>
<video width="100%" controls autoplay loop muted playsinline>
<source src="../../_static/images/delete_label.webm" type="video/webm" />
<source src="../../_static/images/delete_label.mp4" type="video/mp4" />
<img src="../../_static/images/delete_label.png"
<source src="../../../_static/images/delete_label.webm" type="video/webm" />
<source src="../../../_static/images/delete_label.mp4" type="video/mp4" />
<img src="../../../_static/images/delete_label.png"
title="Your browser does not support the video tag"
alt="Deleting selected labels."
>
Expand All @@ -345,9 +345,9 @@ common editing tasks on connected components (keep the `contiguous` box checked)
```{raw} html
<figure>
<video width="100%" controls autoplay loop muted playsinline>
<source src="../../_static/images/merge_labels.webm" type="video/webm" />
<source src="../../_static/images/merge_labels.mp4" type="video/mp4" />
<img src="../../_static/images/merge_labels.png"
<source src="../../../_static/images/merge_labels.webm" type="video/webm" />
<source src="../../../_static/images/merge_labels.mp4" type="video/mp4" />
<img src="../../../_static/images/merge_labels.png"
title="Your browser does not support the video tag"
alt="Selecting a label and merging with a connecting label."
>
Expand All @@ -362,9 +362,9 @@ common editing tasks on connected components (keep the `contiguous` box checked)
```{raw} html
<figure>
<video width="100%" controls autoplay loop muted playsinline>
<source src="../../_static/images/split_label.webm" type="video/webm" />
<source src="../../_static/images/split_label.mp4" type="video/mp4" />
<img src="../../_static/images/split_label.png"
<source src="../../../_static/images/split_label.webm" type="video/webm" />
<source src="../../../_static/images/split_label.mp4" type="video/mp4" />
<img src="../../../_static/images/split_label.png"
title="Your browser does not support the video tag"
alt="Using the paintbrush tool to split a label into two."
>
Expand Down Expand Up @@ -501,8 +501,8 @@ where the data is represented as a multiscale image is not editable.

All layers can be rendered in both 2D and 3D. One of the viewer buttons at the
bottom of the left panel can toggle between these 2 modes.
When in 2D, the button looks like this: ![image: 2D/3D button](../../images/3D-button.png), ready to switch to 3D mode.
When in 3D, the button looks like this: ![image: 2D/3D button](../../images/2D-button.png), ready to switch to 2D mode.
When in 2D, the button looks like this: ![image: 2D/3D button](../../../_static/images/3D-button.png), ready to switch to 3D mode.
When in 3D, the button looks like this: ![image: 2D/3D button](../../../_static/images/2D-button.png), ready to switch to 2D mode.

The number of dimensions sliders will be 2 or 3 less than the total number of
dimensions of the layer, allowing you to browse volumetric timeseries data and
Expand Down
Loading