Browse Source

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
changes/42/470642/5
Anne Gentle 5 years ago committed by Andreas Jaeger
parent
commit
2b1c945b45
  1. 1
      .zuul.yaml
  2. 4
      CONTRIBUTING.rst
  3. 4
      README.rst
  4. 3
      doc/requirements.txt
  5. 9
      doc/source/conf.py
  6. 5
      doc/source/index.rst
  7. 2
      doc/source/readme.rst
  8. 6
      doc/source/usage.rst
  9. 8
      setup.cfg
  10. 2
      test-requirements.txt
  11. 7
      tox.ini

1
.zuul.yaml

@ -2,3 +2,4 @@
templates:
- openstack-python-jobs-no-constraints
- openstack-python35-jobs-no-constraints
- publish-openstack-docs-pti

4
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:

4
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``

3
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

9
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}
#intersphinx_mapping = {'http://docs.python.org/': None}

5
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`

2
doc/source/readme.rst

@ -1 +1 @@
.. include:: ../README.rst
.. include:: ../../README.rst

6
doc/source/usage.rst

@ -1,7 +1,7 @@
========
=====
Usage
========
=====
To use reviewstats in a project::
import reviewstats
import reviewstats

8
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

2
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

7
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

Loading…
Cancel
Save