From 952b9d3890af2dac593c13c84b5ac6f2dc10ceed Mon Sep 17 00:00:00 2001 From: Dan Choi Date: Wed, 20 Feb 2019 16:41:09 -0800 Subject: [PATCH 1/5] update tox to run sphinx build --- tox.ini | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6402496c88..7d0492be81 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py27,py35,flake8,pylint +envlist = py27,py35,flake8,pylint,sphinx skip_missing_interpreters = False [travis] @@ -72,3 +72,29 @@ deps = pylint==2.1.1 commands = python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker + +[testenv:sphinx] +basepython = python +changedir = doc +# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L263 +install_command = python -m pip install --upgrade -I {packages} +# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L280 +deps = + Pygments==2.2.0 + setuptools<40 + docutils==0.13.1 + mock==1.0.1 + pillow==2.6.1 + alabaster>=0.7,<0.8,!=0.7.5 + commonmark==0.5.4 + recommonmark==0.4.0 + sphinx<1.8 + sphinx-rtd-theme<0.5 + readthedocs-sphinx-ext<0.6 +# pip install requirements.txt is separate as RTD does it in separate steps +# having the requirements.txt installed in deps above results in Double Requirement exception +# https://github.com/pypa/pip/issues/988 +commands_pre = + pip install --exists-action=w -r requirements.txt +commands = + sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html From 3f486aec8ca96437079f99b9adf1b69d4db1fb62 Mon Sep 17 00:00:00 2001 From: Dan Choi Date: Wed, 20 Feb 2019 17:29:22 -0800 Subject: [PATCH 2/5] update changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fada8fd8ef..376407e38b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ CHANGELOG ========== * doc-fix: Remove incorrect parameter for EI TFS Python README +* enhancement: tox.ini: Add sphinx-build check for readthedocs 1.18.3.post1 ============ From 9b9f92ede712b980577602a40bbc19df4db2c07c Mon Sep 17 00:00:00 2001 From: Dan Choi Date: Wed, 20 Feb 2019 17:37:55 -0800 Subject: [PATCH 3/5] use py3 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7d0492be81..0509c4f69b 100644 --- a/tox.ini +++ b/tox.ini @@ -74,7 +74,7 @@ commands = python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker [testenv:sphinx] -basepython = python +basepython = python3 changedir = doc # Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L263 install_command = python -m pip install --upgrade -I {packages} From 8743f0c62fd94b1e140c1aff4118b96c407943ff Mon Sep 17 00:00:00 2001 From: Dan Choi Date: Wed, 20 Feb 2019 18:03:33 -0800 Subject: [PATCH 4/5] move to commands as pre_command is available in tox 3.4+ --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 0509c4f69b..4e081b28bf 100644 --- a/tox.ini +++ b/tox.ini @@ -94,7 +94,6 @@ deps = # pip install requirements.txt is separate as RTD does it in separate steps # having the requirements.txt installed in deps above results in Double Requirement exception # https://github.com/pypa/pip/issues/988 -commands_pre = - pip install --exists-action=w -r requirements.txt commands = + pip install --exists-action=w -r requirements.txt sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html From ac93821d851ae40aadbcc80bceaa0ab5a4c5f9f4 Mon Sep 17 00:00:00 2001 From: Dan Choi Date: Thu, 21 Feb 2019 10:56:38 -0800 Subject: [PATCH 5/5] remove changelog update --- CHANGELOG.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 376407e38b..fada8fd8ef 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,6 @@ CHANGELOG ========== * doc-fix: Remove incorrect parameter for EI TFS Python README -* enhancement: tox.ini: Add sphinx-build check for readthedocs 1.18.3.post1 ============