Update tox.ini

* removed unnecessary "install_command" from venv and cover;
* unignored E711,E712 in pep8
* add genpolicy

Change-Id: Iab71163a2317ddd339e72dc8790edfa05a9aafe0
This commit is contained in:
Mike Fedosin 2016-09-01 00:18:20 +03:00
parent 2f8e328bcf
commit aef9290dc4
2 changed files with 12 additions and 11 deletions

View File

@ -25,6 +25,11 @@ console_scripts =
glare-db-manage = glare.cmd.db_manage:main
oslo.config.opts =
glare = glare.opts:list_artifacts_opts
oslo.policy.enforcer =
glare = glare.common.policy:_get_enforcer
oslo.policy.policies =
glare = glare.common.policy:list_rules
[build_sphinx]
all_files = 1

18
tox.ini
View File

@ -30,24 +30,22 @@ commands =
bandit -c bandit.yaml -r glare -n5 -p gate
[testenv:cover]
# NOTE(jaegerandi): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
commands = python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
[testenv:venv]
# NOTE(jaegerandi): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = {posargs}
[testenv:genconfig]
commands =
oslo-config-generator --config-file etc/oslo-config-generator/glare.conf
[testenv:genpolicy]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslopolicy-sample-generator --namespace=glare --output-file=etc/policy.json.sample
[testenv:docs]
commands = python setup.py build_sphinx
@ -56,11 +54,9 @@ commands = bandit -c bandit.yaml -r glare -n5 -p gate
[flake8]
# TODO(dmllr): Analyze or fix the warnings blacklisted below
# E711 comparison to None should be 'if cond is not None:'
# E712 comparison to True should be 'if cond is True:' or 'if cond:'
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
ignore = E711,E712,H404,H405
ignore = H404,H405
exclude = .venv,.git,.tox,dist,doc,etc,*glare/locale*,*lib/python*,*egg,build
[hacking]