Introduce tox to run PEP8

This commit is contained in:
Ilya Kharin 2013-10-17 13:45:41 +04:00
parent a059946079
commit fa8777fd3e
5 changed files with 58 additions and 0 deletions

View File

@ -42,3 +42,8 @@ Deployment
### Manual deployment
All steps for manual deployment and running the app you can find here: ```/vagrant/cookbooks/openstack-validator/recipes/default.rb```
Hacking
-------
To check project on compliance to PEP8 run command use tox.

21
setup.cfg Normal file
View File

@ -0,0 +1,21 @@
[metadata]
name = nova
version = 1.0
summary = OpenStack configuration inspector
description-file =
README.md
author = MirantisLabs
author-email = labs-all@mirantis.com
home-page = http://mriantis.com/
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2.7
[files]
packages =
ostack_validator

3
setup.py Normal file
View File

@ -0,0 +1,3 @@
import setuptools
setuptools.setup()

1
test-requirements.txt Normal file
View File

@ -0,0 +1 @@
hacking>=0.5.6,<0.8

28
tox.ini Normal file
View File

@ -0,0 +1,28 @@
[tox]
minversion = 1.6
envlist = pep8
skipsdist = True
[testenv]
sitepackages = True
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
sitepackages = False
commands =
flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
exclude = .venv,.git,.tox,dist,lib/python*,*egg,build