From 8465e5c9cb17c88a4f3f7384073804852f3de7a0 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 10 May 2019 08:33:07 +0200 Subject: [PATCH] Update docs testing Use doc/requirements for documentation requirements, this avoids pulling in sphinx into the python environments and thus solves the problem that triggered https://review.opendev.org/658224 as well. Note that both changes are needed in general, while the problem is solved with either. Switch to openstackdocstheme instead of oslosphinx, update sphinx requirements for this and sync with global requirements. Change-Id: I360c185af8740a71ebc0f5f49debd5b6032161ec --- doc/requirements.txt | 3 +++ doc/source/conf.py | 8 +++++++- test-requirements.txt | 3 --- tox.ini | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..16779dd2 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx>=1.6.2,!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD +sphinx>=1.6.2,!=1.6.6,!=1.6.7;python_version>='3.4' # BSD +openstackdocstheme>=1.20.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 1f36f366..508cef87 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,9 +22,15 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme' ] +# openstackdocstheme options +repository_name = 'openstack/os-net-config' +bug_project = 'os-net-config' +bug_tag = '' +html_theme = 'openstackdocs' + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable diff --git a/test-requirements.txt b/test-requirements.txt index 4d745911..23473222 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,11 +6,8 @@ hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD python-subunit>=0.0.18 # Apache-2.0/BSD -sphinx>=1.5.1 # BSD -oslosphinx>=4.7.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT mock>=2.0 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 2c8f36c2..24e4d67c 100644 --- a/tox.ini +++ b/tox.ini @@ -33,8 +33,10 @@ commands = coverage xml -o cover/coverage.xml [testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt basepython = python3 -commands = python setup.py build_sphinx +commands = + sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html [flake8] # E123, E125 skipped as they are invalid PEP-8.