From 38289eaabf1df3b8d508dc3cc6fe4c08441a9611 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Tue, 16 Jan 2024 13:40:09 -0700 Subject: [PATCH] Fix readthedocs build (#495) * Update rtd build environment * Clean up path * Add pandoc version restrictions for nbconvert * Remove pandoc version requirements since pypi has wrong package * Constrain nbconvert version on rtd --- .readthedocs.yaml | 5 +++-- docs/rtd_requirements.txt | 3 +++ docs/source/conf.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 docs/rtd_requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7b7a37c7c..6684fd051 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,9 +12,9 @@ submodules: # Set the version of Python and other tools you might need build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: - python: "3.8" + python: "3.10" apt_packages: - graphviz - libopenblas-dev @@ -29,3 +29,4 @@ sphinx: python: install: - requirements: docs/docs_requirements.txt + - requirements: docs/rtd_requirements.txt diff --git a/docs/rtd_requirements.txt b/docs/rtd_requirements.txt new file mode 100644 index 000000000..dccb5a336 --- /dev/null +++ b/docs/rtd_requirements.txt @@ -0,0 +1,3 @@ +# nbconvert>=7.5 requires a version of pandoc that is not available +# in the readthedocs build environment +nbconvert<7.5 diff --git a/docs/source/conf.py b/docs/source/conf.py index 50c6d3a1b..b4b41cc05 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,7 +5,7 @@ confpath = os.path.dirname(__file__) sys.path.append(confpath) -rootpath = os.path.join(confpath, "..", "..") +rootpath = os.path.realpath(os.path.join(confpath, "..", "..")) sys.path.append(rootpath) from docsutil import insert_inheritance_diagram, package_classes, run_conf_files