Add tox config and fix lint and discription
This commit is contained in:
parent
75b97e76c3
commit
c022dc763e
|
@ -0,0 +1 @@
|
|||
.tox
|
|
@ -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>
|
||||
|
|
1
peers.py
1
peers.py
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
flake8>=2.2.4,<=2.4.1
|
||||
os-testr>=0.4.1
|
||||
charm-tools
|
|
@ -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
|
Loading…
Reference in New Issue