10000 Merge pull request #23514 from tacaswell/fix_doc_build · matplotlib/matplotlib@e7c5290 · GitHub
[go: up one dir, main page]

Skip to content

Commit e7c5290

Browse files
authored
Merge pull request #23514 from tacaswell/fix_doc_build
Fix doc build
2 parents 3c748ff + 5ff9f55 commit e7c5290

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
@@ -172,25 +172,28 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
172172

173173

174174
sphinx_gallery_conf = {
175+
'backreferences_dir': Path('api') / Path('_as_gen'),
176+
# Compression is a significant effort that we skip for local and CI builds.
177+
'compress_images': ('thumbnails', 'images') if is_release_build else (),
178+
'doc_module': ('matplotlib', 'mpl_toolkits'),
175179
'examples_dirs': ['../examples', '../tutorials', '../plot_types'],
176180
'filename_pattern': '^((?!sgskip).)*$',
177181
'gallery_dirs': ['gallery', 'tutorials', 'plot_types'],
178-
'doc_module': ('matplotlib', 'mpl_toolkits'),
179-
'reference_url': {
180-
'matplotlib': None,
181-
},
182-
'backreferences_dir': Path('api') / Path('_as_gen'),
183-
'subsection_order': gallery_order.sectionorder,
184-
'within_subsection_order': gallery_order.subsectionorder,
185-
'remove_config_comments': True,
186-
'min_reported_time': 1,
187-
'thumbnail_size': (320, 224),
188182
'image_scrapers': (matplotlib_reduced_latex_scraper, ),
189-
# Compression is a significant effort that we skip for local and CI builds.
190-
'compress_images': ('thumbnails', 'images') if is_release_build else (),
191-
'matplotlib_animations': True,
192183
'image_srcset': ["2x"],
193184
'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
185+
'matplotlib_animations': True,
186+
'min_reported_time': 1,
187+
'reference_url': {'matplotlib': None},
188+
'remove_config_comments': True,
189+
'reset_modules': (
190+
'matplotlib',
191+
# clear basic_units module to re-register with unit registry on import
192+
lambda gallery_conf, fname: sys.modules.pop('basic_units', None)
193+
),
194+
'subsection_order': gallery_order.sectionorder,
195+
'thumbnail_size': (320, 224),
196+
'within_subsection_order': gallery_order.subsectionorder,
194197
}
195198

196199
mathmpl_fontsize = 11.0

0 commit comments

Comments
 (0)
0