Browse Source

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
changes/69/778169/5
Jiri Podivin 2 months ago
parent
commit
d9434d88c1
5 changed files with 16 additions and 7 deletions
  1. +1
    -0
      doc/requirements.txt
  2. +5
    -0
      doc/source/conf.py
  3. +9
    -7
      tox.ini
  4. +0
    -0
      validations_common/library/__init__.py
  5. +1
    -0
      validations_common/tests/callback_plugins/test_validation_stdout.py

+ 1
- 0
doc/requirements.txt View File

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

+ 5
- 0
doc/source/conf.py 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 = [
'sphinxcontrib.apidoc',
'sphinxcontrib.rsvgconverter',
'sphinx.ext.viewcode',
'sphinx.ext.autodoc',
'openstackdocstheme',
@ -42,6 +43,7 @@ apidoc_separate_modules = True
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/validations-common'
openstackdocs_use_storyboard = True
openstackdocs_pdf_link = True
openstackdocs_bug_project = 'tripleo'
openstackdocs_bug_tag = 'documentation'
@ -103,3 +105,6 @@ latex_documents = [
'manual'
),
]
# Allow deeper levels of nesting for \begin...\end stanzas
latex_elements = {'maxlistdepth': 10, 'extraclassoptions': ',openany,oneside'}

+ 9
- 7
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
doc8 doc
#TODO(jpodivin): pdf-docs don't compile properly
; [testenv:pdf-docs]
; whitelist_externals = make
; deps = {[testenv:docs]deps}
; commands =
; sphinx-build -W -b latex doc/source doc/build/pdf
; make -C doc/build/pdf
[testenv:pdf-docs]
whitelist_externals = make
description =
Build PDF documentation.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8]
# Settings for doc8:


+ 0
- 0
validations_common/library/__init__.py View File


+ 1
- 0
validations_common/tests/callback_plugins/test_validation_stdout.py View File

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


Loading…
Cancel
Save