Skip to content

Commit

Permalink
DOC update sphinx-gallery 0.17.1 and remove our workaround (scikit-le…
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie-XIAO authored Sep 11, 2024
1 parent 938fa18 commit 1d22a48
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 216 deletions.
8 changes: 4 additions & 4 deletions build_tools/circle/doc_linux-64_conda.lock
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ https://conda.anaconda.org/conda-forge/linux-64/fonttools-4.53.1-py39h8cd3c5a_1.
https://conda.anaconda.org/conda-forge/linux-64/fortran-compiler-1.8.0-h36df796_0.conda#53932a433fcb479d509fc5eeff3c6d5d
https://conda.anaconda.org/conda-forge/noarch/h2-4.1.0-pyhd8ed1ab_0.tar.bz2#b748fbf7060927a6e82df7cb5ee8f097
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-8.4.0-pyha770c72_0.conda#6e3dbc422d3749ad72659243d6ac8b2b
https://conda.anaconda.org/conda-forge/noarch/importlib_resources-6.4.4-pyhd8ed1ab_0.conda#99aa3edd3f452d61c305a30e78140513
https://conda.anaconda.org/conda-forge/noarch/importlib_resources-6.4.5-pyhd8ed1ab_0.conda#c808991d29b9838fb4d96ce8267ec9ec
https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.4-pyhd8ed1ab_0.conda#7b86ecb7d3557821c649b3c31e3eb9f2
https://conda.anaconda.org/conda-forge/noarch/joblib-1.4.2-pyhd8ed1ab_0.conda#25df261d4523d9f9783bcdb7208d872f
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-23_linux64_openblas.conda#eede29b40efa878cbe5bdcb767e97310
Expand All @@ -214,14 +214,14 @@ https://conda.anaconda.org/conda-forge/linux-64/pillow-10.4.0-py39h16a7006_0.con
https://conda.anaconda.org/conda-forge/noarch/pip-24.2-pyh8b19718_1.conda#6c78fbb8ddfd64bcb55b5cbafd2d2c43
https://conda.anaconda.org/conda-forge/noarch/plotly-5.24.0-pyhd8ed1ab_0.conda#80a4a0867ded2a66687e78bca0bc70fc
https://conda.anaconda.org/conda-forge/noarch/pyproject-metadata-0.8.0-pyhd8ed1ab_0.conda#573fe09d7bd0cd4bcc210d8369b5ca47
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.2-pyhd8ed1ab_0.conda#e010a224b90f1f623a917c35addbb924
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.3-pyhd8ed1ab_0.conda#c03d61f31f38fdb9facf70c29958bf7a
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda#2cf4264fffb9e6eff6031c5b6884d61c
https://conda.anaconda.org/conda-forge/linux-64/xcb-util-cursor-0.1.4-h4ab18f5_2.conda#79e46d4a6ccecb7ee1912042958a8758
https://conda.anaconda.org/conda-forge/linux-64/xorg-libxi-1.7.10-h4bc722e_1.conda#749baebe7e2ff3360630e069175e528b
https://conda.anaconda.org/conda-forge/linux-64/xorg-libxxf86vm-1.1.5-h4bc722e_1.conda#0c90ad87101001080484b91bd9d2cdef
https://conda.anaconda.org/conda-forge/linux-64/compilers-1.8.0-ha770c72_0.conda#e08e569c1b7e923654d1fe9e76dadb3d
https://conda.anaconda.org/conda-forge/linux-64/harfbuzz-9.0.0-hda332d3_1.conda#76b32dcf243444aea9c6b804bcfa40b8
https://conda.anaconda.org/conda-forge/noarch/importlib-resources-6.4.4-pyhd8ed1ab_0.conda#c62e775953b6b65f2079c9ee2a62813c
https://conda.anaconda.org/conda-forge/noarch/importlib-resources-6.4.5-pyhd8ed1ab_0.conda#67f4772681cf86652f3e2261794cf045
https://conda.anaconda.org/conda-forge/noarch/lazy-loader-0.4-pyhd8ed1ab_1.conda#4809b9f4c6ce106d443c3f90b8e10db2
https://conda.anaconda.org/conda-forge/linux-64/liblapacke-3.9.0-23_linux64_openblas.conda#89d7bcdb1e9a72a73e36d8e29d2a2beb
https://conda.anaconda.org/conda-forge/noarch/meson-python-0.16.0-pyh0c530f3_0.conda#e16f0dbf502da873be9f9adb0dc52547
Expand All @@ -243,7 +243,7 @@ https://conda.anaconda.org/conda-forge/linux-64/scipy-1.13.1-py39haf93ffa_0.cond
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.2-pyhd8ed1ab_1.conda#e804c43f58255e977093a2298e442bb8
https://conda.anaconda.org/conda-forge/linux-64/blas-2.123-openblas.conda#7f4b3ea1cdd6e50dca2a226abda6e2d9
https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.9.2-py39h0565ad7_0.conda#14917b240f18eba18576e81530360a0a
https://conda.anaconda.org/conda-forge/linux-64/pyamg-5.2.1-py39h85c637f_0.conda#0bfaf33b7ebdbadc77bf9a67e281c0b1
https://conda.anaconda.org/conda-forge/linux-64/pyamg-5.2.1-py39hf59e57a_1.conda#720dbce3188cecd95fc26525394d1e65
https://conda.anaconda.org/conda-forge/linux-64/pyside6-6.7.2-py39h8242bd1_2.conda#e5c6995331893cf9fcaab45d11e343ff
https://conda.anaconda.org/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_0.conda#5ede4753180c7a550a443c430dc8ab52
https://conda.anaconda.org/conda-forge/linux-64/statsmodels-0.14.2-py39hd92a3bb_0.conda#2f6c03d60e71f13d92d511b06193f007
Expand Down
2 changes: 1 addition & 1 deletion build_tools/circle/doc_min_dependencies_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
- memory_profiler
- compilers
- sphinx=7.3.7 # min
- sphinx-gallery=0.16.0 # min
- sphinx-gallery=0.17.1 # min
- sphinx-copybutton=0.5.2 # min
- numpydoc=1.2.0 # min
- sphinx-prompt=1.4.0 # min
Expand Down
8 changes: 4 additions & 4 deletions build_tools/circle/doc_min_dependencies_linux-64_conda.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: linux-64
# input_hash: 5c8271fa578693d01da90fd519c56b90a86857bdb8b28024e74528f3d937d440
# input_hash: 4d0e82874231bcf15e09758ae8c89f6f8849336eb62581f371faac7807322b08
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/noarch/_sysroot_linux-64_curr_repodata_hack-3-h69a702a_16.conda#1c005af0c6ff22814b7c52ee448d4bea
Expand Down Expand Up @@ -224,7 +224,7 @@ https://conda.anaconda.org/conda-forge/linux-64/pillow-10.4.0-py39h16a7006_0.con
https://conda.anaconda.org/conda-forge/noarch/pip-24.2-pyh8b19718_1.conda#6c78fbb8ddfd64bcb55b5cbafd2d2c43
https://conda.anaconda.org/conda-forge/noarch/plotly-5.14.0-pyhd8ed1ab_0.conda#6a7bcc42ef58dd6cf3da9333ea102433
https://conda.anaconda.org/conda-forge/noarch/pyproject-metadata-0.8.0-pyhd8ed1ab_0.conda#573fe09d7bd0cd4bcc210d8369b5ca47
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.2-pyhd8ed1ab_0.conda#e010a224b90f1f623a917c35addbb924
https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.3-pyhd8ed1ab_0.conda#c03d61f31f38fdb9facf70c29958bf7a
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda#2cf4264fffb9e6eff6031c5b6884d61c
https://conda.anaconda.org/conda-forge/linux-64/sip-6.7.12-py39h3d6467e_0.conda#e667a3ab0df62c54e60e1843d2e6defb
https://conda.anaconda.org/conda-forge/linux-64/tbb-2021.13.0-h84d6215_0.conda#ee6f7fd1e76061ef1fa307d41fa86a96
Expand All @@ -243,7 +243,7 @@ https://conda.anaconda.org/conda-forge/linux-64/zstandard-0.23.0-py39h08a7858_1.
https://conda.anaconda.org/conda-forge/noarch/dask-core-2024.8.0-pyhd8ed1ab_0.conda#bf68bf9ff9a18f1b17aa8c817225aee0
https://conda.anaconda.org/conda-forge/linux-64/gst-plugins-base-1.24.7-h0a52356_0.conda#d368425fbd031a2f8e801a40c3415c72
https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-23_linux64_mkl.conda#5bdaf561cf48f95093dedaa665083874
https://conda.anaconda.org/conda-forge/linux-64/libsystemd0-256.5-hb6d7363_0.conda#3b3912077a5515b2a39bda92008bc2c3
https://conda.anaconda.org/conda-forge/linux-64/libsystemd0-256.6-h2774228_0.conda#38eaed5a0dd9a737af1a4bd96338d88d
https://conda.anaconda.org/conda-forge/linux-64/mkl-devel-2024.1.0-ha770c72_693.conda#7f422e2cf549a3fb920c95288393870d
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.2.2-pyhd8ed1ab_1.conda#e804c43f58255e977093a2298e442bb8
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-23_linux64_mkl.conda#e0219f401906533e26346d8634ef35f4
Expand Down Expand Up @@ -276,7 +276,7 @@ https://conda.anaconda.org/conda-forge/noarch/numpydoc-1.2-pyhd8ed1ab_0.tar.bz2#
https://conda.anaconda.org/conda-forge/noarch/pydata-sphinx-theme-0.15.3-pyhd8ed1ab_0.conda#55e445f4fcb07f2471fb0e1102d36488
https://conda.anaconda.org/conda-forge/noarch/sphinx-copybutton-0.5.2-pyhd8ed1ab_0.conda#ac832cc43adc79118cf6e23f1f9b8995
https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.6.0-pyhd8ed1ab_0.conda#b04f3c04e4f7939c6207dc0c0355f468
https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.16.0-pyhd8ed1ab_0.conda#add28691ee89e875b190eda07929d5d4
https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.17.1-pyhd8ed1ab_0.conda#0adfccc6e7269a29a63c1c8ee3c6d8ba
https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.4.0-pyhd8ed1ab_0.tar.bz2#88ee91e8679603f2a5bd036d52919cc2
https://conda.anaconda.org/conda-forge/noarch/sphinx-remove-toctrees-1.0.0.post1-pyhd8ed1ab_0.conda#6dee8412218288a17f99f2cfffab334d
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_0.conda#9075bd8c033f0257122300db914e49c9
Expand Down
21 changes: 10 additions & 11 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"autoshortsummary",
"doi_role",
"dropdown_anchors",
"move_gallery_links",
"override_pst_pagetoc",
"sphinx_issues",
]
Expand Down Expand Up @@ -281,7 +280,16 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-exclude_patterns
# In particular, "**" specifies the default for all pages
# Use :html_theme.sidebar_secondary.remove: for file-wide removal
"secondary_sidebar_items": {"**": ["page-toc", "sourcelink"]},
"secondary_sidebar_items": {
"**": [
"page-toc",
"sourcelink",
# Sphinx-Gallery-specific sidebar components
# https://sphinx-gallery.github.io/stable/advanced.html#using-sphinx-gallery-sidebar-components
"sg_download_links",
"sg_launcher_links",
],
},
"show_version_warning_banner": True,
"announcement": (
'<a href="https://forms.gle/zUXvWjGUN1nWhJ2V6">Help us make '
Expand Down Expand Up @@ -681,19 +689,10 @@ def reset_sklearn_config(gallery_conf, fname):
"notebook_modification_function": notebook_modification_function
}

# Secondary sidebar configuration for pages generated by sphinx-gallery

# For the index page of the gallery and each nested section, we hide the secondary
# sidebar by specifying an empty list (no components), because there is no meaningful
# in-page toc for these pages, and they are generated so "sourcelink" is not useful
# either.

# For each example page we keep default ["page-toc", "sourcelink"] specified by the
# "**" key. "page-toc" is wanted for these pages. "sourcelink" is also necessary since
# otherwise the secondary sidebar will degenerate when "page-toc" is empty, and the
# script `sphinxext/move_gallery_links.py` will fail (it assumes the existence of the
# secondary sidebar). The script will remove "sourcelink" in the end.

html_theme_options["secondary_sidebar_items"][f"{sg_gallery_dir}/index"] = []
for sub_sg_dir in (Path(".") / sg_examples_dir).iterdir():
if sub_sg_dir.is_dir():
Expand Down
14 changes: 13 additions & 1 deletion doc/scss/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ details.sd-dropdown {
/* Tabs (sphinx-design) */

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

&::before {
Expand Down Expand Up @@ -157,6 +157,18 @@ details.sd-dropdown {
}
}

/* Download/laucher links and top hint (sphinx-gallery) */

// https://sphinx-gallery.github.io/stable/advanced.html#using-sphinx-gallery-sidebar-components
.sphx-glr-download-link-note,
.binder-badge,
.lite-badge,
.sphx-glr-download-jupyter,
.sphx-glr-download-python,
.sphx-glr-download-zip {
display: none;
}

/* scikit-learn buttons */

a.btn {
Expand Down
193 changes: 0 additions & 193 deletions doc/sphinxext/move_gallery_links.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ docs = [
"memory_profiler>=0.57.0",
"sphinx>=7.3.7",
"sphinx-copybutton>=0.5.2",
"sphinx-gallery>=0.16.0",
"sphinx-gallery>=0.17.1",
"numpydoc>=1.2.0",
"Pillow>=7.1.2",
"pooch>=1.6.0",
Expand Down
Loading

0 comments on commit 1d22a48

Please sign in to comment.