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
Alexandra Settle authored 4 years ago
Andreas Jaeger committed 3 years ago
|
0 |
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
|
1 |
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
|
2 |
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
|
3 |
reno>=2.5.0 # Apache-2.0
|
|
4 |
openstackdocstheme>=1.18.1 # Apache-2.0
|
22 | 22 |
'sphinx.ext.autodoc',
|
23 | 23 |
#'sphinx.ext.intersphinx',
|
24 | 24 |
'openstackdocstheme',
|
|
25 |
'sphinxcontrib.rsvgconverter',
|
25 | 26 |
]
|
26 | 27 |
|
27 | 28 |
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
|
70 | 71 |
# Grouping the document tree into LaTeX files. List of tuples
|
71 | 72 |
# (source start file, target name, title, author, documentclass
|
72 | 73 |
# [howto/manual]).
|
|
74 |
|
73 | 75 |
latex_documents = [
|
74 | 76 |
('index',
|
75 | |
'%s.tex' % project,
|
|
77 |
'doc-castellan.tex',
|
76 | 78 |
u'%s Documentation' % project,
|
77 | 79 |
u'OpenStack Foundation', 'manual'),
|
78 | 80 |
]
|
|
81 |
|
|
82 |
latex_elements = {
|
|
83 |
'extraclassoptions': 'openany,oneside',
|
|
84 |
}
|
|
85 |
|
|
86 |
latex_use_xindy = False
|
79 | 87 |
|
80 | 88 |
# Example configuration for intersphinx: refer to the Python standard library.
|
81 | 89 |
#intersphinx_mapping = {'https://docs.python.org/3/': None}
|
14 | 14 |
user/index
|
15 | 15 |
contributor/index
|
16 | 16 |
|
17 | |
Indices and tables
|
18 | |
==================
|
|
17 |
.. only:: html
|
19 | 18 |
|
20 | |
* :ref:`genindex`
|
21 | |
* :ref:`modindex`
|
22 | |
* :ref:`search`
|
|
19 |
Indices and tables
|
|
20 |
==================
|
23 | 21 |
|
|
22 |
* :ref:`genindex`
|
|
23 |
* :ref:`modindex`
|
|
24 |
* :ref:`search`
|
30 | 30 |
msgpack-python==0.4.0
|
31 | 31 |
netaddr==0.7.18
|
32 | 32 |
netifaces==0.10.4
|
33 | |
openstackdocstheme==1.18.1
|
34 | 33 |
os-client-config==1.28.0
|
35 | 34 |
oslo.config==6.4.0
|
36 | 35 |
oslo.context==2.19.2
|
|
55 | 54 |
python-subunit==1.0.0
|
56 | 55 |
pytz==2013.6
|
57 | 56 |
PyYAML==3.12
|
58 | |
reno==2.5.0
|
59 | 57 |
requests==2.14.2
|
60 | 58 |
requestsexceptions==1.2.0
|
61 | 59 |
rfc3986==0.3.1
|
62 | 60 |
six==1.10.0
|
63 | 61 |
smmap==0.9.0
|
64 | 62 |
snowballstemmer==1.2.1
|
65 | |
Sphinx==1.6.2
|
66 | |
sphinxcontrib-websupport==1.0.1
|
67 | 63 |
stevedore==1.20.0
|
68 | 64 |
stestr==2.0.0
|
69 | 65 |
testscenarios==0.4
|
5 | 5 |
coverage!=4.4,>=4.0 # Apache-2.0
|
6 | 6 |
python-barbicanclient>=4.5.2 # Apache-2.0
|
7 | 7 |
python-subunit>=1.0.0 # Apache-2.0/BSD
|
8 | |
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
9 | |
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
10 | |
openstackdocstheme>=1.18.1 # Apache-2.0
|
11 | 8 |
oslotest>=3.2.0 # Apache-2.0
|
12 | 9 |
stestr>=2.0.0 # Apache-2.0
|
13 | 10 |
fixtures>=3.0.0 # Apache-2.0/BSD
|
14 | 11 |
testscenarios>=0.4 # Apache-2.0/BSD
|
15 | 12 |
testtools>=2.2.0 # MIT
|
16 | 13 |
bandit>=1.1.0,<1.6.0 # Apache-2.0
|
17 | |
reno>=2.5.0 # Apache-2.0
|
18 | 14 |
pifpaf>=0.10.0 # Apache-2.0
|
56 | 56 |
coverage report
|
57 | 57 |
|
58 | 58 |
[testenv:docs]
|
|
59 |
# This environment is called from CI scripts to test and publish
|
|
60 |
# the main docs to https://docs.openstack.org/castellan
|
|
61 |
description = Build main documentation
|
59 | 62 |
basepython = python3
|
60 | |
commands = python setup.py build_sphinx
|
|
63 |
deps = -r{toxinidir}/doc/requirements.txt
|
|
64 |
commands=
|
|
65 |
rm -rf doc/build doc/build/doctrees
|
|
66 |
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
|
67 |
whitelist_externals = rm
|
|
68 |
|
|
69 |
[testenv:pdf-docs]
|
|
70 |
basepython = python3
|
|
71 |
deps = {[testenv:docs]deps}
|
|
72 |
envdir = {toxworkdir}/docs
|
|
73 |
whitelist_externals =
|
|
74 |
rm
|
|
75 |
make
|
|
76 |
commands =
|
|
77 |
rm -rf doc/build/pdf
|
|
78 |
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
79 |
make -C doc/build/pdf
|
61 | 80 |
|
62 | 81 |
[testenv:releasenotes]
|
63 | 82 |
basepython = python3
|
|
83 |
deps = {[testenv:docs]deps}
|
|
84 |
envdir = {toxworkdir}/docs
|
64 | 85 |
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
65 | 86 |
|
66 | 87 |
[testenv:functional]
|