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,18 +144,6 @@ 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
|
||||
|
|
|
@ -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…
Reference in New Issue