diff --git a/doc/requirements.txt b/doc/requirements.txt index 6eb8d80..b13a523 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,3 +3,4 @@ sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD openstackdocstheme>=1.20.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 sphinxcontrib-apidoc>=0.2.0 # BSD +sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 1947082..856d39a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -7,17 +7,12 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinxcontrib.apidoc', 'sphinx.ext.viewcode', + 'sphinxcontrib.rsvgconverter', + 'openstackdocstheme', ] -try: - import openstackdocstheme - extensions.append('openstackdocstheme') -except ImportError: - openstackdocstheme = None - repository_name = 'openstack/python-ironic-inspector-client' -bug_project = 'python-ironic-inspector-client' -bug_tag = '' +use_storyboard = True wsme_protocols = ['restjson'] @@ -41,7 +36,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Ironic Inspector Client' copyright = u'OpenStack Foundation' # A list of ignored prefixes for module index sorting. @@ -61,17 +55,15 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -if openstackdocstheme is not None: - html_theme = 'openstackdocs' -else: - html_theme = 'default' +html_theme = 'openstackdocs' #html_theme_path = ["."] #html_theme = '_theme' #html_static_path = ['_static'] # Output file base name for HTML help builder. -htmlhelp_basename = '%sdoc' % project +htmlhelp_basename = 'python-ironic-inspector-clientdoc' +latex_use_xindy = False # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass @@ -79,8 +71,8 @@ htmlhelp_basename = '%sdoc' % project latex_documents = [ ( 'index', - '%s.tex' % project, - u'%s Documentation' % project, + 'doc-python-ironic-inspector-client.tex', + u'Python Ironic Inspector Client Documentation', u'OpenStack Foundation', 'manual' ), diff --git a/lower-constraints.txt b/lower-constraints.txt index 7658135..942de66 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -76,6 +76,7 @@ simplejson==3.5.1 six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.2 +sphinxcontrib-svg2pdfconverter==0.1.0 sphinxcontrib-websupport==1.0.1 stevedore==1.20.0 testtools==2.2.0 diff --git a/tox.ini b/tox.ini index ea44dcb..51b7691 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,7 @@ commands = coverage run --branch --include "ironic_inspector_client*" -m unittest discover ironic_inspector_client.test coverage report -m --fail-under 90 setenv = PYTHONDONTWRITEBYTECODE=1 +passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] basepython = python3 @@ -70,6 +71,14 @@ deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html +[testenv:pdf-docs] +basepython = python3 +whitelist_externals = make +deps = {[testenv:docs]deps} +commands = + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [flake8] import-order-style = pep8 application-import-names = ironic_inspector_client