Docs are now built in pdf

Adds __init__.py to libraries dir, because sphinx
doesn't generate proper toctree otherwise.

Fixes indentation in one of the docstrings that blocked
the jobs.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Id5d1f5acce172ea90574a257fb0e8bc3da1f6fe2
This commit is contained in:
Jiri Podivin 2021-03-02 12:04:20 +01:00
parent 8bacb68b69
commit d9434d88c1
5 changed files with 16 additions and 7 deletions

View File

@ -3,6 +3,7 @@ sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.2 # Apache-2.0 openstackdocstheme>=2.2.2 # Apache-2.0
reno>=3.1.0 # Apache-2.0 reno>=3.1.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-svg2pdfconverter>=1.1.1 # BSD License
doc8>=0.8.0 # Apache-2.0 doc8>=0.8.0 # Apache-2.0
bashate>=0.6.0 # Apache-2.0 bashate>=0.6.0 # Apache-2.0
six>=1.11.0 # MIT six>=1.11.0 # MIT

View File

@ -27,6 +27,7 @@ sys.path.insert(0, os.path.join(os.path.abspath('.'), '_exts'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = [
'sphinxcontrib.apidoc', 'sphinxcontrib.apidoc',
'sphinxcontrib.rsvgconverter',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
'openstackdocstheme', 'openstackdocstheme',
@ -42,6 +43,7 @@ apidoc_separate_modules = True
# openstackdocstheme options # openstackdocstheme options
openstackdocs_repo_name = 'openstack/validations-common' openstackdocs_repo_name = 'openstack/validations-common'
openstackdocs_use_storyboard = True openstackdocs_use_storyboard = True
openstackdocs_pdf_link = True
openstackdocs_bug_project = 'tripleo' openstackdocs_bug_project = 'tripleo'
openstackdocs_bug_tag = 'documentation' openstackdocs_bug_tag = 'documentation'
@ -103,3 +105,6 @@ latex_documents = [
'manual' 'manual'
), ),
] ]
# Allow deeper levels of nesting for \begin...\end stanzas
latex_elements = {'maxlistdepth': 10, 'extraclassoptions': ',openany,oneside'}

16
tox.ini
View File

@ -130,13 +130,15 @@ commands=
sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
doc8 doc doc8 doc
#TODO(jpodivin): pdf-docs don't compile properly [testenv:pdf-docs]
; [testenv:pdf-docs] whitelist_externals = make
; whitelist_externals = make description =
; deps = {[testenv:docs]deps} Build PDF documentation.
; commands = envdir = {toxworkdir}/docs
; sphinx-build -W -b latex doc/source doc/build/pdf deps = {[testenv:docs]deps}
; make -C doc/build/pdf commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8] [doc8]
# Settings for doc8: # Settings for doc8:

View File

View File

@ -36,6 +36,7 @@ def is_iso_time(time_string):
with the default delimiter. with the default delimiter.
Regex is somewhat convoluted, but general enough to last Regex is somewhat convoluted, but general enough to last
at least until the 9999 AD. at least until the 9999 AD.
Returns: Returns:
True if string matches the pattern. True if string matches the pattern.
False otherwise. False otherwise.