Skip to content

Commit

Permalink
Merge pull request #330 from jcapriot/pyvista_config
Browse files Browse the repository at this point in the history
Configure pyvista for doc builds
  • Loading branch information
jcapriot authored Jul 13, 2023
2 parents d6eb086 + 16d87ea commit a230b12
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,30 @@ def linkcode_resolve(domain, info):
),
]


# Use pyvista's image scraper for example gallery
# -- pyvista configuration ---------------------------------------------------
import pyvista

# Make sure off screen is set to true when building locally
pyvista.OFF_SCREEN = True
# Manage errors
pyvista.set_error_output_file("errors.txt")
# Ensure that offscreen rendering is used for docs generation
pyvista.OFF_SCREEN = True # Not necessary - simply an insurance policy
# Preferred plotting style for documentation
pyvista.set_plot_theme("document")
pyvista.global_theme.window_size = [1024, 768]
pyvista.global_theme.font.size = 22
pyvista.global_theme.font.label_size = 22
pyvista.global_theme.font.title_size = 22
pyvista.global_theme.return_cpos = False
pyvista.set_jupyter_backend(None)
# Save figures in specified directory
pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/")
if not os.path.exists(pyvista.FIGURE_PATH):
os.makedirs(pyvista.FIGURE_PATH)


# necessary when building the sphinx gallery
pyvista.BUILDING_GALLERY = True
os.environ["PYVISTA_BUILDING_GALLERY"] = "true"

# Sphinx Gallery
sphinx_gallery_conf = {
Expand Down

0 comments on commit a230b12

Please sign in to comment.