Skip to content

Commit

Permalink
[skip-ci] Speed up docs build by limiting toctrees (#9395)
Browse files Browse the repository at this point in the history
* [skip-ci] Try speeding up docs build

Following https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/performance.html

* bump to 3.12

* [skip-ci] latest mamba

* Use mamba

* revert navigation_depth  change
  • Loading branch information
dcherian authored Aug 28, 2024
1 parent 41d50b0 commit 93af904
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-lts-latest
tools:
python: mambaforge-4.10
python: mambaforge-latest
jobs:
post_checkout:
- (git --no-pager log --pretty="tformat:%s" -1 | grep -vqF "[skip-rtd]") || exit 183
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.10
- python=3.12
- bottleneck
- cartopy
- cfgrib
Expand Down Expand Up @@ -40,6 +40,7 @@ dependencies:
- sphinx-design
- sphinx-inline-tabs
- sphinx>=5.0
- sphinx-remove-toctrees
- sphinxext-opengraph
- sphinxext-rediraffe
- zarr>=2.10
Expand Down
4 changes: 4 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"sphinxext.rediraffe",
"sphinx_design",
"sphinx_inline_tabs",
"sphinx_remove_toctrees",
]


Expand Down Expand Up @@ -198,6 +199,8 @@
# The master toctree document.
master_doc = "index"

remove_from_toctrees = ["generated/*"]

# General information about the project.
project = "xarray"
copyright = f"2014-{datetime.datetime.now().year}, xarray Developers"
Expand Down Expand Up @@ -244,6 +247,7 @@
repository_url="https://github.com/pydata/xarray",
repository_branch="main",
navigation_with_keys=False, # pydata/pydata-sphinx-theme#1492
navigation_depth=4,
path_to_docs="doc",
use_edit_page_button=True,
use_repository_button=True,
Expand Down

0 comments on commit 93af904

Please sign in to comment.