Skip to content

Commit

Permalink
Make examples dynamic (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan authored Jan 1, 2024
1 parent dd6fb9a commit bd2959c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Spin up a local http server to view the rendered documentation.
# This is required for interactive examples to work.
serve-html:
@echo "Serving documentation at http://localhost:11000"
@python -m http.server 11000 --directory "$(BUILDDIR)"/html
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ sphinx-autobuild
sphinx-rtd-theme
sphinxcontrib-websupport
sphinx-copybutton
sphinx-design
sphinx-gallery
sphinx-notfound-page>=0.3.0
trame
trame-vtk
trame-vuetify
6 changes: 5 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
)

import pyvista
from pyvista.plotting.utilities.sphinx_gallery import DynamicScraper

# Manage errors
pyvista.set_error_output_file('errors.txt')
Expand Down Expand Up @@ -128,8 +129,11 @@
'sphinx.ext.extlinks',
'sphinx.ext.napoleon',
'sphinx_copybutton',
'sphinx_design',
'sphinx_gallery.gen_gallery',
'notfound.extension',
'pyvista.ext.plot_directive',
'pyvista.ext.viewer_directive',
]

linkcheck_retries = 3
Expand Down Expand Up @@ -324,7 +328,7 @@
"backreferences_dir": None,
# Modules for which function level galleries are created. In
"doc_module": "PVGeo",
"image_scrapers": (pyvista.Scraper(), 'matplotlib'),
"image_scrapers": (DynamicScraper(), 'matplotlib'),
"thumbnail_size": (350, 350),
# 'default_thumb_file': thumb_path,
}
Expand Down

0 comments on commit bd2959c

Please sign in to comment.