Skip to content

Commit fabd295

Browse files
authored
Merge pull request #23518 from meeseeksmachine/auto-backport-of-pr-23514-on-v3.5.x
Backport PR #23514 on branch v3.5.x (Fix doc build)
2 parents e9bdbc3 + 99d4b70 commit fabd295

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

doc/conf.py

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy