Merge "Follow the new PTI for document build"

This commit is contained in:
Zuul 2018-05-10 05:21:17 +00:00 committed by Gerrit Code Review
commit 0afdb686c6
6 changed files with 33 additions and 28 deletions

17
doc/requirements.txt Normal file
View File

@ -0,0 +1,17 @@
# 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.
# Order matters to the pip dependency resolver, so sorting this file
# changes how packages are installed. New dependencies should be
# added in alphabetical order, however, some dependencies may need to
# be installed in a specific order.
#
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
# NOTE: The following are required as horizon.test.settings loads it.
django-nose>=1.4.4 # BSD
mock>=2.0.0 # BSD
mox3>=0.20.0 # Apache-2.0

View File

@ -58,11 +58,11 @@ from magnum_ui import version as magnumui_ver
# Add any Sphinx extension module names here, as strings. # Add any Sphinx extension module names here, as strings.
# They can be extensions coming with Sphinx (named 'sphinx.ext.*') # They can be extensions coming with Sphinx (named 'sphinx.ext.*')
# or your custom ones. # or your custom ones.
extensions = ['sphinx.ext.autodoc', extensions = ['sphinx.ext.todo',
'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'openstackdocstheme', 'openstackdocstheme',
'sphinxcontrib.apidoc',
] ]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
@ -128,6 +128,12 @@ pygments_style = 'sphinx'
primary_domain = 'py' primary_domain = 'py'
nitpicky = False nitpicky = False
# sphinxcontrib-apidoc
apidoc_module_dir = '../../magnum_ui'
apidoc_output_dir = 'contributor/api'
apidoc_excluded_paths = [
'test',
]
# -- Options for HTML output -------------------------------------------------- # -- Options for HTML output --------------------------------------------------

View File

@ -106,6 +106,7 @@ simplejson==3.13.2
six==1.11.0 six==1.11.0
snowballstemmer==1.2.1 snowballstemmer==1.2.1
Sphinx==1.6.2 Sphinx==1.6.2
sphinxcontrib-apidoc===0.2.0
sphinxcontrib-websupport==1.0.1 sphinxcontrib-websupport==1.0.1
stevedore==1.28.0 stevedore==1.28.0
termcolor==1.1.0 termcolor==1.1.0

View File

@ -21,14 +21,3 @@ classifier =
[files] [files]
packages = packages =
magnum_ui magnum_ui
[build_sphinx]
all_files = 1
build-dir = doc/build
source-dir = doc/source
warning-is-error = 1
[pbr]
autodoc_index_modules = True
api_doc_dir = contributor/api

View File

@ -18,9 +18,6 @@ nose-exclude>=0.3.0 # LGPL
nosehtmloutput>=0.0.3 # Apache-2.0 nosehtmloutput>=0.0.3 # Apache-2.0
nosexcover>=1.0.10 # BSD nosexcover>=1.0.10 # BSD
openstack.nose-plugin>=0.7 # Apache-2.0 openstack.nose-plugin>=0.7 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
selenium>=2.50.1 # Apache-2.0 selenium>=2.50.1 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
# This also needs xvfb library installed on your OS # This also needs xvfb library installed on your OS
xvfbwrapper>=0.1.3 #license: MIT xvfbwrapper>=0.1.3 #license: MIT

17
tox.ini
View File

@ -89,22 +89,17 @@ commands =
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post {toxinidir}/tools/tox_helper.sh {envname} {basepython} post
[testenv:docs] [testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands= commands=
# Clean-up env and install horizon from git sphinx-build -W -b html doc/source doc/build/html
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
# Run test
python setup.py build_sphinx
# Clean-up env except log
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
[testenv:releasenotes] [testenv:releasenotes]
deps =
{[testenv:docs]deps}
commands = commands =
# Clean-up env and install horizon from git
{toxinidir}/tools/tox_helper.sh {envname} {basepython} pre
# Run test
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
# Clean-up env except log
{toxinidir}/tools/tox_helper.sh {envname} {basepython} post
[testenv:lower-constraints] [testenv:lower-constraints]
basepython = python3 basepython = python3