2009-12-05 03:08:59 +03:00
|
|
|
from fabric.api import local
|
|
|
|
|
2010-01-26 23:57:26 +03:00
|
|
|
|
|
|
|
def pylint():
|
2010-01-27 01:44:12 +03:00
|
|
|
local("cd ..;export DJANGO_SETTINGS_MODULE=zamboni/settings_local;"
|
2010-02-23 21:19:18 +03:00
|
|
|
"PYTHONPATH=zamboni/apps:zamboni/lib "
|
|
|
|
"pylint --rcfile zamboni/scripts/pylintrc zamboni ",
|
2010-01-26 23:57:26 +03:00
|
|
|
capture=False)
|
|
|
|
|
2010-03-10 02:30:46 +03:00
|
|
|
|
|
|
|
def pep8(all=False):
|
|
|
|
local("git fetch jbalogh")
|
|
|
|
cmd = ("pep8 --repeat --ignore E221"
|
|
|
|
" --exclude *.sh,*.html,*.json,*.txt,*.pyc,.DS_Store,README,"
|
|
|
|
"migrations,sphinxapi.py")
|
|
|
|
|
|
|
|
if all:
|
|
|
|
cmd = cmd + " apps lib"
|
|
|
|
else:
|
|
|
|
cmd = cmd + " $(git diff --name-only jbalogh/master|grep py$)"
|
|
|
|
local(cmd, capture=False)
|
2010-01-19 23:58:45 +03:00
|
|
|
|
|
|
|
|
2010-03-10 02:45:58 +03:00
|
|
|
def test(module=None, pdb=False, failfast=True):
|
2010-02-05 20:38:59 +03:00
|
|
|
cmd = "python manage.py test"
|
|
|
|
if module:
|
|
|
|
cmd += " %s" % module
|
|
|
|
|
2010-03-10 02:45:58 +03:00
|
|
|
if failfast and failfast != '0':
|
|
|
|
cmd += " -x"
|
|
|
|
|
2010-02-05 20:38:59 +03:00
|
|
|
cmd += " --noinput --logging-clear-handlers"
|
|
|
|
if pdb:
|
2010-02-17 03:09:39 +03:00
|
|
|
cmd += ' --pdb --pdb-failures -s'
|
2010-02-05 20:38:59 +03:00
|
|
|
|
|
|
|
local(cmd, capture=False)
|