Skip to content

Commit

Permalink
Set up a ReadTheDocs configuration file (#59)
Browse files Browse the repository at this point in the history
* Set up a ReadTheDocs configuration file

* Need import os
  • Loading branch information
neilflood authored Jun 19, 2023
1 parent b2c110c commit f8cae3c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx==7
6 changes: 5 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f8cae3c

Please sign in to comment.