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

Skip to content

Commit 3c4acfe

Browse files
committed
DOC: make users/explain a sphinx gallery [ci doc]
1 parent 7fcc80a commit 3c4acfe

13 files changed

+11
-2
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/jklymak/sphinx-gallery.git@fix-indentation
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +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}' for gd in gallery_dirs]
220+
example_dirs = [f'../galleries/{gd}'.replace('users/explain', 'users_explain')
221+
for gd in gallery_dirs]
222+
223+
220224

221225
sphinx_gallery_conf = {
222226
'backreferences_dir': Path('api') / Path('_as_gen'),
@@ -243,6 +247,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
243247
'thumbnail_size': (320, 224),
244248
'within_subsection_order': gallery_order.subsectionorder,
245249
'capture_repr': (),
250+
'copyfile_regex': r'.*\.rst',
246251
}
247252

248253
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)