From 749a792eb4e6a3c1db5cb49181a4085c3bd544fa Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Tue, 2 Jul 2019 11:32:48 +0800 Subject: [PATCH] Bump the openstackdocstheme extension to 1.20 Some options are now automatically configured by the version 1.20: - project - html_last_updated_fmt - latex_engine - latex_elements - version - release. Change-Id: I1e6e570d4db575d611212198d11ee4b84884ab23 --- api-ref/source/conf.py | 24 ------------------------ doc/requirements.txt | 2 +- doc/source/conf.py | 15 +++------------ lower-constraints.txt | 2 +- releasenotes/source/conf.py | 16 ---------------- 5 files changed, 5 insertions(+), 54 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index da7720ccdd..3c968924f7 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -24,9 +24,7 @@ # serve to show the default. import os -import subprocess import sys -import warnings extensions = [ 'os_api_ref', @@ -61,19 +59,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Container Infrastructure Management API Reference' copyright = u'2010-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. -# -from magnum.version import version_info -# 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. # @@ -150,17 +137,6 @@ bug_tag = 'api-ref' # 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.check_output(git_cmd).decode('utf-8') -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 diff --git a/doc/requirements.txt b/doc/requirements.txt index e647310699..70411996f3 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,7 @@ # 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. -openstackdocstheme>=1.18.1 # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 osprofiler>=1.4.0 # Apache-2.0 os-api-ref>=1.4.0 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 4b55808b72..53eefe532d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -51,7 +51,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'magnum' copyright = u'2013, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. @@ -64,12 +63,6 @@ add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' -# The short X.Y version. -from magnum.version import version_info as magnum_version -version = magnum_version.canonical_version_string() -# The full version, including alpha/beta/rc tags. -release = magnum_version.version_string_with_vcs() - # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with @@ -79,17 +72,15 @@ html_theme = 'openstackdocs' # html_static_path = ['static'] # Output file base name for HTML help builder. -htmlhelp_basename = '%sdoc' % project - -html_last_updated_fmt = '%Y-%m-%d %H:%M' +htmlhelp_basename = 'magnumdoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ('index', - '%s.tex' % project, - u'%s Documentation' % project, + 'magnum.tex', + u'magnum Documentation', u'OpenStack Foundation', 'manual'), ] diff --git a/lower-constraints.txt b/lower-constraints.txt index f01209b2ec..8d7c2a80d4 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -68,7 +68,7 @@ netaddr==0.7.18 netifaces==0.10.6 networkx==1.11 oauthlib==2.0.6 -openstackdocstheme==1.18.1 +openstackdocstheme==1.20.0 openstacksdk==0.12.0 os-api-ref==1.4.0 os-client-config==1.29.0 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index beab326528..bf90a5ccfb 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -61,7 +61,6 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Magnum Release Notes' copyright = u'2016, Magnum developers' # Remove setting of version/release @@ -150,10 +149,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 = '%Y-%m-%d %H:%M' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True @@ -197,17 +192,6 @@ htmlhelp_basename = 'MagnumReleaseNotesdoc' # -- Options for LaTeX output --------------------------------------------- -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # 'preamble': '', -} - # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]).