Skip to content

Commit 300b4c0

Browse files
committed
feature: add adobe analytics script; upgrade sphinx to support custom js
1 parent 9ae28d7 commit 300b4c0

File tree

4 files changed

+32
-10
lines changed

4 files changed

+32
-10
lines changed

doc/conf.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"""Placeholder docstring"""
1414
from __future__ import absolute_import
1515

16-
import os
1716
import pkg_resources
1817
import sys
1918
from datetime import datetime
@@ -83,13 +82,13 @@ def __getattr__(cls, name):
8382
autodoc_default_flags = ["show-inheritance", "members", "undoc-members"]
8483
autodoc_member_order = "bysource"
8584

86-
if "READTHEDOCS" in os.environ:
87-
html_theme = "default"
88-
else:
89-
html_theme = "haiku"
90-
html_static_path = []
85+
html_theme = "sphinx_rtd_theme"
86+
87+
html_static_path = ["_static"]
9188
htmlhelp_basename = "%sdoc" % project
9289

90+
html_js_files = ["https://a0.awsstatic.com/s_code/js/1.0/awshome_s_code.js", "js/analytics.js"]
91+
9392
# Example configuration for intersphinx: refer to the Python standard library.
9493
intersphinx_mapping = {"http://docs.python.org/": None}
9594

doc/doc_environment.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: sagemaker-docs
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- conda>=4.6.13
6+
- jupyter
7+
- matplotlib
8+
- notebook
9+
- pip
10+
- python==3.7
11+
- tox
12+
- pip:
13+
- awscli
14+
- breathe
15+
- mock
16+
- nbconvert
17+
- nbsphinx>=0.4.2
18+
- notedown
19+
- pypandoc
20+
- recommonmark
21+
- sagemaker
22+
- sphinx==2.2.2
23+
- sphinx-rtd-theme

doc/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sphinx==1.7.9
1+
sphinx==2.2.2
22
numpy
33
scipy
4-
requests==2.20
4+
requests==2.20

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = black-format,flake8,pylint,twine,sphinx,py27,py36
7+
envlist = black-format,flake8,pylint,twine,sphinx,py27,py36,py37
88

99
skip_missing_interpreters = False
1010

@@ -104,7 +104,7 @@ deps =
104104
alabaster>=0.7,<0.8,!=0.7.5
105105
commonmark==0.5.4
106106
recommonmark==0.4.0
107-
sphinx<1.8
107+
sphinx==2.2.2
108108
sphinx-rtd-theme<0.5
109109
readthedocs-sphinx-ext<0.6
110110
# pip install requirements.txt is separate as RTD does it in separate steps

0 commit comments

Comments
 (0)