From 58b40e7f2ae65fc5ca14727e7a5f7f13584c2e9a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 16 May 2020 09:55:37 +0200 Subject: [PATCH] Switch to newer openstackdocstheme and reno versions Switch to openstackdocstheme 2.2.0 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 Update Sphinx version as well. Create doc/requirements.txt file and use it, 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. Set openstackdocs_auto_name to use 'project' as name. Depends-On: https://review.opendev.org/728938 Change-Id: Ic3503a8b38e67e50669428b36f6581cb980d687f --- doc/requirements.txt | 9 +++++++++ doc/source/conf.py | 7 +++---- lower-constraints.txt | 5 ----- releasenotes/source/conf.py | 13 ++++--------- test-requirements.txt | 5 ----- tox.ini | 4 ++++ 6 files changed, 20 insertions(+), 23 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..32ef3d9 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,9 @@ +# 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>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.0 # Apache-2.0 +sphinxcontrib-apidoc>=0.2.0 # BSD +oslo.config>=5.2.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index f9726a3..789874b 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -28,7 +28,6 @@ modindex_common_prefix = ['oslotest.'] master_doc = 'index' # General information about the project. -project = u'oslotest' copyright = u'2014-2019, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. @@ -51,9 +50,9 @@ html_theme = 'openstackdocs' # -- openstackdocstheme configuration ---------------------------------------- -repository_name = 'openstack/oslotest' -bug_project = 'oslotest' -bug_tag = '' +openstackdocs_repo_name = 'openstack/oslotest' +openstackdocs_bug_project = 'oslotest' +openstackdocs_bug_tag = '' # sphinxcontrib.apidoc options apidoc_module_dir = '../../oslotest' diff --git a/lower-constraints.txt b/lower-constraints.txt index e4c72a1..f7adc8e 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -17,7 +17,6 @@ MarkupSafe==1.0 mccabe==0.2.1 mock==2.0.0 netaddr==0.7.18 -openstackdocstheme==1.18.1 oslo.config==5.2.0 oslo.i18n==3.15.3 pbr==2.0.0 @@ -28,15 +27,11 @@ python-mimeparse==1.6.0 python-subunit==1.0.0 pytz==2013.6 PyYAML==3.12 -reno==2.5.0 requests==2.14.2 requestsexceptions==1.2.0 rfc3986==0.3.1 six==1.10.0 snowballstemmer==1.2.1 -Sphinx==1.6.5 -sphinxcontrib-apidoc===0.2.0 -sphinxcontrib-websupport==1.0.1 stestr==2.0.0 stevedore==1.20.0 testrepository==0.0.18 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index b3e6d49..303a9d7 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -47,14 +47,9 @@ pygments_style = 'sphinx' # a list of builtin themes. html_theme = 'openstackdocs' -# 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' - - # -- openstackdocstheme configuration ------------------------------------- -repository_name = 'openstack/oslotest' -bug_project = 'oslotest' -bug_tag = '' +openstackdocs_repo_name = 'openstack/oslotest' +openstackdocs_bug_project = 'oslotest' +openstackdocs_bug_tag = '' +openstackdocs_auto_name = False diff --git a/test-requirements.txt b/test-requirements.txt index ed8acfa..758471d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,10 +9,5 @@ hacking>=2.0.0,<2.1.0 # Apache-2.0 # deps = {[testenv]deps} coverage coverage!=4.4,>=4.0 # Apache-2.0 -# this is required for the docs build jobs -sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 -sphinxcontrib-apidoc>=0.2.0 # BSD oslo.config>=5.2.0 # Apache-2.0 stestr>=2.0.0 -reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 7f7ed55..fb4cfd8 100644 --- a/tox.ini +++ b/tox.ini @@ -27,11 +27,15 @@ commands = commands = {posargs} [testenv:docs] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html [testenv:releasenotes] +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints]