Browse Source

docs(tox): Add tox target to generate docs

This patch set:
(a) renamed the docs folder to doc
(b) add in a basic tox.ini to generate the doc via ``tox -edocs``
(c) add in necessary /docs/requirements.txt dependencies

Change-Id: Id45db34fdc8860047047a4e6069483dfb4a56d7f
Signed-off-by: Tin Lam <tin@irrational.io>
Tin Lam 11 months ago
parent
commit
4e074ec0c2
7 changed files with 82 additions and 0 deletions
  1. 9
    0
      doc/requirements.txt
  2. 0
    0
      doc/source/conf.py
  3. 0
    0
      doc/source/index.rst
  4. 23
    0
      setup.cfg
  5. 27
    0
      setup.py
  6. 0
    0
      test-requirements.txt
  7. 23
    0
      tox.ini

+ 9
- 0
doc/requirements.txt View File

@@ -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
+openstackdocstheme>=1.18.1 # Apache-2.0
5
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
6
+sphinxcontrib-apidoc>=0.2.0  # BSD
7
+reno>=2.5.0 # Apache-2.0
8
+os-api-ref>=1.4.0 # Apache-2.0
9
+sphinx_rtd_theme

docs/source/conf.py → doc/source/conf.py View File


docs/source/index.rst → doc/source/index.rst View File


+ 23
- 0
setup.cfg View File

@@ -0,0 +1,23 @@
1
+[metadata]
2
+name = divingbell
3
+description-file = README.md
4
+author = OpenStack
5
+home-page =
6
+classifier =
7
+    Intended Audience :: Information Technology
8
+    Intended Audience :: System Administrators
9
+    License :: OSI Approved :: Apache Software License
10
+    Operating System :: POSIX :: Linux
11
+    Programming Language :: Shellscript
12
+
13
+[build_sphinx]
14
+source-dir = doc/source
15
+build-dir = doc/build
16
+all_files = 1
17
+warning-is-error = 1
18
+
19
+[upload_sphinx]
20
+upload-dir = doc/build/html
21
+
22
+[pbr]
23
+warnerrors = True

+ 27
- 0
setup.py View File

@@ -0,0 +1,27 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License");
2
+# you may not use this file except in compliance with the License.
3
+# You may obtain a copy of the License at
4
+#
5
+#    http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS,
9
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+# implied.
11
+# See the License for the specific language governing permissions and
12
+# limitations under the License.
13
+
14
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
15
+import setuptools
16
+
17
+# In python < 2.7.4, a lazy loading of package `pbr` will break
18
+# setuptools if some other modules registered functions in `atexit`.
19
+# solution from: http://bugs.python.org/issue15881#msg170215
20
+try:
21
+    import multiprocessing  # noqa
22
+except ImportError:
23
+    pass
24
+
25
+setuptools.setup(
26
+    setup_requires=['pbr>=2.0.0'],
27
+    pbr=True)

+ 0
- 0
test-requirements.txt View File


+ 23
- 0
tox.ini View File

@@ -0,0 +1,23 @@
1
+[tox]
2
+minversion = 2.3.1
3
+skipsdist = True
4
+envlist = docs
5
+
6
+[testenv]
7
+usedevelop = True
8
+passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
9
+setenv = VIRTUAL_ENV={envdir}
10
+install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
11
+deps = -r{toxinidir}/test-requirements.txt
12
+commands =
13
+
14
+[testenv:docs]
15
+deps = -r{toxinidir}/doc/requirements.txt
16
+commands =
17
+  rm -rf doc/build
18
+  sphinx-build -W -b html doc/source doc/build/html
19
+whitelist_externals =
20
+  rm
21
+
22
+[testenv:venv]
23
+commands = {posargs}

Loading…
Cancel
Save