From 748e76ef84f3680465dc6887998914060da33d05 Mon Sep 17 00:00:00 2001 From: philippe lhardy Date: Thu, 3 Jul 2025 14:40:59 +0200 Subject: [PATCH] README.md updated with minimal tests --- INSTALL.md | 3 ++- LISEZMOI.md | 3 +++ Makefile | 22 ++++++++++++++++++++++ README.md | 36 +++++++++++++++++++++++++++++++++++- samples/README.md | 6 ------ samples/tests.sh | 8 ++++++++ 6 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 Makefile delete mode 100644 samples/README.md create mode 100755 samples/tests.sh diff --git a/INSTALL.md b/INSTALL.md index 318e42b..6f9b927 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,5 +1,6 @@ +# INSTALL -Not ready for produciton, still a development feature +Not ready for production, still a development feature dependency on diff --git a/LISEZMOI.md b/LISEZMOI.md index 3f76666..5073ebd 100644 --- a/LISEZMOI.md +++ b/LISEZMOI.md @@ -123,3 +123,6 @@ python3 convert_nextcloud_poll_csv.py ../samples/poll1.csv 'Très Bien' 'Bien' ' /!\ l'ordre des mention est crucial. +## Tests + +Voir le README.md en anglais \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b7703bd --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +help: + cat INSTALL.md + make --print-targets + +code/bin/activate: + python3 -m venv code + +python_dependencies: code/bin/activate + + +setup_dev: python_dependencies + cd code; bin/pip3 install git+https://github.com/MieuxVoter/majority-judgment-library-python + + +clean: + echo "TODO" + +tests: + cd samples;./tests.sh + +.PHONY: clean setup_dev python_dependencies help tests diff --git a/README.md b/README.md index 1e10451..3a970c3 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,38 @@ https://en.wikipedia.org/wiki/Majority_judgment Sorry for inconvenience but currently only french version is available. -LISEZMOI.md \ No newline at end of file +LISEZMOI.md + +## Testing + +### Quick + +make tests + +## all tests + +``` +cd samples +./test.sh +``` + +tests should run wihtout errors, there is not special error checking wihtin test + +## unitary tests + +python venv **code** activated ( within sample tests.sh does it ). + +``` +source code/bin/activate +``` + +``` +./check.sh 1 +./check.sh 2 +./check.sh 3 +./check.sh 4 +``` + +## ça marche chez moi (tm) + +dev done on Ubuntu 24.04.2 LTS \ No newline at end of file diff --git a/samples/README.md b/samples/README.md deleted file mode 100644 index 5017b2f..0000000 --- a/samples/README.md +++ /dev/null @@ -1,6 +0,0 @@ -https://www4.artisanlogiciel.net/dokuwiki/doku.php?id=artlog:clients:astrolabe:nextcloud_poll:nextcloud_poll_jugement_majoritaire - -./check.sh 1 -./check.sh 2 -./check.sh 3 -./check.sh 4 \ No newline at end of file diff --git a/samples/tests.sh b/samples/tests.sh new file mode 100755 index 0000000..1ca2705 --- /dev/null +++ b/samples/tests.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +[[ -n $VIRTUAL_ENV ]] || source ../code/bin/activate + +for (( i=0;i<7;i++ )) +do + ./check.sh $i +done