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>
This commit is contained in:
parent
aea48b733e
commit
fb3cca010f
3
.gitignore
vendored
3
.gitignore
vendored
@ -44,7 +44,8 @@ vagrant-settings.yaml
|
||||
.cache
|
||||
|
||||
.tox
|
||||
|
||||
ChangeLog
|
||||
AUTHORS
|
||||
.coverage
|
||||
|
||||
|
||||
|
2
doc-test.conf
Normal file
2
doc-test.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[DEFAULT]
|
||||
repo_name = solar
|
38
tox.ini
38
tox.ini
@ -8,6 +8,8 @@ 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
|
||||
|
||||
@ -17,12 +19,40 @@ usedevelop = False
|
||||
commands =
|
||||
flake8 {posargs:solar}
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
sphinx
|
||||
[testenv:checkniceness]
|
||||
deps = openstack-doc-tools>=0.30
|
||||
doc8
|
||||
commands =
|
||||
rm -rf doc/build
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user