Add requirements files, tox.ini updates
This patch updates the tox.ini file to create virtualenv's using the new requirements files. Also, adds a helper task to run reviewday in a tox virtualenv. Useful on distros that don't have launchpadlib packages handy... Change-Id: I4fd2f70859d02a2402ed3b2387e1a6ffbcf588fd
This commit is contained in:
parent
0517c7a499
commit
e2b4f2d0b3
@ -31,7 +31,11 @@ HTML report generator which creates a prioritized review list w/ function test r
|
|||||||
|
|
||||||
PYTHONPATH=$PWD ./bin/reviewday
|
PYTHONPATH=$PWD ./bin/reviewday
|
||||||
|
|
||||||
An output directory called 'out_report' is generated in the current directory.
|
An output directory called 'out\_report' is generated in the current directory.
|
||||||
|
|
||||||
|
Alternately you can execute reviewday in a tox environment by using:
|
||||||
|
|
||||||
|
tox -erun
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
launchpadlib
|
||||||
|
PyYAML
|
||||||
|
Cheetah
|
||||||
|
simplejson
|
@ -22,7 +22,7 @@ class MergeProp(object):
|
|||||||
try:
|
try:
|
||||||
if self.topic.find('bug/') == 0:
|
if self.topic.find('bug/') == 0:
|
||||||
bug = lp.bug(self.topic[4:])
|
bug = lp.bug(self.topic[4:])
|
||||||
#FIXME: bug.importance doesn't seem to work but it should?
|
# FIXME: bug.importance doesn't seem to work but it should?
|
||||||
cause = '%s bugfix' % bug.bug_tasks[0].importance
|
cause = '%s bugfix' % bug.bug_tasks[0].importance
|
||||||
elif self.topic.find('bp/') == 0:
|
elif self.topic.find('bp/') == 0:
|
||||||
spec = lp.specification(self.project, self.topic[3:])
|
spec = lp.specification(self.project, self.topic[3:])
|
||||||
|
1
test-requirements.txt
Normal file
1
test-requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
flake8
|
15
tox.ini
15
tox.ini
@ -2,12 +2,21 @@
|
|||||||
envlist = pyflakes, pep8, py27
|
envlist = pyflakes, pep8, py27
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
install_command = pip install --allow-external lazr.authentication --allow-insecure lazr.authentication -U {opts} {packages}
|
usedevelop = True
|
||||||
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:pyflakes]
|
[testenv:pyflakes]
|
||||||
deps = pyflakes
|
deps = pyflakes
|
||||||
commands = pyflakes setup.py reviewday bin
|
commands = pyflakes setup.py reviewday bin
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = pep8==1.3.3
|
whitelist_externals = bash
|
||||||
commands = pep8 --ignore=E125 --repeat --show-source --exclude=.tox .
|
commands = flake8
|
||||||
|
|
||||||
|
[testenv:run]
|
||||||
|
commands = reviewday {posargs}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user