Skip to content

Commit 4b52d4d

Browse files
committed
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. 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. Remove python 3 versioning from lower-constraints and requirements to pass requirements-check. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: Id478711abb1783422ebb4ee9937d1b7202fdf2f3
1 parent 6c0f3f4 commit 4b52d4d

File tree

6 files changed

+17
-42
lines changed

6 files changed

+17
-42
lines changed

api-ref/source/conf.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# limitations under the License.
1313

1414
import os
15-
import subprocess
1615
import sys
1716

1817

@@ -56,13 +55,6 @@
5655
project = u'Workflow Service API Reference'
5756
copyright = u'2017, Mistral Contributors'
5857

59-
# The version info for the project you're documenting, acts as replacement for
60-
# |version| and |release|, also used in various other places throughout the
61-
# built documents.
62-
from mistral.version import version_info
63-
release = version_info.release_string()
64-
version = version_info.version_string()
65-
6658
# If true, sectionauthor and moduleauthor directives will be shown in the
6759
# output. They are ignored by default.
6860
show_authors = False
@@ -75,7 +67,7 @@
7567
add_module_names = True
7668

7769
# The name of the Pygments (syntax highlighting) style to use.
78-
pygments_style = 'sphinx'
70+
pygments_style = 'native'
7971

8072
# -- Options for HTML output --------------------------------------------------
8173

@@ -93,14 +85,6 @@
9385
# A list of ignored prefixes for module index sorting.
9486
modindex_common_prefix = ['mistral.']
9587

96-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
97-
# using the given strftime format.
98-
# html_last_updated_fmt = '%b %d, %Y'
99-
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
100-
"-n1"]
101-
html_last_updated_fmt = subprocess.check_output(
102-
git_cmd).decode('utf-8')
103-
10488
# The name for this set of Sphinx documents. If None, it defaults to
10589
# "<project> v<release> documentation".
10690
html_title = 'Mistral API Reference'

doc/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
sphinx>=1.8.0,!=2.1.0,!=3.0.0;python_version>='3.4' # BSD
1+
sphinx>=2.0.0,!=2.1.0 # BSD
22
sphinxcontrib-httpdomain>=1.3.0 # BSD
33
sphinxcontrib-pecanwsme>=0.8.0 # Apache-2.0
4-
openstackdocstheme>=1.30.0 # Apache-2.0
4+
openstackdocstheme>=2.2.1 # Apache-2.0
55
os-api-ref>=1.4.0 # Apache-2.0
6-
reno>=2.5.0 # Apache-2.0
6+
reno>=3.1.0 # Apache-2.0

doc/source/conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
add_module_names = True
7575

7676
# The name of the Pygments (syntax highlighting) style to use.
77-
pygments_style = 'sphinx'
77+
pygments_style = 'native'
7878

7979
# -- Options for HTML output --------------------------------------------------
8080

@@ -105,9 +105,11 @@
105105

106106
# -- Options for openstackdocstheme -------------------------------------------
107107

108-
repository_name = 'openstack/mistral'
109-
bug_project = 'mistral'
110-
bug_tag = 'doc'
108+
openstackdocs_repo_name = 'openstack/mistral'
109+
openstackdocs_pdf_link = True
110+
openstackdocs_auto_name = False
111+
openstackdocs_bug_project = 'mistral'
112+
openstackdocs_bug_tag = 'doc'
111113

112114
latex_use_xindy = False
113115

lower-constraints.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ keystonemiddleware==4.18.0
1313
kombu==4.6.1
1414
mistral-lib==1.4.0
1515
mock==2.0.0
16-
networkx==2.3;python_version>='3.4'
17-
networkx==1.10;python_version<'3.0'
16+
networkx==2.3
1817
nose==1.3.7
1918
oslo.concurrency==3.26.0
2019
oslo.config==5.2.0
@@ -37,14 +36,9 @@ pecan==1.2.1
3736
Pygments==2.2.0
3837
PyJWT==1.5
3938
PyYAML==5.1
40-
reno==2.5.0
4139
requests-mock==1.2.0
4240
requests==2.14.2
4341
six==1.10.0
44-
Sphinx==1.8.0
45-
sphinxcontrib-httpdomain==1.3.0
46-
sphinxcontrib-pecanwsme==0.10.0
47-
sphinxcontrib-websupport==1.0.1
4842
SQLAlchemy==1.2.5
4943
stestr==2.0.0
5044
stevedore==1.20.0

releasenotes/source/conf.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
# show_authors = False
9393

9494
# The name of the Pygments (syntax highlighting) style to use.
95-
pygments_style = 'sphinx'
95+
pygments_style = 'native'
9696

9797
# A list of ignored prefixes for module index sorting.
9898
# modindex_common_prefix = []
@@ -141,11 +141,6 @@
141141
# directly to the root of the documentation.
142142
# html_extra_path = []
143143

144-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
145-
# using the given strftime format.
146-
# Must set this variable to include year, month, day, hours, and minutes.
147-
html_last_updated_fmt = '%Y-%m-%d %H:%M'
148-
149144
# If true, SmartyPants will be used to convert quotes and dashes to
150145
# typographically correct entities.
151146
# html_use_smartypants = True
@@ -270,6 +265,7 @@
270265
locale_dirs = ['locale/']
271266

272267
# -- Options for openstackdocstheme -------------------------------------------
273-
repository_name = 'openstack/mistral'
274-
bug_project = 'mistral'
275-
bug_tag = ''
268+
openstackdocs_repo_name = 'openstack/mistral'
269+
openstackdocs_auto_name = False
270+
openstackdocs_bug_project = 'mistral'
271+
openstackdocs_bug_tag = ''

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jsonschema>=2.6.0 # MIT
1313
keystonemiddleware>=4.18.0 # Apache-2.0
1414
kombu!=4.0.2,>=4.6.1 # BSD
1515
mistral-lib>=1.4.0 # Apache-2.0
16-
networkx<2.3,>=1.10;python_version<'3.0' # BSD
17-
networkx>=2.3;python_version>='3.4' # BSD
16+
networkx>=2.3 # BSD
1817
oslo.concurrency>=3.26.0 # Apache-2.0
1918
oslo.config>=5.2.0 # Apache-2.0
2019
oslo.context>=2.20.0 # Apache-2.0

0 commit comments

Comments
 (0)