Skip to content

Commit 1c3e74b

Browse files
laurenyumetrizable
authored andcommitted
infra: upgrade Sphinx to 3.1.1 (aws#1605)
This commit also consolidates the doc dependencies to doc/requirements.txt, removes some unnecessary dependencies, and upgrades sphinx-rtd-theme to 0.5.0.
1 parent 71f43c5 commit 1c3e74b

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

README.rst

+10-7
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,26 @@ You can also run them in parallel:
164164
Building Sphinx docs
165165
~~~~~~~~~~~~~~~~~~~~
166166

167-
Setup a Python environment with ``sphinx`` and ``sagemaker``:
167+
Setup a Python environment, and install the dependencies listed in ``doc/requirements.txt``:
168168

169169
::
170170

171+
# conda
171172
conda create -n sagemaker python=3.7
172173
conda activate sagemaker
173-
conda install sphinx==2.2.2
174-
pip install sagemaker --user
174+
conda install --file doc/requirements.txt
175175

176-
Install the Read The Docs theme:
176+
# pip
177+
pip install -r doc/requirements.txt
177178

178-
::
179179

180-
pip install sphinx_rtd_theme --user
180+
Clone/fork the repo, and install your local version:
181+
182+
::
181183

184+
pip install --upgrade .
182185

183-
Clone/fork the repo, ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run:
186+
Then ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run:
184187

185188
::
186189

doc/requirements.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
sphinx==2.2.2
2-
numpy
3-
scipy
4-
requests==2.20
1+
sphinx==3.1.1
2+
sphinx-rtd-theme==0.5.0

tox.ini

-14
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ commands =
9898
[testenv:sphinx]
9999
basepython = python3
100100
changedir = doc
101-
# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L263
102-
install_command = python -m pip install --upgrade -I {packages}
103-
# Based on: https://github.com/rtfd/readthedocs.org/blob/8f0c78dde5edcc85acf90462a8518735a25482d3/readthedocs/doc_builder/python_environments.py#L280
104-
deps =
105-
Pygments==2.2.0
106-
setuptools<40
107-
docutils==0.13.1
108-
mock==1.0.1
109-
alabaster>=0.7,<0.8,!=0.7.5
110-
commonmark==0.5.4
111-
recommonmark==0.4.0
112-
sphinx<1.8
113-
sphinx-rtd-theme<0.5
114-
readthedocs-sphinx-ext<0.6
115101
# pip install requirements.txt is separate as RTD does it in separate steps
116102
# having the requirements.txt installed in deps above results in Double Requirement exception
117103
# https://github.com/pypa/pip/issues/988

0 commit comments

Comments
 (0)