summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2019-10-11 03:48:51 +0900
committerAkihiro Motoki <amotoki@gmail.com>2019-10-11 03:51:38 +0900
commit6c0e4d7a3940ba6d4d11d0c89933cc00b898ed9e (patch)
tree375c38166573f7ec0f6b2e0a689c29ca8a48171f
parent3f286e7d8c83f665cb00b32c7f9ccaa00f03e628 (diff)
downloadpython-novaclient-6c0e4d7a3940ba6d4d11d0c89933cc00b898ed9e.tar.gz
PDF documentation build
Also reorganizes the document structure to match both HTML and PDF docs. Story: 2006100 Task: 35143 Change-Id: Ie3f38e2ecf52e6a6cbd52bb36196e6f589f1ca0f
-rw-r--r--doc/source/conf.py14
-rw-r--r--doc/source/contributor/deprecation-policy.rst (renamed from doc/source/reference/deprecation-policy.rst)0
-rw-r--r--doc/source/contributor/index.rst1
-rw-r--r--doc/source/index.rst4
-rw-r--r--doc/source/reference/index.rst6
-rw-r--r--doc/source/user/index.rst1
-rw-r--r--doc/source/user/python-api.rst (renamed from doc/source/reference/api/index.rst)7
-rw-r--r--doc/source/user/shell.rst10
-rw-r--r--tox.ini12
9 files changed, 34 insertions, 21 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index f90c50ad..5e69e49c 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -72,6 +72,20 @@ html_theme = 'openstackdocs'
# robots.txt.
html_extra_path = ['_extra']
+# -- Options for LaTeX output -------------------------------------------------
+
+latex_documents = [
+ ('index', 'doc-python-novaclient.tex', u'python-novaclient Documentation',
+ u'OpenStack Foundation', 'manual'),
+]
+
+latex_elements = {
+ 'extraclassoptions': 'openany,oneside',
+ 'preamble': r'\setcounter{tocdepth}{4}',
+ 'makeindex': '',
+ 'printindex': '',
+}
+
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/python-novaclient'
diff --git a/doc/source/reference/deprecation-policy.rst b/doc/source/contributor/deprecation-policy.rst
index c7e84fbb..c7e84fbb 100644
--- a/doc/source/reference/deprecation-policy.rst
+++ b/doc/source/contributor/deprecation-policy.rst
diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst
index 58b9bd7e..50fd507f 100644
--- a/doc/source/contributor/index.rst
+++ b/doc/source/contributor/index.rst
@@ -15,3 +15,4 @@ __ https://docs.openstack.org/infra/manual/developers.html#development-workflow
microversions
testing
+ deprecation-policy
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 243c9497..5c088795 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -3,7 +3,7 @@
===========================================
This is a client for OpenStack Nova API. There's a :doc:`Python API
-<reference/api/index>` (the :mod:`novaclient` module), and a :doc:`command-line
+<reference/index>` (the :mod:`novaclient` module), and a :doc:`command-line
script </user/shell>` (installed as :program:`nova`). Each implements the
entire OpenStack Nova API.
@@ -22,6 +22,6 @@ such as TryStack, HP, or Rackspace, in order to use the nova client.
:maxdepth: 2
user/index
- reference/index
cli/index
+ reference/index
contributor/index
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index 92e93855..272b64ad 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -1,8 +1,8 @@
+=========
Reference
=========
.. toctree::
- :maxdepth: 1
+ :maxdepth: 6
- api/index
- deprecation-policy
+ api/modules
diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst
index 3c54920b..32510e67 100644
--- a/doc/source/user/index.rst
+++ b/doc/source/user/index.rst
@@ -6,3 +6,4 @@
:maxdepth: 2
shell
+ python-api
diff --git a/doc/source/reference/api/index.rst b/doc/source/user/python-api.rst
index d4959400..b01e07f1 100644
--- a/doc/source/reference/api/index.rst
+++ b/doc/source/user/python-api.rst
@@ -101,9 +101,4 @@ Then call methods on its managers::
Reference
---------
-For more information, see the reference:
-
-.. toctree::
- :maxdepth: 6
-
- modules
+See :doc:`the module reference </reference/index>`.
diff --git a/doc/source/user/shell.rst b/doc/source/user/shell.rst
index 882bb756..465b0fb4 100644
--- a/doc/source/user/shell.rst
+++ b/doc/source/user/shell.rst
@@ -87,12 +87,4 @@ From there, all shell commands take the form::
Run :program:`nova help` to get a full list of all possible commands, and run
:program:`nova help <command>` to get detailed help for that command.
-Reference
----------
-
-For more information, see the reference:
-
-.. toctree::
- :maxdepth: 2
-
- /cli/nova
+For more information, see :doc:`the command reference </cli/nova>`.
diff --git a/tox.ini b/tox.ini
index dec23521..ce99fb0b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,6 +9,7 @@ usedevelop = True
whitelist_externals =
find
rm
+ make
passenv = ZUUL_CACHE_DIR
REQUIREMENTS_PIP_LOCATION
install_command = pip install {opts} {packages}
@@ -44,11 +45,20 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
- rm -rf doc/build
+ rm -rf doc/build/html doc/build/doctrees
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
# Test the redirects. This must run after the main docs build
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
+[testenv:pdf-docs]
+basepython = python3
+envdir = {toxworkdir}/docs
+deps = {[testenv:docs]deps}
+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 =