From 2b1c945b454aaa19e72a4750c1f75979119feeca Mon Sep 17 00:00:00 2001 From: Anne Gentle Date: Sat, 3 Jun 2017 14:39:55 -0500 Subject: [PATCH] Adds tox docs job Follow PTI for this and add all needed changes, remove obsolete options. Switch to openstackdocstheme instead of oslosphinx since that is retired. Remove module index - this repo has no modules and thus nothing is generated. Add job to publish documents. Change-Id: Ida269f9755099f32a12f46082b529311ecb7e2b6 --- .zuul.yaml | 1 + CONTRIBUTING.rst | 4 ++++ README.rst | 4 ++-- doc/requirements.txt | 3 +++ doc/source/conf.py | 9 +++++++-- doc/source/index.rst | 5 +++-- doc/source/readme.rst | 2 +- doc/source/usage.rst | 6 +++--- setup.cfg | 8 -------- test-requirements.txt | 2 -- tox.ini | 7 ++++++- 11 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 doc/requirements.txt diff --git a/.zuul.yaml b/.zuul.yaml index 161d422..14072bb 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,3 +2,4 @@ templates: - openstack-python-jobs-no-constraints - openstack-python35-jobs-no-constraints + - publish-openstack-docs-pti diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d970a8b..a08f850 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,3 +1,7 @@ +============ +Contributing +============ + If you would like to contribute to the development of OpenStack, you must follow the steps in this page: diff --git a/README.rst b/README.rst index d337ded..08a30f1 100644 --- a/README.rst +++ b/README.rst @@ -40,8 +40,8 @@ Examples #. Get reviewer stats for the last 14 days (default) in the stable/pike branch: - ``$ reviewers --stable pike --output ~/reviewers-stable-pike-14`` + ``$ reviewers --stable pike --output ~/reviewers-stable-pike-14`` #. Get reviewer stats for the last 90 days across all stable branches: - ``$ reviewers --stable all --days 90 --output ~/reviewers-stable-all-90`` + ``$ reviewers --stable all --days 90 --output ~/reviewers-stable-all-90`` diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..1a978cf --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +openstackdocstheme>=1.20 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index a444a05..7f5e071 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,9 +23,14 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslo.sphinx' + 'openstackdocstheme' ] +# openstackdocstheme options +repository_name = 'openstack/reviewstats' +use_storyboard = True +html_theme = 'openstackdocs' + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable @@ -72,4 +77,4 @@ latex_documents = [ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} \ No newline at end of file +#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/index.rst b/doc/source/index.rst index bcdbb7b..9fcab81 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,7 +1,9 @@ +======================================= Welcome to reviewstats's documentation! ======================================= -Contents: +Contents +======== .. toctree:: :maxdepth: 2 @@ -15,5 +17,4 @@ Indices and tables ================== * :ref:`genindex` -* :ref:`modindex` * :ref:`search` diff --git a/doc/source/readme.rst b/doc/source/readme.rst index 6b2b3ec..38ba804 100644 --- a/doc/source/readme.rst +++ b/doc/source/readme.rst @@ -1 +1 @@ -.. include:: ../README.rst \ No newline at end of file +.. include:: ../../README.rst \ No newline at end of file diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 1386b2f..438902b 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -1,7 +1,7 @@ -======== +===== Usage -======== +===== To use reviewstats in a project:: - import reviewstats \ No newline at end of file + import reviewstats \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 8a10155..0bf0ec6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,14 +22,6 @@ classifier = packages = reviewstats -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = reviewstats/locale domain = reviewstats diff --git a/test-requirements.txt b/test-requirements.txt index 1911c93..857cca0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,8 +3,6 @@ hacking>=0.5.6,<0.8 coverage>=3.6 fixtures>=0.3.14 python-subunit -sphinx>=1.1.2,<1.2 -oslo.sphinx testrepository>=0.0.17 testscenarios>=0.4,<0.5 testtools>=0.9.32 diff --git a/tox.ini b/tox.ini index a249245..affae0b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py27,py35,pypy,pep8 +envlist = py27,py35,pypy,pep8,docs skipsdist = True [testenv] @@ -12,6 +12,11 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' +[testenv:docs] +basepython = python3 +deps = -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html + [testenv:pep8] commands = flake8