Browse Source

Switch to newer openstackdocstheme and reno versions

Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I87889f73207ecd940963fbe601ccbb79863b96ac
changes/14/729914/1
Andreas Jaeger 2 years ago
parent
commit
acb4d7b4e1
  1. 28
      api-ref/source/conf.py
  2. 6
      doc/requirements.txt
  3. 19
      doc/source/conf.py
  4. 2
      lower-constraints.txt
  5. 8
      releasenotes/source/conf.py
  6. 2
      test-requirements.txt

28
api-ref/source/conf.py

@ -25,10 +25,6 @@
import os
import sys
import openstackdocstheme
from octavia.version import version_info
extensions = [
'os_api_ref',
'openstackdocstheme'
@ -40,9 +36,8 @@ html_theme_options = {
"sidebar_dropdown": "api_ref",
"sidebar_mode": "toc"
}
repository_name = 'openstack/octavia'
bug_project = '908'
bug_tag = 'api-ref'
openstackdocs_repo_name = 'openstack/octavia'
openstackdocs_use_storyboard = True
# If extensions (or modules to document with autodoc) are in another directory,
@ -70,15 +65,6 @@ master_doc = 'index'
# General information about the project.
copyright = u'2017-present, OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
@ -106,7 +92,7 @@ add_module_names = False
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# -- Options for man page output ----------------------------------------------
@ -187,14 +173,6 @@ htmlhelp_basename = 'octaviadoc'
# -- Options for LaTeX output -------------------------------------------------
pdf_theme_path = openstackdocstheme.get_pdf_theme_path('openstackdocs')
openstack_logo = openstackdocstheme.get_theme_logo_path('openstackdocs')
latex_custom_template = r"""
\newcommand{\openstacklogo}{%s}
\usepackage{%s}
""" % (openstack_logo, pdf_theme_path)
# The paper size ('letter' or 'a4').
# latex_paper_size = 'letter'

6
doc/requirements.txt

@ -9,11 +9,11 @@ sphinxcontrib-blockdiag>=1.5.4 # BSD
sphinxcontrib-nwdiag>=0.9.5 # BSD
sphinxcontrib-seqdiag>=0.8.4 # BSD
docutils>=0.11 # OSI-Approved Open Source, Public Domain
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
sphinx>=2.0.0,!=2.1.0 # BSD
graphviz!=0.5.0,>=0.4 # MIT License
openstackdocstheme>=1.20.0 # Apache-2.0
openstackdocstheme>=2.2.1 # Apache-2.0
sadisplay>=0.4.8 # BSD
reno>=2.5.0 # Apache-2.0
reno>=3.1.0 # Apache-2.0
sphinx-feature-classification>=0.2.0 # Apache-2.0
# PDF Docs

19
doc/source/conf.py

@ -87,16 +87,6 @@ master_doc = 'index'
# General information about the project.
copyright = u'2014-2019, OpenStack Octavia Team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# Version info
from octavia.version import version_info as octavia_version
release = octavia_version.release_string()
# The short X.Y version.
version = octavia_version.version_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
@ -131,7 +121,7 @@ add_module_names = False
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['octavia.']
@ -348,9 +338,10 @@ epub_copyright = u'2014, OpenStack Octavia Team'
policy_generator_config_file = '../../etc/policy/octavia-policy-generator.conf'
sample_policy_basename = 'configuration/_static/octavia'
repository_name = 'openstack/octavia'
bug_project = '908'
bug_tag = 'docs'
openstackdocs_repo_name = 'openstack/octavia'
openstackdocs_pdf_link = True
openstackdocs_bug_project = '908'
openstackdocs_bug_tag = 'docs'
apidoc_output_dir = 'contributor/modules'
apidoc_module_dir = '../../octavia'

2
lower-constraints.txt

@ -145,7 +145,7 @@ simplejson==3.13.2
six==1.10.0
smmap2==2.0.3
snowballstemmer==1.2.1
Sphinx==1.6.2
Sphinx==2.0.0
sphinxcontrib-svg2pdfconverter==0.1.0
sphinxcontrib-websupport==1.0.1
SQLAlchemy==1.0.10

8
releasenotes/source/conf.py

@ -43,9 +43,9 @@ extensions = [
]
# openstackdocstheme options
repository_name = 'openstack/octavia'
bug_project = '908'
bug_tag = 'doc'
openstackdocs_repo_name = 'openstack/octavia'
openstackdocs_bug_project = '908'
openstackdocs_bug_tag = 'doc'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -95,7 +95,7 @@ exclude_patterns = []
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []

2
test-requirements.txt

@ -17,5 +17,5 @@ doc8>=0.6.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
# Required for pep8 - doc8 tests
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
sphinx>=2.0.0,!=2.1.0 # BSD
bashate>=0.5.1 # Apache-2.0

Loading…
Cancel
Save