From c28503f70e26112ab3017328aad63248465d3e26 Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Thu, 5 Sep 2019 19:03:49 +0800 Subject: [PATCH] Build pdf doc The is one of community goals that each project could produce a single PDF file. The pdf should be in the output of openstack-tox-docs job. TeX packages are required to build PDF locally, following is recommended: * inkscape * texlive-latex-base * texlive-latex-extra * texlive-fonts-recommended More about the goal: https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html https://etherpad.openstack.org/p/train-pdf-support-goal https://etherpad.openstack.org/p/pdf-goal-train-common-problems Change-Id: Ib7379bb5066ede1956424dc92cf302ec22053f21 --- doc/requirements.txt | 2 +- doc/source/conf.py | 15 ++++++--------- lower-constraints.txt | 2 +- tox.ini | 8 ++++++++ 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 336e4666..93bb154d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,6 @@ 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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 testtools>=2.2.0 # MIT testrepository>=0.0.18 # Apache-2.0/BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index f3d8f4f3..a2a52b02 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -160,7 +160,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'ironic-ui' copyright = u'2016, OpenStack Foundation' @@ -185,22 +184,20 @@ html_theme = 'openstackdocs' # openstackdocstheme options repository_name = 'openstack/ironic-ui' -bug_project = 'ironic-ui' -bug_tag = '' - -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' +use_storyboard = True # Output file base name for HTML help builder. -htmlhelp_basename = '%sdoc' % project +htmlhelp_basename = 'ironic-uidoc' + +latex_use_xindy = False # 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, - u'%s Documentation' % project, + 'doc-ironic-ui.tex', + u'Ironic UI Documentation', u'OpenStack Foundation', 'manual'), ] diff --git a/lower-constraints.txt b/lower-constraints.txt index d715bd02..7742ce8d 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -46,7 +46,7 @@ msgpack==0.5.6 munch==2.2.0 netaddr==0.7.19 netifaces==0.10.6 -openstackdocstheme==1.18.1 +openstackdocstheme==1.20.0 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 diff --git a/tox.ini b/tox.ini index b351a156..62bbbfc3 100644 --- a/tox.ini +++ b/tox.ini @@ -55,6 +55,14 @@ deps = commands = sphinx-build -W -b html doc/source doc/build/html +[testenv:pdf-docs] +basepython = python3 +deps = {[testenv:docs]deps} +whitelist_externals = make +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [testenv:debug] basepython = python3 commands = oslo_debug_helper -t ironic_ui/test/tests {posargs}