Skip to content

Commit e994c6a

Browse files
committed
docs: update RTD to modern requirements
Update RTD yml, pin sphinx<8.2.0, update conf.py for sphinx configuration.
1 parent 4936e12 commit e994c6a

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

.readthedocs.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
version: 2
22

3+
sphinx:
4+
configuration: docs/conf.py
5+
36
build:
47
os: "ubuntu-22.04"
58
tools:
69
python: "3.11"
710

811
python:
9-
install:
10-
- requirements: docs/requirements.txt
11-
- method: pip
12-
path: .
13-
extra_requirements:
14-
- docs
12+
install:
13+
- requirements: docs/requirements.txt
14+
- method: pip
15+
path: .
16+
extra_requirements:
17+
- docs

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,13 @@
3232
autodoc_default_options = {"members": False, "maxdepth": 1}
3333

3434
autodoc_member_order = "groupwise"
35+
36+
37+
# Set canonical URL from the Read the Docs Domain
38+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
39+
40+
# Tell Jinja2 templates the build is running on Read the Docs
41+
if os.environ.get("READTHEDOCS", "") == "True":
42+
if "html_context" not in globals():
43+
html_context = {}
44+
html_context["READTHEDOCS"] = True

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
sphinx
1+
sphinx<8.2.0
22
sphinx_rtd_theme
33
numpydoc
44
ipython
5-
nbsphinx
5+
nbsphinx

0 commit comments

Comments
 (0)