Skip to content

Commit

Permalink
add readthedocs template (ECSHackWeek#299)
Browse files Browse the repository at this point in the history
* add readthedocs template

* add packaged requirements to docs building config

* update intersphinx_mapping

* split documentation requirements into separate file and update doc building config
  • Loading branch information
BGerwe authored Aug 7, 2024
1 parent 558b51c commit 121fc3e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
numpydoc
nbsphinx
sphinx-rtd-theme
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
# -- Options for intersphinx extension ---------------------------------------

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

# -- Options for todo extension ----------------------------------------------

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ altair>=3.0
coveralls==3.2.0
matplotlib>=3.5
numpy>=1.14
numpydoc
nbsphinx
pytest>=4.6
pytest-cov
scipy>=1.0

0 comments on commit 121fc3e

Please sign in to comment.