Skip to content

Commit 1d22a48

Browse files
authored
DOC update sphinx-gallery 0.17.1 and remove our workaround (#29700)
1 parent 938fa18 commit 1d22a48

8 files changed

+34
-216
lines changed

build_tools/circle/doc_linux-64_conda.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ https://conda.anaconda.org/conda-forge/linux-64/fonttools-4.53.1-py39h8cd3c5a_1.
199199
https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.8.0-h36df796_0.conda#53932a433fcb479d509fc5eeff3c6d5d
200200
https://conda.anaconda.org/conda-forge/noarch/h2-4.1.0-pyhd8ed1ab_0.tar.bz2#b748fbf7060927a6e82df7cb5ee8f097
201201
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-8.4.0-pyha770c72_0.conda#6e3dbc422d3749ad72659243d6ac8b2b
202-
https://conda.anaconda.org/conda-forge/noarch/importlib_resources-6.4.4-pyhd8ed1ab_0.conda#99aa3edd3f452d61c305a30e78140513
202+
https://conda.anaconda.org/conda-forge/noarch/importlib_resources-6.4.5-pyhd8ed1ab_0.conda#c808991d29b9838fb4d96ce8267ec9ec
203203
https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.4-pyhd8ed1ab_0.conda#7b86ecb7d3557821c649b3c31e3eb9f2
204204
https://conda.anaconda.org/conda-forge/noarch/joblib-1.4.2-pyhd8ed1ab_0.conda#25df261d4523d9f9783bcdb7208d872f
205205
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-23_linux64_openblas.conda#eede29b40efa878cbe5bdcb767e97310
@@ -214,14 +214,14 @@ https://conda.anaconda.org/conda-forge/linux-64/pillow-10.4.0-py39h16a7006_0.con
214214
https://conda.anaconda.org/conda-forge/noarch/pip-24.2-pyh8b19718_1.conda#6c78fbb8ddfd64bcb55b5cbafd2d2c43
215215
https://conda.anaconda.org/conda-forge/noarch/plotly-5.24.0-pyhd8ed1ab_0.conda#80a4a0867ded2a66687e78bca0bc70fc
216216
https://conda.anaconda.org/conda-forge/noarch/pyproject-metadata-0.8.0-pyhd8ed1ab_0.conda#573fe09d7bd0cd4bcc210d8369b5ca47
217-
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.2-pyhd8ed1ab_0.conda#e010a224b90f1f623a917c35addbb924
217+
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.3-pyhd8ed1ab_0.conda#c03d61f31f38fdb9facf70c29958bf7a
218218
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda#2cf4264fffb9e6eff6031c5b6884d61c
219219
https://conda.anaconda.org/conda-forge/linux-64/xcb-util-cursor-0.1.4-h4ab18f5_2.conda#79e46d4a6ccecb7ee1912042958a8758
220220
https://conda.anaconda.org/conda-forge/linux-64/xorg-libxi-1.7.10-h4bc722e_1.conda#749baebe7e2ff3360630e069175e528b
221221
https://conda.anaconda.org/conda-forge/linux-64/xorg-libxxf86vm-1.1.5-h4bc722e_1.conda#0c90ad87101001080484b91bd9d2cdef
222222
https://conda.anaconda.org/conda-forge/linux-64/compilers-1.8.0-ha770c72_0.conda#e08e569c1b7e923654d1fe9e76dadb3d
223223
https://conda.anaconda.org/conda-forge/linux-64/harfbuzz-9.0.0-hda332d3_1.conda#76b32dcf243444aea9c6b804bcfa40b8
224-
https://conda.anaconda.org/conda-forge/noarch/importlib-resources-6.4.4-pyhd8ed1ab_0.conda#c62e775953b6b65f2079c9ee2a62813c
224+
https://conda.anaconda.org/conda-forge/noarch/importlib-resources-6.4.5-pyhd8ed1ab_0.conda#67f4772681cf86652f3e2261794cf045
225225
https://conda.anaconda.org/conda-forge/noarch/lazy-loader-0.4-pyhd8ed1ab_1.conda#4809b9f4c6ce106d443c3f90b8e10db2
226226
https://conda.anaconda.org/conda-forge/linux-64/liblapacke-3.9.0-23_linux64_openblas.conda#89d7bcdb1e9a72a73e36d8e29d2a2beb
227227
https://conda.anaconda.org/conda-forge/noarch/meson-python-0.16.0-pyh0c530f3_0.conda#e16f0dbf502da873be9f9adb0dc52547
@@ -243,7 +243,7 @@ https://conda.anaconda.org/conda-forge/linux-64/scipy-1.13.1-py39haf93ffa_0.cond
243243
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.2-pyhd8ed1ab_1.conda#e804c43f58255e977093a2298e442bb8
244244
https://conda.anaconda.org/conda-forge/linux-64/blas-2.123-openblas.conda#7f4b3ea1cdd6e50dca2a226abda6e2d9
245245
https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.9.2-py39h0565ad7_0.conda#14917b240f18eba18576e81530360a0a
246-
https://conda.anaconda.org/conda-forge/linux-64/pyamg-5.2.1-py39h85c637f_0.conda#0bfaf33b7ebdbadc77bf9a67e281c0b1
246+
https://conda.anaconda.org/conda-forge/linux-64/pyamg-5.2.1-py39hf59e57a_1.conda#720dbce3188cecd95fc26525394d1e65
247247
https://conda.anaconda.org/conda-forge/linux-64/pyside6-6.7.2-py39h8242bd1_2.conda#e5c6995331893cf9fcaab45d11e343ff
248248
https://conda.anaconda.org/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_0.conda#5ede4753180c7a550a443c430dc8ab52
249249
https://conda.anaconda.org/conda-forge/linux-64/statsmodels-0.14.2-py39hd92a3bb_0.conda#2f6c03d60e71f13d92d511b06193f007

build_tools/circle/doc_min_dependencies_environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
- memory_profiler
2626
- compilers
2727
- sphinx=7.3.7 # min
28-
- sphinx-gallery=0.16.0 # min
28+
- sphinx-gallery=0.17.1 # min
2929
- sphinx-copybutton=0.5.2 # min
3030
- numpydoc=1.2.0 # min
3131
- sphinx-prompt=1.4.0 # min

build_tools/circle/doc_min_dependencies_linux-64_conda.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by conda-lock.
22
# platform: linux-64
3-
# input_hash: 5c8271fa578693d01da90fd519c56b90a86857bdb8b28024e74528f3d937d440
3+
# input_hash: 4d0e82874231bcf15e09758ae8c89f6f8849336eb62581f371faac7807322b08
44
@EXPLICIT
55
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
66
https://conda.anaconda.org/conda-forge/noarch/_sysroot_linux-64_curr_repodata_hack-3-h69a702a_16.conda#1c005af0c6ff22814b7c52ee448d4bea
@@ -224,7 +224,7 @@ https://conda.anaconda.org/conda-forge/linux-64/pillow-10.4.0-py39h16a7006_0.con
224224
https://conda.anaconda.org/conda-forge/noarch/pip-24.2-pyh8b19718_1.conda#6c78fbb8ddfd64bcb55b5cbafd2d2c43
225225
https://conda.anaconda.org/conda-forge/noarch/plotly-5.14.0-pyhd8ed1ab_0.conda#6a7bcc42ef58dd6cf3da9333ea102433
226226
https://conda.anaconda.org/conda-forge/noarch/pyproject-metadata-0.8.0-pyhd8ed1ab_0.conda#573fe09d7bd0cd4bcc210d8369b5ca47
227-
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.2-pyhd8ed1ab_0.conda#e010a224b90f1f623a917c35addbb924
227+
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.3-pyhd8ed1ab_0.conda#c03d61f31f38fdb9facf70c29958bf7a
228228
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda#2cf4264fffb9e6eff6031c5b6884d61c
229229
https://conda.anaconda.org/conda-forge/linux-64/sip-6.7.12-py39h3d6467e_0.conda#e667a3ab0df62c54e60e1843d2e6defb
230230
https://conda.anaconda.org/conda-forge/linux-64/tbb-2021.13.0-h84d6215_0.conda#ee6f7fd1e76061ef1fa307d41fa86a96
@@ -243,7 +243,7 @@ https://conda.anaconda.org/conda-forge/linux-64/zstandard-0.23.0-py39h08a7858_1.
243243
https://conda.anaconda.org/conda-forge/noarch/dask-core-2024.8.0-pyhd8ed1ab_0.conda#bf68bf9ff9a18f1b17aa8c817225aee0
244244
https://conda.anaconda.org/conda-forge/linux-64/gst-plugins-base-1.24.7-h0a52356_0.conda#d368425fbd031a2f8e801a40c3415c72
245245
https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-23_linux64_mkl.conda#5bdaf561cf48f95093dedaa665083874
246-
https://conda.anaconda.org/conda-forge/linux-64/libsystemd0-256.5-hb6d7363_0.conda#3b3912077a5515b2a39bda92008bc2c3
246+
https://conda.anaconda.org/conda-forge/linux-64/libsystemd0-256.6-h2774228_0.conda#38eaed5a0dd9a737af1a4bd96338d88d
247247
https://conda.anaconda.org/conda-forge/linux-64/mkl-devel-2024.1.0-ha770c72_693.conda#7f422e2cf549a3fb920c95288393870d
248248
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.2-pyhd8ed1ab_1.conda#e804c43f58255e977093a2298e442bb8
249249
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-23_linux64_mkl.conda#e0219f401906533e26346d8634ef35f4
@@ -276,7 +276,7 @@ https://conda.anaconda.org/conda-forge/noarch/numpydoc-1.2-pyhd8ed1ab_0.tar.bz2#
276276
https://conda.anaconda.org/conda-forge/noarch/pydata-sphinx-theme-0.15.3-pyhd8ed1ab_0.conda#55e445f4fcb07f2471fb0e1102d36488
277277
https://conda.anaconda.org/conda-forge/noarch/sphinx-copybutton-0.5.2-pyhd8ed1ab_0.conda#ac832cc43adc79118cf6e23f1f9b8995
278278
https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.6.0-pyhd8ed1ab_0.conda#b04f3c04e4f7939c6207dc0c0355f468
279-
https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.16.0-pyhd8ed1ab_0.conda#add28691ee89e875b190eda07929d5d4
279+
https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.17.1-pyhd8ed1ab_0.conda#0adfccc6e7269a29a63c1c8ee3c6d8ba
280280
https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.4.0-pyhd8ed1ab_0.tar.bz2#88ee91e8679603f2a5bd036d52919cc2
281281
https://conda.anaconda.org/conda-forge/noarch/sphinx-remove-toctrees-1.0.0.post1-pyhd8ed1ab_0.conda#6dee8412218288a17f99f2cfffab334d
282282
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_0.conda#9075bd8c033f0257122300db914e49c9

doc/conf.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"autoshortsummary",
7575
"doi_role",
7676
"dropdown_anchors",
77-
"move_gallery_links",
7877
"override_pst_pagetoc",
7978
"sphinx_issues",
8079
]
@@ -281,7 +280,16 @@
281280
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-exclude_patterns
282281
# In particular, "**" specifies the default for all pages
283282
# Use :html_theme.sidebar_secondary.remove: for file-wide removal
284-
"secondary_sidebar_items": {"**": ["page-toc", "sourcelink"]},
283+
"secondary_sidebar_items": {
284+
"**": [
285+
"page-toc",
286+
"sourcelink",
287+
# Sphinx-Gallery-specific sidebar components
288+
# https://sphinx-gallery.github.io/stable/advanced.html#using-sphinx-gallery-sidebar-components
289+
"sg_download_links",
290+
"sg_launcher_links",
291+
],
292+
},
285293
"show_version_warning_banner": True,
286294
"announcement": (
287295
'<a href="https://forms.gle/zUXvWjGUN1nWhJ2V6">Help us make '
@@ -681,19 +689,10 @@ def reset_sklearn_config(gallery_conf, fname):
681689
"notebook_modification_function": notebook_modification_function
682690
}
683691

684-
# Secondary sidebar configuration for pages generated by sphinx-gallery
685-
686692
# For the index page of the gallery and each nested section, we hide the secondary
687693
# sidebar by specifying an empty list (no components), because there is no meaningful
688694
# in-page toc for these pages, and they are generated so "sourcelink" is not useful
689695
# either.
690-
691-
# For each example page we keep default ["page-toc", "sourcelink"] specified by the
692-
# "**" key. "page-toc" is wanted for these pages. "sourcelink" is also necessary since
693-
# otherwise the secondary sidebar will degenerate when "page-toc" is empty, and the
694-
# script `sphinxext/move_gallery_links.py` will fail (it assumes the existence of the
695-
# secondary sidebar). The script will remove "sourcelink" in the end.
696-
697696
html_theme_options["secondary_sidebar_items"][f"{sg_gallery_dir}/index"] = []
698697
for sub_sg_dir in (Path(".") / sg_examples_dir).iterdir():
699698
if sub_sg_dir.is_dir():

doc/scss/custom.scss

+13-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ details.sd-dropdown {
114114
/* Tabs (sphinx-design) */
115115

116116
.sd-tab-set {
117-
--tab-caption-width: 0%; // No tab caption by default
117+
--tab-caption-width: 0%; // No tab caption by default
118118
margin-top: 1.5rem;
119119

120120
&::before {
@@ -157,6 +157,18 @@ details.sd-dropdown {
157157
}
158158
}
159159

160+
/* Download/laucher links and top hint (sphinx-gallery) */
161+
162+
// https://sphinx-gallery.github.io/stable/advanced.html#using-sphinx-gallery-sidebar-components
163+
.sphx-glr-download-link-note,
164+
.binder-badge,
165+
.lite-badge,
166+
.sphx-glr-download-jupyter,
167+
.sphx-glr-download-python,
168+
.sphx-glr-download-zip {
169+
display: none;
170+
}
171+
160172
/* scikit-learn buttons */
161173

162174
a.btn {

doc/sphinxext/move_gallery_links.py

-193
This file was deleted.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ docs = [
5454
"memory_profiler>=0.57.0",
5555
"sphinx>=7.3.7",
5656
"sphinx-copybutton>=0.5.2",
57-
"sphinx-gallery>=0.16.0",
57+
"sphinx-gallery>=0.17.1",
5858
"numpydoc>=1.2.0",
5959
"Pillow>=7.1.2",
6060
"pooch>=1.6.0",

0 commit comments

Comments
 (0)