Enable doc building job

Add docs job to .zuul.yaml and make tox -edocs target working again.

Change-Id: I1544bd93e1d861b89615079e7cc9d570600674bc
This commit is contained in:
elajkat 2020-04-22 16:34:21 +02:00 committed by Lajos Katona
parent 4eb270d886
commit 5c776ddfa9
6 changed files with 35 additions and 12 deletions

View File

@ -2,6 +2,7 @@
templates: templates:
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-cover-jobs-neutron - openstack-cover-jobs-neutron
- build-openstack-docs-pti
- check-requirements - check-requirements
- openstack-python3-ussuri-jobs-neutron - openstack-python3-ussuri-jobs-neutron
- tap-as-a-service-tempest-plugin-jobs - tap-as-a-service-tempest-plugin-jobs

9
doc/requirements.txt Normal file
View File

@ -0,0 +1,9 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.30.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinxcontrib-blockdiag>=1.5.4 # BSD
sphinxcontrib-seqdiag>=0.8.4 # BSD

View File

@ -22,10 +22,15 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx', 'openstackdocstheme'
'oslosphinx'
] ]
# openstackdocstheme options
repository_name = 'x/tap-as-a-service'
bug_project = 'tap-as-a-service'
bug_tag = ''
html_theme = 'openstackdocs'
# autodoc generation is a bit aggressive and a nuisance when doing heavy # autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles. # text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable # execute "export SPHINX_DEBUG=1" in your terminal to disable
@ -66,10 +71,19 @@ htmlhelp_basename = '%sdoc' % project
# [howto/manual]). # [howto/manual]).
latex_documents = [ latex_documents = [
('index', ('index',
'%s.tex' % project, 'doc-tap-as-a-service.tex',
u'%s Documentation' % project, u'Tap as a Service Documentation',
u'OpenStack Foundation', 'manual'), u'OpenStack Foundation', 'manual'),
] ]
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None} #intersphinx_mapping = {'http://docs.python.org/': None}
latex_elements = {
'makeindex': '',
'printindex': '',
'preamble': r'\setcounter{tocdepth}{3}',
# openany: Skip blank pages in generated PDFs
# oneside: Use the same page layout for both even and odd pages
'extraclassoptions': 'openany,oneside',
}

View File

@ -469,6 +469,3 @@ References
.. [2] Service base and insertion .. [2] Service base and insertion
https://review.openstack.org/#/c/93128 https://review.openstack.org/#/c/93128
.. [3] NFV unaddressed interfaces
https://review.openstack.org/#/c/97715/

View File

@ -8,7 +8,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD python-subunit>=1.0.0 # Apache-2.0/BSD
psycopg2>=2.7.5 # LGPL/ZPL psycopg2>=2.7.5 # LGPL/ZPL
PyMySQL>=0.7.6 # MIT License PyMySQL>=0.7.6 # MIT License
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0

View File

@ -2,6 +2,7 @@
envlist = docs,py35,py27,pep8 envlist = docs,py35,py27,pep8
minversion = 1.8 minversion = 1.8
skipsdist = True skipsdist = True
ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3 basepython = python3
@ -9,7 +10,7 @@ setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True usedevelop = True
install_command = pip install {opts} {packages} install_command = pip install {opts} {packages}
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} deps = -c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = find . -type f -name "*.py[c|o]" -delete commands = find . -type f -name "*.py[c|o]" -delete
@ -45,7 +46,9 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:docs] [testenv:docs]
commands = python setup.py build_sphinx deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -d doc/build/doctrees -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html