From b30c09aaa47d4c49e05ec00ab5d4b3ad82fc1c3a Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Sun, 8 Mar 2020 16:36:52 +1100 Subject: [PATCH] Create a tox docs environment (#1426) To make it easier to build documentation locally, add a new tox environment that installs our requirements and runs Sphinx. --- CONTRIBUTING.md | 8 +++++++- tox.ini | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33f89336..91799093 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -104,7 +104,7 @@ pip install --editable path/to/project You may also want to investigate `tox` to run tests: -`` +``` pip install tox tox -epy36,flake8,black,isort ``` @@ -115,3 +115,9 @@ tox -epy36,flake8,black,isort pip install -r requirements.txt sphinx-build doc build ``` + +If you use tox: + +``` +tox -edocs +``` diff --git a/tox.ini b/tox.ini index 1047b995..83e104ea 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,12 @@ commands = isort -rc github tests scripts setup.py black github tests scripts setup.py +[testenv:docs] +basepython = python3.6 +skip_install = true +deps = -rrequirements.txt +commands = sphinx-build doc build + [flake8] max-line-length = 88 select = C,E,F,W