README.md updated with minimal tests

This commit is contained in:
philippe lhardy
2025-07-03 14:40:59 +02:00
parent 48649872f4
commit 748e76ef84
6 changed files with 70 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
# INSTALL
Not ready for produciton, still a development feature
Not ready for production, still a development feature
dependency on

View File

@@ -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

22
Makefile Normal file
View File

@@ -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

View File

@@ -4,4 +4,38 @@ https://en.wikipedia.org/wiki/Majority_judgment
Sorry for inconvenience but currently only french version is available.
LISEZMOI.md
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

View File

@@ -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

8
samples/tests.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
[[ -n $VIRTUAL_ENV ]] || source ../code/bin/activate
for (( i=0;i<7;i++ ))
do
./check.sh $i
done