Skip to content

Commit

Permalink
Update RTD to build pydeck and generate HTML on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Duberstein committed Apr 9, 2020
1 parent df10c89 commit 2e3e99b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .readthedocs.yml
Expand Up @@ -11,5 +11,10 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: bindings/pydeck/requirements-dev.txt
- requirements: bindings/pydeck/requirements.txt
- method: pip
path: bindings/pydeck
system_packages: true
13 changes: 10 additions & 3 deletions bindings/pydeck/docs/conf.py
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
# Point Sphinx autodoc at our source
import os
import subprocess
import sys

from docs.scripts import embed_examples

sys.path.insert(0, os.path.abspath("../"))

project = "pydeck"
Expand Down Expand Up @@ -37,4 +36,12 @@


def setup(app):
embed_examples.main()
if os.environ.get("READTHEDOCS"):
print("RTD running in the following directory:", os.getcwd())
subprocess.call(
"{python} bindings/pydeck/docs/scripts/embed_examples.py".format(python=sys.executable), shell=True,
)
else:
from docs.scripts import embed_examples # noqa

embed_examples.main()

0 comments on commit 2e3e99b

Please sign in to comment.