From 53026b9867610b313c71128ef88b24d6102bccda Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 12:44:43 +0200 Subject: [PATCH] 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_version to not auto-version the documents. 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 test-requirements, 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: I7a752815abf068c8fecadfa8ecbf01e77bf6efdc --- doc/requirements.txt | 2 +- doc/source/conf.py | 8 +++++--- releasenotes/source/conf.py | 7 ++++--- test-requirements.txt | 3 --- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 9638eea..cd4eb0d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,2 +1,2 @@ -openstackdocstheme>=1.30.0 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 549d29e..29dfcb0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -48,7 +48,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 -------------------------------------------------- @@ -87,5 +87,7 @@ latex_documents = [ # intersphinx_mapping = {'http://docs.python.org/': None} # -- Options for openstackdocstheme ------------------------------------------- -repository_name = 'openstack/vitrage-dashboard' -use_storyboard = True +openstackdocs_repo_name = 'openstack/vitrage-dashboard' +openstackdocs_pdf_link = True +openstackdocs_auto_name = False +openstackdocs_use_storyboard = True diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 012a4a5..38faa38 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -48,7 +48,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 -------------------------------------------------- @@ -77,5 +77,6 @@ latex_documents = [ locale_dirs = ['locale/'] # -- Options for openstackdocstheme ------------------------------------------- -repository_name = 'openstack/vitrage-dashboard' -use_storyboard = True +openstackdocs_repo_name = 'openstack/vitrage-dashboard' +openstackdocs_auto_name = False +openstackdocs_use_storyboard = True diff --git a/test-requirements.txt b/test-requirements.txt index 27afa31..7509d70 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,14 +6,11 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0 coverage>=3.6 python-subunit>=0.0.18 -sphinx!=2.1.0,>=2.0.0 # BSD nodeenv>=0.9.4 # BSD -openstackdocstheme>=2.0.0 # Apache-2.0 testrepository>=0.0.18 testscenarios>=0.4 testtools>=1.4.0 pytest>=5.3.5 # MIT -reno>=2.5.0 # Apache-2.0 # integration tests requirements selenium>=2.50.1 # Apache-2.0