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>
changes/30/569630/2
Tin Lam 3 years ago
parent
commit
4e074ec0c2
  1. 9
      doc/requirements.txt
  2. 0
      doc/source/conf.py
  3. 0
      doc/source/index.rst
  4. 23
      setup.cfg
  5. 27
      setup.py
  6. 0
      test-requirements.txt
  7. 23
      tox.ini

9
doc/requirements.txt

@ -0,0 +1,9 @@
# 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
sphinxcontrib-apidoc>=0.2.0 # BSD
reno>=2.5.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
sphinx_rtd_theme

0
docs/source/conf.py → doc/source/conf.py

0
docs/source/index.rst → doc/source/index.rst

23
setup.cfg

@ -0,0 +1,23 @@
[metadata]
name = divingbell
description-file = README.md
author = OpenStack
home-page =
classifier =
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Shellscript
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[pbr]
warnerrors = True

27
setup.py

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

0
test-requirements.txt

23
tox.ini

@ -0,0 +1,23 @@
[tox]
minversion = 2.3.1
skipsdist = True
envlist = docs
[testenv]
usedevelop = True
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
setenv = VIRTUAL_ENV={envdir}
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
commands =
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
whitelist_externals =
rm
[testenv:venv]
commands = {posargs}
Loading…
Cancel
Save