aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck28
1 files changed, 23 insertions, 5 deletions
diff --git a/check b/check
index cae21d5..b36b1e3 100755
--- a/check
+++ b/check
@@ -10,35 +10,53 @@ then
exit 0
fi
+root=$(readlink -f "$(dirname "$0")")
+
+# print deprecation warnings etc.
export PYTHONDEVMODE=1
+# ignore known warnings from third party libraries
+export PYTHONWARNINGS='default,ignore:::itypes,ignore:::^django[.]'
+
SUBCMD=$1
shift 1
case $SUBCMD in
"tests")
- nose2-3 $COVER_OPT --log-level ERROR -B --log-capture $*
+ cd "$root"
+ ./manage.py test $@
+ cd -
;;
"coverage")
- nose2-3 --with-coverage --coverage-report=term-missing \
- --log-level ERROR -B --log-capture $*
+ cd "$root"
+ python3-coverage run ./manage.py test $@
+ python3-coverage report
+ cd -
;;
"qa")
+ cd "$root"
flake8 --select=E,F,W,C90,E123 --ignore=W503 .
isort --check-only --diff .
if which doc8
then
doc8 .
fi
+ cd -
;;
"typecheck")
- mypy kerbana
+ cd "$root"
+ mypy kerbana rrd
+ cd -
;;
"static")
+ cd "$root"
bandit --recursive --number=3 -lll -iii .
+ cd -
;;
"run")
- flask --app kerbana --debug run
+ cd "$root"
+ ./manage runserver
+ cd -
;;
*)
echo "No such subcommand $SUBCMD"