diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..34dbca33 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the doc/ directory with Sphinx +sphinx: + configuration: doc/source/conf.py + +python: + install: + - requirements: doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..d9867351 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1 @@ +sphinx==7 diff --git a/doc/source/conf.py b/doc/source/conf.py index 98e4b11c..76590be0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -14,11 +14,15 @@ # serve to show the default. import sys -import rios # for version info +import os # Set up 'mock' modules, needed to build docs if numpy, gdal etc., aren't installed import mock +sys.path.insert(0, os.path.abspath('../..')) +# for version info +import rios # noqa: E402 + MOCK_MODULES = ['numpy', 'osgeo', 'gdal', 'osgeo.gdal', 'cloud', 'cloud.serialization'] for mod_name in MOCK_MODULES: