Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30fcf6d

Browse files
committed
DOC: make users/explain a sphinx gallery [ci doc]
1 parent c630505 commit 30fcf6d

13 files changed

+11
-3
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ commands:
9797
- run:
9898
name: Install Python dependencies
9999
command: |
100+
# remove when sphinx-gallery releases #1071:
101+
python -m pip install --no-deps --user \
102+
git+https://github.com/sphinx-gallery/sphinx-gallery.git
100103
python -m pip install --no-deps --user \
101104
git+https://github.com/matplotlib/mpl-sphinx-theme.git
102105
python -m pip install --user \

doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ clean:
2222
rm -rf "$(SOURCEDIR)/gallery"
2323
rm -rf "$(SOURCEDIR)/plot_types"
2424
rm -rf "$(SOURCEDIR)/tutorials"
25+
rm -rf "$(SOURCEDIR)/users/explain"
2526
rm -rf "$(SOURCEDIR)/savefig"
2627
rm -rf "$(SOURCEDIR)/sphinxext/__pycache__"
2728
rm -f $(SOURCEDIR)/_static/constrained_layout*.png

doc/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,14 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
213213
gallery_conf['image_srcset'] = []
214214
return matplotlib_scraper(block, block_vars, gallery_conf, **kwargs)
215215

216-
gallery_dirs = [f'{ed}' for ed in ['gallery', 'tutorials', 'plot_types']
216+
gallery_dirs = [f'{ed}' for ed in
217+
['gallery', 'tutorials', 'plot_types', 'users/explain']
217218
if f'{ed}/*' not in skip_subdirs]
218219

219-
example_dirs = [f'../galleries/{gd}'.replace('gallery', 'examples')
220-
for gd in gallery_dirs]
220+
example_dirs = []
221+
for gd in gallery_dirs:
222+
gd = gd.replace('gallery', 'examples').replace('users/explain', 'users_explain')
223+
example_dirs += [f'../galleries/{gd}']
221224

222225
sphinx_gallery_conf = {
223226
'backreferences_dir': Path('api') / Path('_as_gen'),
@@ -244,6 +247,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
244247
'thumbnail_size': (320, 224),
245248
'within_subsection_order': gallery_order.subsectionorder,
246249
'capture_repr': (),
250+
'copyfile_regex': r'.*\.rst',
247251
}
248252

249253
if 'plot_gallery=0' in sys.argv:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)