From 2a3e673f554ff3e7eb1e95d45f4c99402e8f40b0 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Mon, 20 Nov 2017 11:40:10 +0800 Subject: [PATCH] Build sphinx doc automatically on changes Change-Id: I6724622b531b4e2cd69f6b8b15f7f4c0e15ea5c8 --- README.rst | 8 +++++++- requirements.txt | 3 ++- tox.ini | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 58b1e63..8bd85bf 100644 --- a/README.rst +++ b/README.rst @@ -61,4 +61,10 @@ confidence in the Jenkins result), please execute the following command:: $ tox After running ``tox``, the documentation will be available for viewing in HTML -format in the ``doc/build/`` directory. \ No newline at end of file +format in the ``doc/build/`` directory. + +To build the document automatically on changes, use the command:: + + $ tox -e autobuild + +Then open in a browser http://localhost:8000 diff --git a/requirements.txt b/requirements.txt index d3ebb0c..e50640a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 graphviz>=0.4,!=0.5.0 # MIT License testrepository>=0.0.18 testtools>=0.9.34 -yasfb \ No newline at end of file +yasfb +sphinx-autobuild diff --git a/tox.ini b/tox.ini index 6c81996..d587f74 100644 --- a/tox.ini +++ b/tox.ini @@ -18,4 +18,10 @@ commands = python setup.py build_sphinx [testenv:doc8] deps = -r{toxinidir}/requirements.txt doc8 -commands = doc8 doc/source \ No newline at end of file +commands = doc8 doc/source + +[testenv:autobuild] +whitelist_externals = + sphinx-autobuild +commands = + sphinx-autobuild doc/source doc/build