Add tox config and fix lint and discription

This commit is contained in:
Liam Young 2016-06-08 14:16:54 +00:00
parent 75b97e76c3
commit c022dc763e
5 changed files with 31 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.tox

View File

@ -1,3 +1,3 @@
name: openstack-ha
summary: Interface for peer relation
summary: Interface for collecting data from peers in an OpenStack service
maintainer: OpenStack Charmers <openstack-charmers@lists.ubuntu.com>

View File

@ -15,6 +15,7 @@ from charms.reactive import RelationBase
from charms.reactive import hook
from charms.reactive import scopes
class OpenstackHAPeers(RelationBase):
scope = scopes.UNIT

3
test-requirements.txt Normal file
View File

@ -0,0 +1,3 @@
flake8>=2.2.4,<=2.4.1
os-testr>=0.4.1
charm-tools

25
tox.ini Normal file
View File

@ -0,0 +1,25 @@
[tox]
envlist = lint,py27
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
[testenv:lint]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E402,E226