Review checking script added

This commit is contained in:
Patryk Żywica 2018-09-28 09:59:26 +02:00
parent 92a531ae97
commit f33f0a6a85
4 changed files with 87 additions and 0 deletions

Binary file not shown.

41
scripts/check_reviews.sh Executable file
View File

@ -0,0 +1,41 @@
#/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage 'scripts/check_reviews.sh <task> <index_number>'"
exit 1
fi
TASK=$1
STUDENT=$2
VALID=1
SUM=0
for f in $TASK/reviews/$STUDENT/review-*.md; do
SCORE=`head -n1 $f | cut -d':' -f2 | xargs`
SUM=$((SUM+SCORE))
SL=`grep "# Strengths / Mocne strony" $f -A3 | grep "^\\*" | wc -l`
WL=`grep "# Weaknesses / Słabe strony" $f -A3 | grep "^\\*" | wc -l`
if [ "$SL" != "3" ] || [ "$WL" != "3" ]; then
echo "Wrong number of remarks."
VALID=0
fi
WRONG=`grep "^\\*[[:space:]]*$" $f | wc -l`
if [ "$WRONG" != "0" ]; then
echo "Review contain empty remark"
VALID=0
fi
done
if [ "$SUM" != "10" ]; then
printf "Total number of points for reviews (%d) is greater then 10.\n" $SUM
VALID=0
fi
if [ "$VALID" = "1" ]; then
echo "\nYour reviews are valid !"
else
echo "\nYour reviews are NOT VALID !"
fi

View File

@ -0,0 +1,11 @@
# Score: 1
# Strengths / Mocne strony
* something 1 (very important)
* somethins 2 (important)
* something 3
# Weaknesses / Słabe strony
* something 1 (imporatant)
* something 2 (very very important)
* something 3 (moderate)

View File

@ -0,0 +1,35 @@
# Use Case 1: System usage / Użycie systemu
## Primary actor / Aktor podstawowy: ...
## Main actors and theirs goals and expectations / Główni odbiorcy i oczekiwania względem systemu
* ...
* ...
## Preconditions / Warunki wstępne
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
## Postconditions / Warunki końcowe
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
## The main scenario (main or happy path) / Scenariusz główny (ścieżka podstawowa)
1. ...
2. ...
## Extensions (alternative paths) / Rozszerzenia (ścieżki alternatywne):
* ...
* ...
## Additional requirements / Wymagania specjalne
* ...
* ...
## Technological requirements and restrictions on the entered data / Wymagania technologiczne oraz ograniczenia na wprowadzane dane
* ...
* ...
## Open issues / Kwestie otwarte
* ...
* ...