summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongShengping <chdzsp@163.com>2018-03-02 09:00:54 +0800
committerStephen Finucane <stephenfin@redhat.com>2019-04-02 14:28:24 +0100
commit7274bc23f1f1b29cfabf30a66f33a1a9b1eac927 (patch)
treefd59499ef0f3ad47b978ac06a4bf1772a5459a49
parentf8882547a69aad500dc0bd2a2b89f4d460803c52 (diff)
Follow the new PTI for document buildHEADmaster
For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html For more detials information, please refer to: http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: I4b1b023ff2c40f5b31429584fc1a77c0315ed2d9 Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
Notes
Notes (review): Code-Review+2: Ben Nemec <openstack@nemebean.com> Code-Review+2: Yuriy Taraday <yorik.sar@gmail.com> Workflow+1: Yuriy Taraday <yorik.sar@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 15 Apr 2019 04:42:49 +0000 Reviewed-on: https://review.openstack.org/549337 Project: openstack/oslo.concurrency Branch: refs/heads/master
-rw-r--r--.gitignore1
-rw-r--r--doc/requirements.txt9
-rwxr-xr-xdoc/source/conf.py46
-rw-r--r--doc/source/reference/index.rst1
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini26
6 files changed, 37 insertions, 51 deletions
diff --git a/.gitignore b/.gitignore
index 112d6e0..a1f3115 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,7 @@ output/*/index.html
48 48
49# Sphinx 49# Sphinx
50doc/build 50doc/build
51doc/source/reference/api
51 52
52# pbr generates these 53# pbr generates these
53AUTHORS 54AUTHORS
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..572662f
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,9 @@
1# The order of packages is significant, because pip processes them in the order
2# of appearance. Changing the order has an impact on the overall integration
3# process, which may cause wedges in the gate later.
4# this is required for the docs build jobs
5sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
6openstackdocstheme>=1.18.1 # Apache-2.0
7reno>=2.5.0 # Apache-2.0
8fixtures>=3.0.0 # Apache-2.0/BSD
9sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index fa7a79a..b163d37 100755
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -12,17 +12,13 @@
12# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
13# limitations under the License. 13# limitations under the License.
14 14
15import os
16import sys
17
18
19sys.path.insert(0, os.path.abspath('../..'))
20# -- General configuration ---------------------------------------------------- 15# -- General configuration ----------------------------------------------------
21 16
22# Add any Sphinx extension module names here, as strings. They can be 17# Add any Sphinx extension module names here, as strings. They can be
23# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 18# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
24extensions = [ 19extensions = [
25 'sphinx.ext.autodoc', 20 'sphinx.ext.autodoc',
21 'sphinxcontrib.apidoc',
26 'openstackdocstheme', 22 'openstackdocstheme',
27 'oslo_config.sphinxext', 23 'oslo_config.sphinxext',
28] 24]
@@ -31,18 +27,6 @@ extensions = [
31repository_name = 'openstack/oslo.concurrency' 27repository_name = 'openstack/oslo.concurrency'
32bug_project = 'oslo.concurrency' 28bug_project = 'oslo.concurrency'
33bug_tag = '' 29bug_tag = ''
34html_last_updated_fmt = '%Y-%m-%d %H:%M'
35
36# autodoc generation is a bit aggressive and a nuisance when doing heavy
37# text edit cycles.
38# execute "export SPHINX_DEBUG=1" in your terminal to disable
39
40# A list of glob-style patterns that should be excluded when looking for source
41# files.
42exclude_patterns = []
43
44# The suffix of source filenames.
45source_suffix = '.rst'
46 30
47# The master toctree document. 31# The master toctree document.
48master_doc = 'index' 32master_doc = 'index'
@@ -61,26 +45,18 @@ add_module_names = True
61# The name of the Pygments (syntax highlighting) style to use. 45# The name of the Pygments (syntax highlighting) style to use.
62pygments_style = 'sphinx' 46pygments_style = 'sphinx'
63 47
64# -- Options for HTML output --------------------------------------------------
65 48
66# The theme to use for HTML and HTML Help pages. Major themes that come with 49# -- Options for HTML output -------------------------------------------------
67# Sphinx are currently 'default' and 'sphinxdoc'. 50
68# html_theme_path = ["."]
69html_theme = 'openstackdocs' 51html_theme = 'openstackdocs'
70# html_static_path = ['static']
71 52
72# Output file base name for HTML help builder.
73htmlhelp_basename = '%sdoc' % project
74 53
75# Grouping the document tree into LaTeX files. List of tuples 54# -- sphinxcontrib.apidoc configuration --------------------------------------
76# (source start file, target name, title, author, documentclass
77# [howto/manual]).
78latex_documents = [
79 ('index',
80 '%s.tex' % project,
81 u'%s Documentation' % project,
82 u'OpenStack Foundation', 'manual'),
83]
84 55
85# Example configuration for intersphinx: refer to the Python standard library. 56apidoc_module_dir = '../../'
86# intersphinx_mapping = {'http://docs.python.org/': None} 57apidoc_output_dir = 'reference/api'
58apidoc_excluded_paths = [
59 'oslo_concurrency/tests',
60 'oslo_concurrency/_*',
61 'setup.py',
62]
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index 60abf32..fe64562 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -10,3 +10,4 @@
10 opts 10 opts
11 processutils 11 processutils
12 watchdog 12 watchdog
13 api/modules
diff --git a/test-requirements.txt b/test-requirements.txt
index 0582fe5..fdd78b2 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -9,11 +9,6 @@ futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
9fixtures>=3.0.0 # Apache-2.0/BSD 9fixtures>=3.0.0 # Apache-2.0/BSD
10stestr>=2.0.0 # Apache-2.0 10stestr>=2.0.0 # Apache-2.0
11 11
12# These are needed for docs generation
13openstackdocstheme>=1.18.1 # Apache-2.0
14sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
15reno>=2.5.0 # Apache-2.0
16
17eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT 12eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
18 13
19# Bandit security code scanner 14# Bandit security code scanner
diff --git a/tox.ini b/tox.ini
index f13f95c..41615d4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,12 +6,12 @@ envlist = py35,py27,pep8
6install_command = pip install {opts} {packages} 6install_command = pip install {opts} {packages}
7deps = 7deps =
8 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} 8 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
9 -r{toxinidir}/test-requirements.txt 9 -r{toxinidir}/test-requirements.txt
10 -r{toxinidir}/requirements.txt 10 -r{toxinidir}/requirements.txt
11# We want to support both vanilla stdlib and eventlet monkey patched 11# We want to support both vanilla stdlib and eventlet monkey patched
12commands = 12commands =
13 lockutils-wrapper stestr run --slowest {posargs} 13 lockutils-wrapper stestr run --slowest {posargs}
14 env TEST_EVENTLET=1 lockutils-wrapper stestr run --slowest {posargs} 14 env TEST_EVENTLET=1 lockutils-wrapper stestr run --slowest {posargs}
15 15
16[testenv:py27] 16[testenv:py27]
17basepython = python2.7 17basepython = python2.7
@@ -32,19 +32,22 @@ commands = {posargs}
32[testenv:docs] 32[testenv:docs]
33basepython = python3 33basepython = python3
34whitelist_externals = rm 34whitelist_externals = rm
35deps =
36 {[testenv]deps}
37 -r{toxinidir}/doc/requirements.txt
35commands = 38commands =
36 rm -fr doc/build 39 rm -fr doc/build
37 sphinx-build -W -b html doc/source doc/build/html {posargs} 40 sphinx-build -W -b html doc/source doc/build/html {posargs}
38 41
39[testenv:cover] 42[testenv:cover]
40basepython = python3 43basepython = python3
41setenv = 44setenv =
42 PYTHON=coverage run --source oslo_concurrency --parallel-mode 45 PYTHON=coverage run --source oslo_concurrency --parallel-mode
43commands = 46commands =
44 stestr run {posargs} 47 stestr run {posargs}
45 coverage combine 48 coverage combine
46 coverage html -d cover 49 coverage html -d cover
47 coverage xml -o cover/coverage.xml 50 coverage xml -o cover/coverage.xml
48 51
49[flake8] 52[flake8]
50show-source = True 53show-source = True
@@ -57,6 +60,7 @@ import_exceptions =
57 60
58[testenv:releasenotes] 61[testenv:releasenotes]
59basepython = python3 62basepython = python3
63deps = -r{toxinidir}/doc/requirements.txt
60commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 64commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
61 65
62[testenv:lower-constraints] 66[testenv:lower-constraints]