Skip to content

Commit 6c0e4d7

Browse files
committed
PDF documentation build
Also reorganizes the document structure to match both HTML and PDF docs. Story: 2006100 Task: 35143 Change-Id: Ie3f38e2ecf52e6a6cbd52bb36196e6f589f1ca0f
1 parent 3f286e7 commit 6c0e4d7

File tree

9 files changed

+34
-21
lines changed

9 files changed

+34
-21
lines changed

doc/source/conf.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@
7272
# robots.txt.
7373
html_extra_path = ['_extra']
7474

75+
# -- Options for LaTeX output -------------------------------------------------
76+
77+
latex_documents = [
78+
('index', 'doc-python-novaclient.tex', u'python-novaclient Documentation',
79+
u'OpenStack Foundation', 'manual'),
80+
]
81+
82+
latex_elements = {
83+
'extraclassoptions': 'openany,oneside',
84+
'preamble': r'\setcounter{tocdepth}{4}',
85+
'makeindex': '',
86+
'printindex': '',
87+
}
88+
7589
# -- Options for openstackdocstheme -------------------------------------------
7690

7791
repository_name = 'openstack/python-novaclient'
File renamed without changes.

doc/source/contributor/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ __ https://docs.openstack.org/infra/manual/developers.html#development-workflow
1515

1616
microversions
1717
testing
18+
deprecation-policy

doc/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
===========================================
44

55
This is a client for OpenStack Nova API. There's a :doc:`Python API
6-
<reference/api/index>` (the :mod:`novaclient` module), and a :doc:`command-line
6+
<reference/index>` (the :mod:`novaclient` module), and a :doc:`command-line
77
script </user/shell>` (installed as :program:`nova`). Each implements the
88
entire OpenStack Nova API.
99

@@ -22,6 +22,6 @@ such as TryStack, HP, or Rackspace, in order to use the nova client.
2222
:maxdepth: 2
2323

2424
user/index
25-
reference/index
2625
cli/index
26+
reference/index
2727
contributor/index

doc/source/reference/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
=========
12
Reference
23
=========
34

45
.. toctree::
5-
:maxdepth: 1
6+
:maxdepth: 6
67

7-
api/index
8-
deprecation-policy
8+
api/modules

doc/source/user/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
:maxdepth: 2
77

88
shell
9+
python-api
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,4 @@ Then call methods on its managers::
101101
Reference
102102
---------
103103

104-
For more information, see the reference:
105-
106-
.. toctree::
107-
:maxdepth: 6
108-
109-
modules
104+
See :doc:`the module reference </reference/index>`.

doc/source/user/shell.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,4 @@ From there, all shell commands take the form::
8787
Run :program:`nova help` to get a full list of all possible commands, and run
8888
:program:`nova help <command>` to get detailed help for that command.
8989

90-
Reference
91-
---------
92-
93-
For more information, see the reference:
94-
95-
.. toctree::
96-
:maxdepth: 2
97-
98-
/cli/nova
90+
For more information, see :doc:`the command reference </cli/nova>`.

tox.ini

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ usedevelop = True
99
whitelist_externals =
1010
find
1111
rm
12+
make
1213
passenv = ZUUL_CACHE_DIR
1314
REQUIREMENTS_PIP_LOCATION
1415
install_command = pip install {opts} {packages}
@@ -44,11 +45,20 @@ deps =
4445
-r{toxinidir}/requirements.txt
4546
-r{toxinidir}/doc/requirements.txt
4647
commands =
47-
rm -rf doc/build
48+
rm -rf doc/build/html doc/build/doctrees
4849
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
4950
# Test the redirects. This must run after the main docs build
5051
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
5152

53+
[testenv:pdf-docs]
54+
basepython = python3
55+
envdir = {toxworkdir}/docs
56+
deps = {[testenv:docs]deps}
57+
commands =
58+
rm -rf doc/build/pdf
59+
sphinx-build -W -b latex doc/source doc/build/pdf
60+
make -C doc/build/pdf
61+
5262
[testenv:releasenotes]
5363
basepython = python3
5464
deps =

0 commit comments

Comments
 (0)