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. 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. Remove docs requirements from lower-constraints, they are not needed during install or test but only for docs building. 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: Ib8c912844becebbfef3bf6579ebea9350676a322
This commit is contained in:
parent
c78e1816e1
commit
7020fc48eb
@ -24,26 +24,18 @@
|
||||
# serve to show the default.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
import openstackdocstheme
|
||||
|
||||
from masakari.version import version_info
|
||||
|
||||
|
||||
extensions = [
|
||||
'os_api_ref',
|
||||
'openstackdocstheme',
|
||||
]
|
||||
|
||||
|
||||
html_theme = 'openstackdocs'
|
||||
html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
html_theme_options = {
|
||||
"sidebar_mode": "toc",
|
||||
}
|
||||
html_context = {'bug_project': 'masakari', 'bug_tag': 'api-ref'}
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another
|
||||
# directory,
|
||||
@ -74,14 +66,10 @@ master_doc = 'index'
|
||||
project = u'Masakari API Reference'
|
||||
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()
|
||||
# openstackdocstheme optionns
|
||||
openstackdocs_repo_name = 'openstack/masakari'
|
||||
openstackdocs_bug_project = 'masakari'
|
||||
openstackdocs_auto_name = False
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@ -110,7 +98,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
|
||||
# ----------------------------------------------
|
||||
@ -156,88 +144,76 @@ pygments_style = 'sphinx'
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
# html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
|
||||
"-n1"]
|
||||
try:
|
||||
html_last_updated_fmt = subprocess.Popen(
|
||||
git_cmd, stdout=subprocess.PIPE).communicate()[0].decode()
|
||||
except Exception:
|
||||
warnings.warn('Cannot get last updated time from git repository. '
|
||||
'Not setting "html_last_updated_fmt".')
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
# html_sidebars = {}
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
# html_sidebars = {}
|
||||
# Additional templates that should be rendered to pages, maps page
|
||||
# names to
|
||||
# template names.
|
||||
# html_additional_pages = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page
|
||||
# names to
|
||||
# template names.
|
||||
# html_additional_pages = {}
|
||||
# If false, no module index is generated.
|
||||
# html_use_modindex = True
|
||||
|
||||
# If false, no module index is generated.
|
||||
# html_use_modindex = True
|
||||
# If false, no index is generated.
|
||||
# html_use_index = True
|
||||
|
||||
# If false, no index is generated.
|
||||
# html_use_index = True
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
# html_split_index = False
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
# html_split_index = False
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
# html_show_sourcelink = True
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
# html_show_sourcelink = True
|
||||
# If true, an OpenSearch description file will be output, and all
|
||||
# pages will
|
||||
# contain a <link> tag referring to it. The value of this option must
|
||||
# be the
|
||||
# base URL from which the finished HTML is served.
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all
|
||||
# pages will
|
||||
# contain a <link> tag referring to it. The value of this option must
|
||||
# be the
|
||||
# base URL from which the finished HTML is served.
|
||||
# html_use_opensearch = ''
|
||||
# If nonempty, this is the file name suffix for HTML files (e.g.
|
||||
# ".xhtml").
|
||||
# html_file_suffix = ''
|
||||
|
||||
# If nonempty, this is the file name suffix for HTML files (e.g.
|
||||
# ".xhtml").
|
||||
# html_file_suffix = ''
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'masakaridoc'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'masakaridoc'
|
||||
# -- Options for LaTeX output
|
||||
# -------------------------------------------------
|
||||
|
||||
# -- Options for LaTeX output
|
||||
# -------------------------------------------------
|
||||
# The paper size ('letter' or 'a4').
|
||||
# latex_paper_size = 'letter'
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
# latex_paper_size = 'letter'
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# latex_font_size = '10pt'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
# latex_font_size = '10pt'
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [('index', 'Masakari.tex',
|
||||
u'OpenStack Masakari API Documentation',
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [('index', 'Masakari.tex',
|
||||
u'OpenStack Masakari API Documentation',
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
# The name of an image file (relative to this directory) to place at
|
||||
# the top of
|
||||
# the title page.
|
||||
# latex_logo = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at
|
||||
# the top of
|
||||
# the title page.
|
||||
# latex_logo = None
|
||||
# For "manual" documents, if this is true, then toplevel headings are
|
||||
# parts,
|
||||
# not chapters.
|
||||
# latex_use_parts = False
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are
|
||||
# parts,
|
||||
# not chapters.
|
||||
# latex_use_parts = False
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
# latex_preamble = ''
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
# latex_preamble = ''
|
||||
# Documents to append as an appendix to all manuals.
|
||||
# latex_appendices = []
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
# latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
# latex_use_modindex = True
|
||||
# If false, no module index is generated.
|
||||
# latex_use_modindex = True
|
||||
|
@ -1,10 +1,10 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.5 # BSD
|
||||
openstackdocstheme>=1.24.0 # Apache-2.0
|
||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||
openstackdocstheme>=2.2.1 # Apache-2.0
|
||||
os-api-ref>=1.4.0 # Apache-2.0
|
||||
sphinxcontrib-apidoc>=0.2.0 # BSD
|
||||
|
||||
# releasenotes
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
reno>=3.1.0 # Apache-2.0
|
||||
|
@ -66,7 +66,7 @@ add_function_parentheses = True
|
||||
add_module_names = True
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = 'native'
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
@ -78,7 +78,9 @@ pygments_style = 'sphinx'
|
||||
html_theme = 'openstackdocs'
|
||||
|
||||
# openstackdocstheme optionns
|
||||
repository_name = 'openstack/masakari'
|
||||
openstackdocs_repo_name = 'openstack/masakari'
|
||||
openstackdocs_bug_project = 'masakari'
|
||||
openstackdocs_auto_name = False
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = '%sdoc' % project
|
||||
|
@ -45,7 +45,6 @@ msgpack==0.5.6
|
||||
netaddr==0.7.19
|
||||
netifaces==0.10.6
|
||||
networkx==1.11
|
||||
openstackdocstheme==1.18.1
|
||||
openstacksdk==0.35.0 # Apache-2.0
|
||||
os-api-ref==1.4.0
|
||||
os-client-config==1.29.0
|
||||
@ -87,7 +86,6 @@ python-novaclient==9.1.0
|
||||
python-subunit==1.0.0
|
||||
pytz==2018.3
|
||||
PyYAML==3.12
|
||||
reno==2.5.0
|
||||
repoze.lru==0.7
|
||||
requests-mock==1.2.0
|
||||
requests==2.18.4
|
||||
@ -97,8 +95,6 @@ Routes==2.4.1
|
||||
simplejson==3.13.2
|
||||
six==1.10.0
|
||||
snowballstemmer==1.2.1
|
||||
Sphinx==1.6.2
|
||||
sphinxcontrib-websupport==1.0.1
|
||||
sqlalchemy-migrate==0.11.0
|
||||
SQLAlchemy==1.2.19
|
||||
sqlparse==0.2.4
|
||||
|
@ -94,7 +94,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 = []
|
||||
@ -103,7 +103,9 @@ pygments_style = 'sphinx'
|
||||
# keep_warnings = False
|
||||
|
||||
# openstackdocstheme options
|
||||
repository_name = 'openstack/masakari'
|
||||
openstackdocs_repo_name = 'openstack/masakari'
|
||||
openstackdocs_bug_project = 'masakari'
|
||||
openstackdocs_auto_name = False
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
@ -145,10 +147,6 @@ html_static_path = ['_static']
|
||||
# directly to the root of the documentation.
|
||||
# html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user