Skip to content

Commit 8640aa4

Browse files
Update recipes-docs conf.py esp. to separate source & gallery
1 parent 6926312 commit 8640aa4

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

recipes-docs/source/conf.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import faulthandler
12
import os
23
import sys
34

45
from sphinx_gallery.sorting import FileNameSortKey
56

7+
faulthandler.enable() # seg fault detection - as recipes prone to seg faulting
8+
69
# Make main 'docs' conf.py importable
710
sys.path.insert(0, os.path.abspath("../../docs/source"))
811

@@ -19,8 +22,9 @@
1922

2023
# sphinx-gallery configuration
2124
sphinx_gallery_conf = {
22-
"examples_dirs": "recipes", # path to recipe files
25+
"examples_dirs": "recipes-source", # path to recipe files
2326
"gallery_dirs": "recipes", # path to save gallery generated output
27+
"ignore_pattern": "/exclusions/",
2428
"run_stale_examples": False,
2529
# Below setting can be buggy: see:
2630
# https://github.com/sphinx-gallery/sphinx-gallery/issues/967
@@ -29,15 +33,22 @@
2933
"doc_module": ("cf",),
3034
"inspect_global_variables": True,
3135
"within_subsection_order": FileNameSortKey,
32-
"default_thumb_file": "_static/cf-recipe-placeholder-squarecrop.png",
36+
"default_thumb_file": "../../docs/source/_static/cf-recipe-placeholder-squarecrop.png",
3337
"image_scrapers": (
3438
"matplotlib",
3539
), # Ensures Matplotlib images are captured
3640
"plot_gallery": True, # Enables plot rendering
3741
"reset_modules": ("matplotlib",), # Helps with memory management
3842
"capture_repr": (),
43+
# "filename_pattern": r"plot",
3944
}
4045

46+
exclude_patterns = [
47+
"exclusions/**",
48+
]
49+
4150
html_static_path = ["../../docs/source/_static"]
4251
html_logo = "../../docs/source/images/logo.svg"
4352
html_favicon = "../../docs/source/_static/favicon.ico"
53+
54+
templates_path = ["../../docs/_templates"]

0 commit comments

Comments
 (0)