Follow the new PTI for building docs

Change-Id: I1e1a3250334783a2a91a88b749425dba7655fddc
This commit is contained in:
Trinh Nguyen 2018-08-17 15:13:05 +09:00
parent 59249220d4
commit 20e67cf257
7 changed files with 35 additions and 18 deletions

7
doc/requirements.txt Normal file
View File

@ -0,0 +1,7 @@
# 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.
openstackdocstheme>=1.18.1 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
reno>=2.5.0 # Apache-2.0

View File

@ -22,8 +22,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'oslosphinx'
'openstackdocstheme'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@ -57,6 +56,7 @@ pygments_style = 'sphinx'
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
html_theme = 'openstackdocs'
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
@ -71,5 +71,12 @@ latex_documents = [
u'OpenStack Foundation', 'manual'),
]
man_pages = [
('index', u'SearchLight UI Documentation',
'Documentation for SearchLight plugin to Openstack\
Dashboard (Horizon)',
[u'OpenStack'], 1)
]
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

View File

@ -38,8 +38,9 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'sphinx.ext.autodoc',
'reno.sphinxext',
'openstackdocstheme',
]
# Add any paths that contain templates here, relative to this directory.
@ -107,7 +108,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@ -185,7 +186,7 @@ html_static_path = ['_static']
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'SearchlightUIReleaseNotesdoc'
htmlhelp_basename = '%sdoc' % project
# -- Options for LaTeX output ---------------------------------------------
@ -272,3 +273,4 @@ texinfo_documents = [
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']

View File

@ -2,5 +2,10 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=1.6 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
Babel>=1.3 # BSD
# This will be installed from git in OpenStack CI if the job setting
# required-projects for horizon:
horizon>=14.0.0.0b2 # Apache-2.0

View File

@ -18,10 +18,5 @@ classifier =
[files]
packages = searchlight_ui
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html

View File

@ -4,17 +4,15 @@
hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
http://tarballs.openstack.org/horizon/horizon-master.tar.gz#egg=horizon
coverage>=3.6 # Apache-2.0
ddt>=1.0.1 # MIT
django-nose>=1.2 # BSD
python-subunit>=0.0.18 # Apache-2.0/BSD
nose-exclude # LGPL
selenium>=2.50.1 # Apache-2.0
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.11.0 # Apache-2.0
reno>=1.8.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
reno>=1.6.2 # Apache2
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT

View File

@ -1,6 +1,6 @@
[tox]
minversion = 1.6
envlist = py27,pep8
envlist = py27,pep8,docs
skipsdist = True
[testenv]
@ -40,12 +40,15 @@ commands = nosetests searchlight_ui/tests/integration_tests/tests {posargs}
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
commands = oslo_debug_helper -t searchlight_ui/tests {posargs}
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]