From 08531b05fca7ce19ae656d4eddccedff371a605d Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Wed, 17 Jun 2020 16:28:03 -0700 Subject: [PATCH 1/2] infra: upgrade Sphinx to 3.1.1 This commit also consolidates the doc dependencies to doc/requirements.txt, removes some unnecessary dependencies, and upgrades sphinx-rtd-theme to 0.5.0. --- doc/requirements.txt | 6 ++---- tox.ini | 14 -------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 070ee329f5..79478454fc 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,2 @@ -sphinx==2.2.2 -numpy -scipy -requests==2.20 +sphinx==3.1.1 +sphinx-rtd-theme==0.5.0 diff --git a/tox.ini b/tox.ini index a376b68e4e..50960d5c27 100644 --- a/tox.ini +++ b/tox.ini @@ -98,20 +98,6 @@ commands = [testenv:sphinx] 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} -# 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 - 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 From 261f9e1c3cf084641b80589a67fd7494876e0a27 Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Wed, 17 Jun 2020 17:24:38 -0700 Subject: [PATCH 2/2] update README --- README.rst | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index eb079037ab..46e1a943b0 100644 --- a/README.rst +++ b/README.rst @@ -164,23 +164,26 @@ You can also run them in parallel: Building Sphinx docs ~~~~~~~~~~~~~~~~~~~~ -Setup a Python environment with ``sphinx`` and ``sagemaker``: +Setup a Python environment, and install the dependencies listed in ``doc/requirements.txt``: :: + # conda conda create -n sagemaker python=3.7 conda activate sagemaker - conda install sphinx==2.2.2 - pip install sagemaker --user + conda install --file doc/requirements.txt -Install the Read The Docs theme: + # pip + pip install -r doc/requirements.txt -:: - pip install sphinx_rtd_theme --user +Clone/fork the repo, and install your local version: + +:: + pip install --upgrade . -Clone/fork the repo, ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run: +Then ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run: ::