From 9679783616081fee019cf87724dd951e5756da1c Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Fri, 6 Apr 2018 18:51:47 +0000 Subject: [PATCH] convert os-vif docs to follow PTI - This change converts os-vif to use sphinx-build and doc/requirements.txt to be inline with new PTI requirements. - This change tests docs requirements as part of the lower-constraints env. Change-Id: Ic136941a17f90d6a6a8432fec96f8612c4bca8a2 --- doc/requirements.txt | 3 +++ setup.cfg | 14 -------------- test-requirements.txt | 3 --- tox.ini | 26 ++++++++++++++++++-------- 4 files changed, 21 insertions(+), 25 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..e32955b1 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,3 @@ +sphinx>=1.6.5,!=1.6.6,!=1.6.7 #BSD +openstackdocstheme>=1.18.1 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index a00feb4f..03ea071e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,10 +17,6 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 -[global] -setup-hooks = - pbr.hooks.setup_hook - [files] packages = os_vif @@ -32,16 +28,6 @@ tag_build = tag_date = 0 tag_svn_revision = 0 -[build_sphinx] -builders = html -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = os_vif/locale domain = os_vif diff --git a/test-requirements.txt b/test-requirements.txt index d8adeded..6414c2b4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,9 +5,6 @@ hacking<0.11,>=0.10.2 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD -reno>=2.5.0 # Apache-2.0 -sphinx>=1.6.2 # BSD -openstackdocstheme>=1.17.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 5729ba82..ab6e3353 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,10 @@ commands = flake8 [testenv:venv] basepython = python3 commands = {posargs} +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/doc/requirements.txt [testenv:functional] basepython = python2.7 @@ -30,12 +34,25 @@ commands = [testenv:docs] basepython = python3 -commands = python setup.py build_sphinx +deps = -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W doc/source doc/build [testenv:releasenotes] basepython = python3 +deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html +[testenv:lower-constraints] +basepython = python3 +deps = + -c{toxinidir}/lower-constraints.txt + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/doc/requirements.txt +commands = + stestr run --black-regex ".tests.functional" {posargs} + sphinx-build -W doc/source doc/build + [flake8] # E123, E125 skipped as they are invalid PEP-8. # Following checks are ignored on purpose. @@ -65,10 +82,3 @@ max-complexity=30 [hacking] import_exceptions = os_vif.i18n - -[testenv:lower-constraints] -basepython = python3 -deps = - -c{toxinidir}/lower-constraints.txt - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt