Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
DOC: make users/explain a sphinx gallery [ci doc]
  • Loading branch information
jklymak committed Mar 17, 2023
commit 49e6b9e2d7e1231754404020ebea78f901f03a31
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ commands:
- run:
name: Install Python dependencies
command: |
# remove when sphinx-gallery releases #1071:
python -m pip install --user \
numpy<< parameters.numpy_version >> codecov coverage \
-r requirements/doc/doc-requirements.txt
python -m pip install --no-deps --user \
git+https://github.com/sphinx-gallery/sphinx-gallery.git
python -m pip install --no-deps --user \
git+https://github.com/matplotlib/mpl-sphinx-theme.git

Expand Down
1 change: 1 addition & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ clean:
rm -rf "$(SOURCEDIR)/gallery"
rm -rf "$(SOURCEDIR)/plot_types"
rm -rf "$(SOURCEDIR)/tutorials"
rm -rf "$(SOURCEDIR)/users/explain"
rm -rf "$(SOURCEDIR)/savefig"
rm -rf "$(SOURCEDIR)/sphinxext/__pycache__"
rm -f $(SOURCEDIR)/_static/constrained_layout*.png
Expand Down
10 changes: 7 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,14 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
gallery_conf['image_srcset'] = []
return matplotlib_scraper(block, block_vars, gallery_conf, **kwargs)

gallery_dirs = [f'{ed}' for ed in ['gallery', 'tutorials', 'plot_types']
gallery_dirs = [f'{ed}' for ed in
['gallery', 'tutorials', 'plot_types', 'users/explain']
if f'{ed}/*' not in skip_subdirs]

example_dirs = [f'../galleries/{gd}'.replace('gallery', 'examples')
for gd in gallery_dirs]
example_dirs = []
for gd in gallery_dirs:
gd = gd.replace('gallery', 'examples').replace('users/explain', 'users_explain')
example_dirs += [f'../galleries/{gd}']

sphinx_gallery_conf = {
'backreferences_dir': Path('api') / Path('_as_gen'),
Expand All @@ -244,6 +247,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
'thumbnail_size': (320, 224),
'within_subsection_order': gallery_order.subsectionorder,
'capture_repr': (),
'copyfile_regex': r'.*\.rst',
}

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