Skip to content

Commit

Permalink
Merge 345ab7a into 0988747
Browse files Browse the repository at this point in the history
  • Loading branch information
ajduberstein committed Apr 8, 2020
2 parents 0988747 + 345ab7a commit aa9cb25
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 0 additions & 2 deletions bindings/pydeck/docs/Makefile
Expand Up @@ -30,5 +30,3 @@ html-grid-page:
@echo "Producing examples grid"
$(MAKE) html-embeds
python scripts/generate_grid_html.py

html: html-grid-page
13 changes: 9 additions & 4 deletions bindings/pydeck/docs/conf.py
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
# Point Sphinx autodoc at our source
import sys
import os
import sys

from docs.scripts import embed_examples

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

Expand Down Expand Up @@ -30,6 +32,9 @@
epub_title = project
epub_exclude_files = ["search.html"]
autoclass_content = "both"
html_theme_options = {
"includehidden": False
}
html_theme_options = {"includehidden": False}
add_module_names = False


def setup(app):
embed_examples.main()
Empty file.
16 changes: 10 additions & 6 deletions bindings/pydeck/docs/scripts/embed_examples.py
@@ -1,13 +1,17 @@
"""Script to convert pydeck examples into .rst pages with code"""
import os
import glob
import jinja2

from multiprocessing import Pool

import os
import subprocess
import sys

from .utils import to_presentation_name, to_snake_case_layer_name


from utils import to_presentation_name, to_snake_case_layer_name
if not os.environ.get("MAPBOX_API_KEY"):
# If running for rtfd.io, set this variable from the Admin panel
raise Exception("MAPBOX_API_KEY not set")


DOC_TEMPLATE = jinja2.Template(
Expand Down Expand Up @@ -63,8 +67,8 @@ def create_rst(fname):
# Create new .html examples
html_fname = os.path.basename(fname).replace(".py", ".html")
subprocess.call(
"source activate ../env; python {fname}; mv {html_src} {html_dest}".format(
fname=fname, html_src=html_fname, html_dest=HTML_DIR,
"{python} {fname}; mv {html_src} {html_dest}".format(
python=sys.executable, fname=fname, html_src=html_fname, html_dest=HTML_DIR,
),
shell=True,
)
Expand Down

0 comments on commit aa9cb25

Please sign in to comment.