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

Skip to content

Commit 1d4d0aa

Browse files
committed
DOC: make users/explain a sphinx gallery [ci doc]
1 parent 905ce85 commit 1d4d0aa

564 files changed

Lines changed: 48 additions & 41 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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 \

.flake8

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,27 @@ per-file-ignores =
8585
galleries/tutorials/toolkits/axes_grid.py: E501
8686
galleries/tutorials/toolkits/axisartist.py: E501
8787

88-
galleries/gallery/animation/frame_grabbing_sgskip.py: E402
89-
galleries/gallery/images_contours_and_fields/tricontour_demo.py: E201
90-
galleries/gallery/images_contours_and_fields/tripcolor_demo.py: E201
91-
galleries/gallery/images_contours_and_fields/triplot_demo.py: E201
92-
galleries/gallery/lines_bars_and_markers/marker_reference.py: E402
93-
galleries/gallery/misc/print_stdout_sgskip.py: E402
94-
galleries/gallery/misc/table_demo.py: E201
95-
galleries/gallery/style_sheets/bmh.py: E501
96-
galleries/gallery/style_sheets/plot_solarizedlight2.py: E501
97-
galleries/gallery/subplots_axes_and_figures/demo_constrained_layout.py: E402
98-
galleries/gallery/text_labels_and_annotations/custom_legends.py: E402
99-
galleries/gallery/ticks/date_concise_formatter.py: E402
100-
galleries/gallery/ticks/date_formatters_locators.py: F401
101-
galleries/gallery/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
102-
galleries/gallery/user_interfaces/embedding_in_gtk3_sgskip.py: E402
103-
galleries/gallery/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402
104-
galleries/gallery/user_interfaces/embedding_in_gtk4_sgskip.py: E402
105-
galleries/gallery/user_interfaces/gtk3_spreadsheet_sgskip.py: E402
106-
galleries/gallery/user_interfaces/gtk4_spreadsheet_sgskip.py: E402
107-
galleries/gallery/user_interfaces/mpl_with_glade3_sgskip.py: E402
108-
galleries/gallery/user_interfaces/pylab_with_gtk3_sgskip.py: E402
109-
galleries/gallery/user_interfaces/pylab_with_gtk4_sgskip.py: E402
110-
galleries/gallery/userdemo/pgf_preamble_sgskip.py: E402
88+
galleries/examples/animation/frame_grabbing_sgskip.py: E402
89+
galleries/examples/images_contours_and_fields/tricontour_demo.py: E201
90+
galleries/examples/images_contours_and_fields/tripcolor_demo.py: E201
91+
galleries/examples/images_contours_and_fields/triplot_demo.py: E201
92+
galleries/examples/lines_bars_and_markers/marker_reference.py: E402
93+
galleries/examples/misc/print_stdout_sgskip.py: E402
94+
galleries/examples/misc/table_demo.py: E201
95+
galleries/examples/style_sheets/bmh.py: E501
96+
galleries/examples/style_sheets/plot_solarizedlight2.py: E501
97+
galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py: E402
98+
galleries/examples/text_labels_and_annotations/custom_legends.py: E402
99+
galleries/examples/ticks/date_concise_formatter.py: E402
100+
galleries/examples/ticks/date_formatters_locators.py: F401
101+
galleries/examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py: E402
102+
galleries/examples/user_interfaces/embedding_in_gtk3_sgskip.py: E402
103+
galleries/examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py: E402
104+
galleries/examples/user_interfaces/embedding_in_gtk4_sgskip.py: E402
105+
galleries/examples/user_interfaces/gtk3_spreadsheet_sgskip.py: E402
106+
galleries/examples/user_interfaces/gtk4_spreadsheet_sgskip.py: E402
107+
galleries/examples/user_interfaces/mpl_with_glade3_sgskip.py: E402
108+
galleries/examples/user_interfaces/pylab_with_gtk3_sgskip.py: E402
109+
galleries/examples/user_interfaces/pylab_with_gtk4_sgskip.py: E402
110+
galleries/examples/userdemo/pgf_preamble_sgskip.py: E402
111111
force-check = True

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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,12 @@ 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]
220222

221223
sphinx_gallery_conf = {
222224
'backreferences_dir': Path('api') / Path('_as_gen'),
@@ -243,6 +245,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
243245
'thumbnail_size': (320, 224),
244246
'within_subsection_order': gallery_order.subsectionorder,
245247
'capture_repr': (),
248+
'copyfile_regex': r'.*\.rst',
246249
}
247250

248251
if 'plot_gallery=0' in sys.argv:

doc/devel/documenting_mpl.rst

Lines changed: 2 additions & 2 deletions

doc/sphinxext/gallery_order.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
UNSORTED = "unsorted"
1212

1313
examples_order = [
14-
'../galleries/gallery/lines_bars_and_markers',
15-
'../galleries/gallery/images_contours_and_fields',
16-
'../galleries/gallery/subplots_axes_and_figures',
17-
'../galleries/gallery/statistics',
18-
'../galleries/gallery/pie_and_polar_charts',
19-
'../galleries/gallery/text_labels_and_annotations',
20-
'../galleries/gallery/color',
21-
'../galleries/gallery/shapes_and_collections',
22-
'../galleries/gallery/style_sheets',
23-
'../galleries/gallery/pyplots',
24-
'../galleries/gallery/axes_grid1',
25-
'../galleries/gallery/axisartist',
26-
'../galleries/gallery/showcase',
14+
'../galleries/examples/lines_bars_and_markers',
15+
'../galleries/examples/images_contours_and_fields',
16+
'../galleries/examples/subplots_axes_and_figures',
17+
'../galleries/examples/statistics',
18+
'../galleries/examples/pie_and_polar_charts',
19+
'../galleries/examples/text_labels_and_annotations',
20+
'../galleries/examples/color',
21+
'../galleries/examples/shapes_and_collections',
22+
'../galleries/examples/style_sheets',
23+
'../galleries/examples/pyplots',
24+
'../galleries/examples/axes_grid1',
25+
'../galleries/examples/axisartist',
26+
'../galleries/examples/showcase',
2727
UNSORTED,
28-
'../galleries/gallery/userdemo',
28+
'../galleries/examples/userdemo',
2929
]
3030

3131
tutorials_order = [
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)