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.

Set openstackdocs_auto_name to use 'project' 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: I477de339e7a2851311a712ff28689ad354ef0229
This commit is contained in:
Andreas Jaeger 2020-05-21 10:18:47 +02:00
parent 37b778fbc2
commit 0836afb94b
6 changed files with 21 additions and 48 deletions

View File

@ -62,9 +62,10 @@ project = u'Networking API Reference'
copyright = u'2010-present, OpenStack Foundation' copyright = u'2010-present, OpenStack Foundation'
# openstackdocstheme options # openstackdocstheme options
repository_name = 'openstack/neutron-lib' openstackdocs_repo_name = 'openstack/neutron-lib'
bug_project = 'neutron' openstackdocs_bug_project = 'neutron'
bug_tag = 'api-ref' openstackdocs_bug_tag = 'api-ref'
openstackdocs_auto_name = False
release = '' release = ''
# The short X.Y version. # The short X.Y version.
@ -97,7 +98,7 @@ add_module_names = False
show_authors = False show_authors = False
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' pygments_style = 'native'
# -- Options for man page output ---------------------------------------------- # -- Options for man page output ----------------------------------------------
@ -141,11 +142,6 @@ pygments_style = 'sphinx'
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static'] # 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'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
# html_use_smartypants = True # html_use_smartypants = True

View File

@ -1,5 +1,4 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD sphinx>=2.0.0,!=2.1.0 # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD openstackdocstheme>=2.2.1 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0 os-api-ref>=1.4.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0 reno>=3.1.0 # Apache-2.0

View File

@ -21,9 +21,7 @@
# serve to show the default. # serve to show the default.
import os import os
import subprocess
import sys import sys
import warnings
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
@ -61,16 +59,6 @@ master_doc = 'index'
project = u'Neutron Library' project = u'Neutron Library'
copyright = u'2015-present, OpenStack Foundation.' copyright = u'2015-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.
#
# Version info
from neutron_lib.version import version_info as neutron_lib_version
release = neutron_lib_version.release_string()
# The short X.Y version.
version = neutron_lib_version.version_string()
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
#language = None #language = None
@ -103,7 +91,7 @@ exclude_trees = []
show_authors = True show_authors = True
# The name of the Pygments (syntax highlighting) style to use. # 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. # A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['neutron_lib.'] modindex_common_prefix = ['neutron_lib.']
@ -156,11 +144,6 @@ html_theme = 'openstackdocs'
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static'] # 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'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
#html_use_smartypants = True #html_use_smartypants = True
@ -237,9 +220,11 @@ latex_elements = {
# -- Options for openstackdocstheme ------------------------------------------- # -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/neutron-lib' openstackdocs_repo_name = 'openstack/neutron-lib'
bug_project = 'neutron' openstackdocs_pdf_link = True
bug_tag = 'doc' openstackdocs_bug_project = 'neutron'
openstackdocs_bug_tag = 'doc'
openstackdocs_auto_name = False
linkcheck_anchors_ignore = [ linkcheck_anchors_ignore = [
# skip gerrit anchors # skip gerrit anchors

View File

@ -29,7 +29,6 @@ mox3==0.20.0
msgpack-python==0.4.0 msgpack-python==0.4.0
netaddr==0.7.18 netaddr==0.7.18
netifaces==0.10.4 netifaces==0.10.4
openstackdocstheme==1.18.1
os-api-ref==1.4.0 os-api-ref==1.4.0
os-client-config==1.28.0 os-client-config==1.28.0
os-ken==0.3.0 os-ken==0.3.0
@ -65,7 +64,7 @@ python-mimeparse==1.6.0
python-subunit==1.0.0 python-subunit==1.0.0
pytz==2013.6 pytz==2013.6
PyYAML==3.12 PyYAML==3.12
reno==2.5.0 reno==3.1.0
repoze.lru==0.7 repoze.lru==0.7
requests==2.14.2 requests==2.14.2
requestsexceptions==1.2.0 requestsexceptions==1.2.0
@ -73,8 +72,6 @@ rfc3986==0.3.1
Routes==2.3.1 Routes==2.3.1
setproctitle==1.1.10 setproctitle==1.1.10
snowballstemmer==1.2.1 snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
SQLAlchemy==1.2.0 SQLAlchemy==1.2.0
sqlalchemy-migrate==0.11.0 sqlalchemy-migrate==0.11.0
sqlparse==0.2.2 sqlparse==0.2.2

View File

@ -93,7 +93,7 @@ exclude_patterns = []
# show_authors = False # show_authors = False
# The name of the Pygments (syntax highlighting) style to use. # 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. # A list of ignored prefixes for module index sorting.
# modindex_common_prefix = [] # modindex_common_prefix = []
@ -142,11 +142,6 @@ html_static_path = ['_static']
# directly to the root of the documentation. # directly to the root of the documentation.
# html_extra_path = [] # 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'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
# html_use_smartypants = True # html_use_smartypants = True
@ -276,6 +271,7 @@ texinfo_documents = [
locale_dirs = ['locale/'] locale_dirs = ['locale/']
# -- Options for openstackdocstheme ------------------------------------------- # -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/neutron-lib' openstackdocs_repo_name = 'openstack/neutron-lib'
bug_project = 'neutron' openstackdocs_bug_project = 'neutron'
bug_tag = 'doc' openstackdocs_bug_tag = 'doc'
openstackdocs_auto_name = False

View File

@ -10,7 +10,7 @@ fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3 flake8-import-order==0.12 # LGPLv3
python-subunit>=1.0.0 # Apache-2.0/BSD python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0 reno>=3.1.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0
testresources>=2.0.0 # Apache-2.0/BSD testresources>=2.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD