Skip to content

Commit 121fc3e

Browse files
authored
add readthedocs template (#299)
* add readthedocs template * add packaged requirements to docs building config * update intersphinx_mapping * split documentation requirements into separate file and update doc building config
1 parent 558b51c commit 121fc3e

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

.readthedocs.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.12"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Optional but recommended, declare the Python requirements required
18+
# to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
python:
21+
install:
22+
- requirements: docs/requirements.txt
23+
24+
# Build documentation in the "docs/" directory with Sphinx
25+
sphinx:
26+
configuration: docs/source/conf.py
27+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
28+
# builder: "dirhtml"
29+
# Fail on all warnings to avoid broken references
30+
# fail_on_warning: true
31+
32+
# Optionally build your docs in additional formats such as PDF and ePub
33+
# formats:
34+
# - pdf
35+
# - epub

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
numpydoc
2+
nbsphinx
3+
sphinx-rtd-theme

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
# -- Options for intersphinx extension ---------------------------------------
194194

195195
# Example configuration for intersphinx: refer to the Python standard library.
196-
intersphinx_mapping = {'https://docs.python.org/': None}
196+
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
197197

198198
# -- Options for todo extension ----------------------------------------------
199199

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ altair>=3.0
22
coveralls==3.2.0
33
matplotlib>=3.5
44
numpy>=1.14
5-
numpydoc
6-
nbsphinx
75
pytest>=4.6
86
pytest-cov
97
scipy>=1.0

0 commit comments

Comments
 (0)