PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build PDF versions of our docs. As per the Train community goal: https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt to convert our SVGs. This PR also introduces the docs testenv and a doc requirements.txt file. Change-Id: If782737efe7114422be9cc3fc586500a2065f07e Story: 2006072
This commit is contained in:
parent
54af64d0d3
commit
6a90cdc520
5
doc/requirements.txt
Normal file
5
doc/requirements.txt
Normal file
@ -0,0 +1,5 @@
|
||||
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
||||
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
@ -23,6 +23,7 @@ extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
#'sphinx.ext.intersphinx',
|
||||
'openstackdocstheme',
|
||||
'sphinxcontrib.rsvgconverter',
|
||||
]
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
@ -71,13 +72,20 @@ html_extra_path = ['_extra']
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
|
||||
latex_documents = [
|
||||
('index',
|
||||
'%s.tex' % project,
|
||||
'doc-castellan.tex',
|
||||
u'%s Documentation' % project,
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
latex_elements = {
|
||||
'extraclassoptions': 'openany,oneside',
|
||||
}
|
||||
|
||||
latex_use_xindy = False
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'https://docs.python.org/3/': None}
|
||||
|
||||
|
@ -15,10 +15,11 @@ Contents
|
||||
user/index
|
||||
contributor/index
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
.. only:: html
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
@ -31,7 +31,6 @@ mox3==0.20.0
|
||||
msgpack-python==0.4.0
|
||||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
openstackdocstheme==1.18.1
|
||||
os-client-config==1.28.0
|
||||
oslo.config==6.4.0
|
||||
oslo.context==2.19.2
|
||||
@ -56,15 +55,12 @@ python-mimeparse==1.6.0
|
||||
python-subunit==1.0.0
|
||||
pytz==2013.6
|
||||
PyYAML==3.12
|
||||
reno==2.5.0
|
||||
requests==2.14.2
|
||||
requestsexceptions==1.2.0
|
||||
rfc3986==0.3.1
|
||||
six==1.10.0
|
||||
smmap==0.9.0
|
||||
snowballstemmer==1.2.1
|
||||
Sphinx==1.6.2
|
||||
sphinxcontrib-websupport==1.0.1
|
||||
stevedore==1.20.0
|
||||
stestr==2.0.0
|
||||
testscenarios==0.4
|
||||
|
@ -6,14 +6,10 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
python-barbicanclient>=4.5.2 # Apache-2.0
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
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.18.1 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
bandit>=1.1.0,<1.6.0 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
pifpaf>=0.10.0 # Apache-2.0
|
||||
|
23
tox.ini
23
tox.ini
@ -57,11 +57,32 @@ commands =
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
# This environment is called from CI scripts to test and publish
|
||||
# the main docs to https://docs.openstack.org/castellan
|
||||
description = Build main documentation
|
||||
basepython = python3
|
||||
commands = python setup.py build_sphinx
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands=
|
||||
rm -rf doc/build doc/build/doctrees
|
||||
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
||||
whitelist_externals = rm
|
||||
|
||||
[testenv:pdf-docs]
|
||||
basepython = python3
|
||||
deps = {[testenv:docs]deps}
|
||||
envdir = {toxworkdir}/docs
|
||||
whitelist_externals =
|
||||
rm
|
||||
make
|
||||
commands =
|
||||
rm -rf doc/build/pdf
|
||||
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||
make -C doc/build/pdf
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = {[testenv:docs]deps}
|
||||
envdir = {toxworkdir}/docs
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:functional]
|
||||
|
Loading…
Reference in New Issue
Block a user