PDF Documentation Build tox target
Change-Id: I54e3d3d6fbe0b753597703b6e61f884703c4e7e7 Signed-off-by: sonpn13 <sonpn13@viettel.com.vn> Story: 2006105 Task: 35341
This commit is contained in:
parent
f4cae325f9
commit
f018d205f5
|
@ -0,0 +1,16 @@
|
||||||
|
# The order of packages is significant, because pip processes them in the order
|
||||||
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
|
# WARNING:
|
||||||
|
# This file is maintained in the openstack-ansible-tests repository.
|
||||||
|
# https://opendev.org/openstack/openstack-ansible-tests/src/branch/master/sync/doc/requirements.txt
|
||||||
|
# If you need to modify this file, update the one in the
|
||||||
|
# openstack-ansible-tests repository. Once it merges there, the changes will
|
||||||
|
# automatically be proposed to all the repositories which use it.
|
||||||
|
|
||||||
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
|
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||||
|
openstackdocstheme>=2.2.1 # Apache-2.0
|
||||||
|
reno>=3.1.0 # Apache-2.0
|
||||||
|
doc8>=0.6.0 # Apache-2.0
|
|
@ -37,6 +37,8 @@
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'openstackdocstheme',
|
'openstackdocstheme',
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinxcontrib.rsvgconverter',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -61,11 +63,11 @@ description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
|
||||||
project = 'OpenStack-Ansible'
|
project = 'OpenStack-Ansible'
|
||||||
role_name = 'specs'
|
role_name = 'specs'
|
||||||
target_name = 'openstack-ansible-' + role_name
|
target_name = 'openstack-ansible-' + role_name
|
||||||
title = 'OpenStack-Ansible ' + role_name + ' Documentation'
|
title = 'OpenStack-Ansible Documentation: ' + role_name + ' role'
|
||||||
|
|
||||||
|
|
||||||
# openstackdocstheme options
|
# openstackdocstheme options
|
||||||
openstackdocs_repo_name = 'openstack/' + target_name
|
openstackdocs_repo_name = 'openstack/' + target_name
|
||||||
|
openstackdocs_pdf_link = True
|
||||||
openstackdocs_bug_project = project.lower()
|
openstackdocs_bug_project = project.lower()
|
||||||
openstackdocs_bug_tag = ''
|
openstackdocs_bug_tag = ''
|
||||||
|
|
||||||
|
@ -147,7 +149,7 @@ html_theme = 'openstackdocs'
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
# html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
|
|
||||||
# Add any extra paths that contain custom files (such as robots.txt or
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
# .htaccess) here, relative to this directory. These files are copied
|
# .htaccess) here, relative to this directory. These files are copied
|
||||||
|
@ -228,10 +230,12 @@ latex_elements = {
|
||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, target_name + '.tex',
|
(master_doc, 'doc-' + target_name + '.tex',
|
||||||
title, author, 'manual'),
|
title.replace("_", r"\_"), author, 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
latex_use_xindy = False
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
# the title page.
|
# the title page.
|
||||||
# latex_logo = None
|
# latex_logo = None
|
||||||
|
@ -288,3 +292,11 @@ texinfo_documents = [
|
||||||
|
|
||||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
# texinfo_no_detailmenu = False
|
# texinfo_no_detailmenu = False
|
||||||
|
# -- Options for PDF output --------------------------------------------------
|
||||||
|
|
||||||
|
pdf_documents = [
|
||||||
|
(master_doc, target_name,
|
||||||
|
title, author)
|
||||||
|
]
|
||||||
|
|
||||||
|
locale_dirs = ['locale/']
|
||||||
|
|
11
tox.ini
11
tox.ini
|
@ -28,11 +28,20 @@ setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands=
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
|
commands =
|
||||||
bash -c "rm -rf doc/build"
|
bash -c "rm -rf doc/build"
|
||||||
doc8 doc
|
doc8 doc
|
||||||
sphinx-build -W -b html doc/source doc/build/html
|
sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
|
[testenv:pdf-docs]
|
||||||
|
deps = {[testenv:docs]deps}
|
||||||
|
allowlist_external =
|
||||||
|
make
|
||||||
|
commands =
|
||||||
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||||
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
# Settings for doc8:
|
# Settings for doc8:
|
||||||
extensions = .rst
|
extensions = .rst
|
||||||
|
|
Loading…
Reference in New Issue