From 949f0e39838fac49a48a00548a833c8b47593139 Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Mon, 19 Feb 2024 00:18:40 +0200 Subject: Package can be installed. Light ./dev.sh for running dev scripts. --- dev.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 dev.sh (limited to 'dev.sh') diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..0c2cb08 --- /dev/null +++ b/dev.sh @@ -0,0 +1,32 @@ +#!/bin/sh +[ x$1 = x ] && echo "\ +Pieni ja kevyt skripti helppoa kehitystyökalujen ajoa varten. + +Käyttö: $0 + +Komennot: + +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' +" + +[ $1 = pytest ] && poetry run pytest -v + +[ $1 = pylint ] && poetry run python3 -m pylint src/miinaharava/ + +[ $1 = covhtml ] && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage html + +[ $1 = covhtml ] && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage xml + +[ $1 = covff ] && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage html && firefox htmlcov/index.html + +[ $1 = all ] && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage html && firefox htmlcov/index.html \ + && poetry run python3 -m pylint src/miinaharava/ -- cgit v1.2.3