Skip to content

Commit

Permalink
Merge branch 'main' into psobolewskiPhD-patch-8
Browse files Browse the repository at this point in the history
  • Loading branch information
psobolewskiPhD authored May 31, 2024
2 parents 2076e50 + 21b8aa6 commit 21582ca
Show file tree
Hide file tree
Showing 110 changed files with 1,564 additions and 623 deletions.
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/
path: docs/docs/_build/html/
- persist_to_workspace:
root: .
paths:
- docs/docs/_build/
- docs/docs/_build/html/
workflows:
build-docs:
jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# As much as possible, this file should be kept in sync with
# https://github.com/napari/napari/blob/main/.github/workflows/build_docs.yml
name: Build PR Docs
#
# Note this workflow is also triggered by
# https://github.com/napari/napari/blob/main/.github/workflows/deploy_docs.yml when a
# commit to `main` occurs in `napari/napari`

name: Build & Deploy PR Docs

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
Expand All @@ -20,21 +30,23 @@ jobs:
- name: Clone docs repo
uses: actions/checkout@v4
with:
# place in '/home/runner/work/docs/docs/docs'
path: docs # place in a named directory

- name: Clone main repo
uses: actions/checkout@v4
with:
# place in '/home/runner/work/docs/docs/napari'
path: napari # place in a named directory
repository: napari/napari
# ensure version metadata is proper
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache-dependency-path: |
napari/setup.cfg
napari/pyproject.toml
docs/requirements.txt
- uses: tlambert03/setup-qt-libs@v1
Expand All @@ -51,13 +63,21 @@ jobs:
python -c 'import napari; print(napari.__version__)'
python -c 'import napari.layers; print(napari.layers.__doc__)'
- name: Create fallback videos
run: |
sudo apt-get update && sudo apt-get install -y ffmpeg
cd docs
make fallback-videos
- name: Build Docs
uses: aganders3/headless-gui@v2
env:
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }}
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
with:
# Runs in '/home/runner/work/docs/docs/docs'
# Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html'
run: make -C docs docs
# skipping setup stops the action from running the default (tiling) window manager
# the window manager is not necessary for docs builds at this time and it was causing
Expand All @@ -66,7 +86,40 @@ jobs:
linux-teardown: "echo 'skip teardown'"

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html
path: docs/docs/_build/html/

deploy:
name: Download & Deploy Artifact
needs: build-and-upload
runs-on: ubuntu-latest
# Working directory: '/home/runner/work/docs/docs'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: html
# Downloads to '/home/runner/work/docs/docs/html'
path: html

- name: get directory name
# if this is a tag, use the tag name as the directory name else dev
run: |
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
echo "branch_name=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "branch_name=dev" >> $GITHUB_ENV
fi
- name: Deploy Docs
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main'))
uses: peaceiris/actions-gh-pages@v3
with:
name: docs
path: docs/docs/_build
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: napari/napari.github.io
publish_dir: ./html
publish_branch: gh-pages
destination_dir: ${{ env.branch_name }}
cname: napari.org
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/index.html
artifact-path: 0/docs/docs/_build/html/index.html
circleci-jobs: build-docs
job-title: Check the rendered docs here!
79 changes: 0 additions & 79 deletions .github/workflows/deploy_docs.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/edit_pr_description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Remove html In PR description
on:
# see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
pull_request_target:
types:
- opened
- synchronize
- reopened
- edited
permissions:
pull-requests: write

jobs:
remove_comment:
name: Remove html comments.
uses: napari/napari/.github/workflows/edit_pr_description.yml@main
15 changes: 15 additions & 0 deletions .github/workflows/remove_ready_to_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Remove "ready to merge" label

on:
pull_request_target:
types: [closed]
workflow_call:


permissions:
pull-requests: write

jobs:
remove_label:
name: Remove ready to merge label
uses: napari/napari/.github/workflows/remove_ready_to_merge.yml@main
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,6 @@ docs/sg_execution_times.rst
# come from npe2 docs
docs/plugins/_npe2_*.md
npe2/

# autogenerated fallback videos
docs/_static/images/*.mp4
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ prep-docs:
python $(docs_dir)/_scripts/prep_docs.py

docs-build: prep-docs
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b 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/ docs/_build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)

docs-xvfb: prep-docs
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -b 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/ docs/_build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)

docs: clean docs-install docs-build

Expand All @@ -55,7 +55,19 @@ html-live: prep-docs
$(SPHINXOPTS)

html-noplot: clean prep-docs
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -D plot_gallery=0 -b html docs/ docs/_build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) $(SPHINXOPTS)
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)

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)

fallback-videos:
for video in $(basename $(wildcard docs/_static/images/*.webm)); do \
if [ -a $$video.mp4 ]; then \
echo "skipping $$video.mp4"; \
continue; \
fi; \
ffmpeg -i $$video.webm -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 128k -strict -2 -y $$video.mp4; \
done

fallback-videos-clean:
rm -f docs/_static/images/*.mp4
Binary file added docs/_static/images/LLSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/brain_surface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/dask1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/dask2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/delete_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/draw_component.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/editing_points.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/editing_shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/manual_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/merge_labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/mitosis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/nD_shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/nD_vectors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/pathology.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/point_annotator_demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/scaling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/shape_resizing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/shape_vertex_editing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/shape_vertex_editing.webm
Binary file not shown.
Binary file added docs/_static/images/smFISH.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/split_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/tracks_3d_t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/tracks_color_by.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/tracks_isbi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/tracks_simple_demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/tracks_tail_length.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/_static/images/tracks_tail_width.png
File renamed without changes.
Binary file removed docs/_static/images/tribolium.mp4
Binary file not shown.
Binary file added docs/_static/images/viewer_pan_zoom.png
File renamed without changes.
7 changes: 4 additions & 3 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
.. autoclass:: {{ objname }}
:members:
:show-inheritance:
{% if objname != "progress" %}
:inherited-members:
{% endif %}
{#- These classes inherit docstrings from the raw qt source, which generates rst syntax errors when building the docs #}
{% if objname not in ["progress", "cancelable_progress"] -%}
:inherited-members:
{%- endif %}

{% block methods %}

Expand Down
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ subtrees:
- 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
Expand Down
1 change: 1 addition & 0 deletions docs/api/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For the average user's workflows.
napari.types
napari.utils
napari.window
napari.utils.transforms

.. rubric:: Advanced

Expand Down
2 changes: 1 addition & 1 deletion docs/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ Read more about napari’s [mission and values](https://napari.org/community/mis
- The CZI Imaging Tech Team, through an effort led by Justin Kiggins, has created [napari-hub.org](https://www.napari-hub.org/), a site to make discovering and sharing napari plugins easier.
- CZI has launched a [grant program](https://chanzuckerberg.com/rfa/napari-plugin-grants/) to help accelerate the napari plugin developer community.

The current representative of the Insitutional and Funding Partner Advisory Council on the napari steering council is Nicholas Sofroniew.
The current representative of the Insitutional and Funding Partner Advisory Council on the napari steering council is Kyle I. S. Harrington.

If you or your organization are interested in also supporting the napari project and becoming an Institutional and Funding Partner, please email the napari steering council at `[email protected]`.
Loading

0 comments on commit 21582ca

Please sign in to comment.