summaryrefslogtreecommitdiff
path: root/dev.sh
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-16 21:06:34 +0200
committerViljami Ilola <+@hix.fi>2024-03-16 21:06:34 +0200
commit2fd254af8613dba6bbd7bd9f52514229a5287d21 (patch)
tree25e1fe932bbab88c9346a30ecdcd9bfbc7a2238d /dev.sh
parent3959cfd0c0cab47f863ea5672350ad280b4b7773 (diff)
dev tools, pytest and pylint
Diffstat (limited to 'dev.sh')
-rwxr-xr-xdev.sh35
1 files changed, 17 insertions, 18 deletions
diff --git a/dev.sh b/dev.sh
index 9bee2dc..c4125ed 100755
--- a/dev.sh
+++ b/dev.sh
@@ -1,23 +1,27 @@
#!/bin/sh
[ x$1 = x ] && echo "\
-Pieni ja kevyt skripti helppoa kehitystyökalujen ajoa varten.
+Small script for running developement tools.
-Käyttö: $0 <komento>
+Usage: $0 <command>
-Komennot:
+Commands:
-dev Asenna devausymäristö
-pytest Aja yksikkötestit pytestillä
-pylint Tarkista muotoilu pylintillä
-covhtml Tee haarakattavuus raportti html muodossa
-covxml Sama mutta xml muoto (codecov tarvitsee tämän)
-covff Tee html haarakattavuusraportti ja avaa se firefoxissa
-all Sama kuin '$0 covff && $0 pylint'
-install Rakenna ja asenna paketti käyttäen pipx & poetry
+dev Install developement envoronment
+pytest Run pytest unittests
+pylint Do pylint
+covhtml Make branch coverage report in html format
+covff Open html coverage report in firefox
+all Do it all: pytest, coverage report in firefox and pylint
+install Build poetry package and install it for current user
" && exit 0
-[ x$PIP = x ] && PIP="pipx"
+PIP=`which pipx`
+[ x$PIP = x ] && PIP=`which pip`
+[ x$PIP = x ] \
+ && echo "This scripts needs pipx or pip to install dependencies." \
+ && exit 1
+
export DEVSH_PRIN=">>$DEVSH_PRIN"
export DEVSH_PROUT="<<$DEVSH_PROUT"
@@ -49,7 +53,7 @@ case $1 in
;;
pylint)
- poetry run python3 -m pylint src/miinaharava/
+ poetry run python3 -m pylint src/sliceitoff/
;;
coverage)
@@ -61,11 +65,6 @@ case $1 in
&& poetry run python3 -m coverage html
;;
- covxml)
- $0 coverage \
- && poetry run python3 -m coverage xml
- ;;
-
covff)
$0 covhtml \
&& firefox htmlcov/index.html