solar/tox.ini
Bogdan Dobrelya fb3cca010f Add tox checkniceness,checksyntax for docs
* Add tox -e checkniceness and tox -e checksyntax to
make the docs almost perfect.
* Make tox -e docs task to call check* tasks as well
* Sanitize dependency install for separate tasks:
  - docs, do not install non related eggs from test-requirements
  - check*, install only required eggs as well
* Use whitelist_externals for the /bin/rm to remove warnings

Note, this change doesn't affect the time of py27/pep8 tasks
executuion!

Change-Id: I2d8ea9f8763fef06935c063f6564a9b239c31caf
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-01-21 11:03:56 +01:00

78 lines
1.6 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = pep8,py27
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
passenv = SOLAR_DB
[testenv:py27]
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr
[testenv:pep8]
deps = hacking==0.10.2
usedevelop = False
commands =
flake8 {posargs:solar}
[testenv:checkniceness]
deps = openstack-doc-tools>=0.30
doc8
commands =
openstack-doc-test --check-niceness
doc8 doc
[testenv:checksyntax]
deps = openstack-doc-tools>=0.30
commands =
openstack-doc-test --check-syntax
[testenv:docs]
deps = sphinx
{[testenv:checkniceness]deps}
whitelist_externals = /bin/rm
commands =
/bin/rm -rf doc/build
python setup.py build_sphinx
{[testenv:checkniceness]commands}
{[testenv:checksyntax]commands}
[doc8]
# Settings for doc8:
# Ignore target directories
ignore-path = doc/build*
# File extensions to use
extensions = .rst,.txt
# Maximal line length should be 79 but we have some overlong lines.
# Let's not get far more in.
max-line-length = 80
# Disable some doc8 checks:
# D000: Check RST validity (cannot handle lineos directive)
ignore = D000
[testenv:venv]
deps = -r{toxinidir}/requirements.txt
sphinx
commands = {posargs:}
[testenv:cover]
commands =
coverage erase
python setup.py testr --coverage \
--testr-args='--concurrency=1 {posargs}'
[testenv:devenv]
envdir = devenv
usedevelop = True
[flake8]
ignore = H101,H236,E731,H405
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
show-pep8 = True
show-source = True
count = True