forked from napari/napari-animation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from GenevieveBuckley/sphinx-docs
Sphinx docs
- Loading branch information
Showing
24 changed files
with
737 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build and Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
# Only allow one docs build at a time so that overlapping stale builds will get | ||
# cancelled automatically. | ||
concurrency: | ||
group: deploy_docs | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-deploy: | ||
name: Build & Deploy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # so we can write to github pages without a token | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- uses: tlambert03/setup-qt-libs@v1 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install "napari[all]" | ||
python -m pip install -e ".[doc]" | ||
- name: Build Docs | ||
uses: aganders3/headless-gui@v2 | ||
with: | ||
run: make docs | ||
|
||
- name: Deploy Docs | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
publish_dir: docs/_build | ||
publish_branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.PHONY: docs clean | ||
|
||
SPHINXOPTS = | ||
|
||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
current_dir := $(dir $(mkfile_path)) | ||
docs_dir := $(current_dir)docs | ||
|
||
clean: | ||
echo clean | ||
echo $(current_dir) | ||
rm -rf $(docs_dir)/_build/ | ||
rm -rf $(docs_dir)/gallery/* | ||
|
||
docs-build: | ||
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b html docs/ docs/_build $(SPHINXOPTS) | ||
|
||
docs-xvfb: | ||
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -b html docs/ docs/_build $(SPHINXOPTS) | ||
|
||
docs: clean docs-build | ||
|
||
# Implies noplot, but no clean - call 'make clean' manually if needed | ||
# Autogenerated paths need to be ignored to prevent reload loops | ||
html-live: | ||
NAPARI_APPLICATION_IPY_INTERACTIVE=0 \ | ||
sphinx-autobuild \ | ||
-b html \ | ||
docs/ \ | ||
docs/_build \ | ||
-D plot_gallery=0 \ | ||
--ignore $(docs_dir)"/gallery/*" \ | ||
--ignore $(docs_dir)"/jupyter_execute/*" \ | ||
--open-browser \ | ||
--port=0 \ | ||
$(SPHINXOPTS) | ||
|
||
html-noplot: clean | ||
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -D plot_gallery=0 -b html docs/ docs/_build $(SPHINXOPTS) | ||
|
||
linkcheck-files: | ||
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b linkcheck -D plot_gallery=0 --color docs/ docs/_build ${FILES} $(SPHINXOPTS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- A small template snippet for theme testing --> | ||
<a class="navbar-brand" href="{{ pathto(master_doc) }}"> | ||
napari-animation | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
root: index | ||
subtrees: | ||
- entries: | ||
- file: gallery | ||
- file: developers/contributing |
Oops, something went wrong.