diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-19 00:18:40 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-19 00:18:40 +0200 |
commit | 949f0e39838fac49a48a00548a833c8b47593139 (patch) | |
tree | 1ac90c784d5d614a450680607c3df378fcd2bfbc /dev.sh | |
parent | 854e8468ea035b7d588ca7cc26a96f8f700541e7 (diff) |
Package can be installed. Light ./dev.sh for running dev scripts.
Diffstat (limited to 'dev.sh')
-rwxr-xr-x | dev.sh | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +#!/bin/sh +[ x$1 = x ] && echo "\ +Pieni ja kevyt skripti helppoa kehitystyökalujen ajoa varten. + +Käyttö: $0 <komento> + +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/ |