Skip to content

Commit

Permalink
Add RTD config (#63)
Browse files Browse the repository at this point in the history
Add .readthedocs.yaml and pin some documentation dependencies.
More recent versions of nbsphin/sphinx/nbconvert require newer
pandoc than available on the RTD ubuntu-images.

:eyes: https://petab-select--63.org.readthedocs.build/en/63/

Closes #7
  • Loading branch information
dweindl authored Nov 7, 2023
1 parent b15a59c commit 2bb3076
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: doc/conf.py
fail_on_warning: True

python:
install:
- method: pip
path: .
extra_requirements:
- doc

build:
os: "ubuntu-22.04"
apt_packages:
- libatlas-base-dev
- swig
tools:
python: "3.11"
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
# html_static_path = ['_static']
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ def absolute_links(txt):
# 'pypesto @ git+https://github.com/ICB-DCM/pyPESTO.git@develop#egg=pypesto',
],
'doc': [
'sphinx>=3.5.3',
'sphinx>=3.5.3,<7',
'sphinxcontrib-napoleon>=0.7',
'sphinx-markdown-tables>=0.0.15',
'sphinx-rtd-theme>=0.5.1',
'recommonmark>=0.7.1',
'nbsphinx>=0.8.2',
# pin until ubuntu comes with newer pandoc:
# /home/docs/checkouts/readthedocs.org/user_builds/petab-select/envs/63/lib/python3.11/site-packages/nbsphinx/__init__.py:1058: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1).
# Your version must be at least (2.14.2) but less than (4.0.0).
'nbsphinx==0.9.1',
'nbconvert<7.5.0',
'ipython>=7.21.0',
'readthedocs-sphinx-ext @ git+https://github.com/readthedocs/readthedocs-sphinx-ext',
'sphinx-autodoc-typehints',
Expand Down

0 comments on commit 2bb3076

Please sign in to comment.