Enable flake8 checks with tox

1. Report all style checks with source.
2. Also enable additional helper checks providined in openstack-dev/hacking.

To run pep checks:
tox -e pep8

Change-Id: I46f020bafcea97305d4dc03a3c34040e0d70092a
This commit is contained in:
Sanket 2017-07-11 00:13:20 +05:30
parent cdd3004ce8
commit 8eacfa7e4b
3 changed files with 31 additions and 2 deletions

16
CONTRIBUTING.rst Normal file
View File

@ -0,0 +1,16 @@
If you would like to contribute to the development of OpenStack,
you must follow the steps in this page:
http://docs.openstack.org/infra/manual/developers.html
Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:
http://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not in GitHub's issue tracker:
https://bugs.launchpad.net/omni

1
test-requirements.txt Normal file
View File

@ -0,0 +1 @@
hacking>=0.12.0,<0.13 # Apache-2.0

16
tox.ini
View File

@ -1,11 +1,23 @@
[tox]
envlist = py27
skipsdist = true
envlist = py27,pep8
skipsdist = True
minversion = 2.3.2
[testenv]
usedevelop = True
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands =
bash clone_repos.sh
bash run_tests.sh -wj
[testenv:pep8]
commands = flake8 {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
enable-extensions = H106,H203
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build