From 673615267436f4dc23ed0fad2fdfef7765908d27 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Fri, 11 Mar 2022 18:56:01 +0100 Subject: Use one script instead of three for tests etc. --- check | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 check (limited to 'check') diff --git a/check b/check new file mode 100755 index 0000000..8001db4 --- /dev/null +++ b/check @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +if [ $# -lt 1 ] +then + $0 coverage + $0 typecheck + $0 qa + exit 0 +fi + +export PYTHONDEVMODE=1 + +SUBCMD=$1 +shift 1 + +case $SUBCMD in + "tests") + #nose2-3 $COVER_OPT --log-level=ERROR -B --log-capture $* + nosetests3 $* + ;; + "coverage") + #nose2-3 --with-coverage --coverage-report=term \ + # --log-level=ERROR -B --log-capture $* + nosetests3 --with-coverage --cover-erase --cover-package=lesana $* + ;; + "qa") + flake8 --select=E,F,W,C90,E123 --ignore=W503 . + isort --check-only --diff . + doc8 . + ;; + "typecheck") + mypy lesana + ;; + "static") + bandit --recursive --number=3 -lll -iii . + ;; + *) + echo "No such subcommand $SUBCMD" + ;; +esac -- cgit v1.2.3