Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 99d4b70

Browse filesBrowse files
QuLogicmeeseeksmachine
authored andcommitted
Backport PR #23514: Fix doc build
1 parent e9bdbc3 commit 99d4b70
Copy full SHA for 99d4b70

File tree

Expand file treeCollapse file tree

1 file changed

+16
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-13
lines changed

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+16-13Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,28 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
183183

184184

185185
sphinx_gallery_conf = {
186+
'backreferences_dir': Path('api') / Path('_as_gen'),
187+
# Compression is a significant effort that we skip for local and CI builds.
188+
'compress_images': ('thumbnails', 'images') if is_release_build else (),
189+
'doc_module': ('matplotlib', 'mpl_toolkits'),
186190
'examples_dirs': ['../examples', '../tutorials', '../plot_types'],
187191
'filename_pattern': '^((?!sgskip).)*$',
188192
'gallery_dirs': ['gallery', 'tutorials', 'plot_types'],
189-
'doc_module': ('matplotlib', 'mpl_toolkits'),
190-
'reference_url': {
191-
'matplotlib': None,
192-
},
193-
'backreferences_dir': Path('api') / Path('_as_gen'),
194-
'subsection_order': gallery_order.sectionorder,
195-
'within_subsection_order': gallery_order.subsectionorder,
196-
'remove_config_comments': True,
197-
'min_reported_time': 1,
198-
'thumbnail_size': (320, 224),
199193
'image_scrapers': (matplotlib_reduced_latex_scraper, ),
200-
# Compression is a significant effort that we skip for local and CI builds.
201-
'compress_images': ('thumbnails', 'images') if is_release_build else (),
202-
'matplotlib_animations': True,
203194
'image_srcset': ["2x"],
204195
'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
196+
'matplotlib_animations': True,
197+
'min_reported_time': 1,
198+
'reference_url': {'matplotlib': None},
199+
'remove_config_comments': True,
200+
'reset_modules': (
201+
'matplotlib',
202+
# clear basic_units module to re-register with unit registry on import
203+
lambda gallery_conf, fname: sys.modules.pop('basic_units', None)
204+
),
205+
'subsection_order': gallery_order.sectionorder,
206+
'thumbnail_size': (320, 224),
207+
'within_subsection_order': gallery_order.subsectionorder,
205208
}
206209

207210
mathmpl_fontsize = 11.0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.