diff --git a/doc/requirements.txt b/doc/requirements.txt index 801b843..5d8db9f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -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 diff --git a/doc/source/conf.py b/doc/source/conf.py index 8eb229c..9829dd4 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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'} diff --git a/tox.ini b/tox.ini index f172dcf..b1c2c9a 100644 --- a/tox.ini +++ b/tox.ini @@ -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: diff --git a/validations_common/library/__init__.py b/validations_common/library/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/validations_common/tests/callback_plugins/test_validation_stdout.py b/validations_common/tests/callback_plugins/test_validation_stdout.py index 95ee390..42398b4 100644 --- a/validations_common/tests/callback_plugins/test_validation_stdout.py +++ b/validations_common/tests/callback_plugins/test_validation_stdout.py @@ -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.