From 72d561c6f4a4de21eb88eb039065892921940a11 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 08:02:23 +0200 Subject: [PATCH 1/9] test ci valide --- .gitlab-ci.yml | 11 +++++++++-- index_inverse/src/IndexInverse.py | 3 ++- pagerank/test/test-graphe.c | 19 ++++++++++++------- pagerank/test/test-liste.c | 2 +- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95f0121..9614d38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,8 +8,10 @@ lipn-search: script: - echo "Installation des paquets" - apk update - - apk add python3 - - apk add py-pip + - apk add --update make cmake gcc g++ + - apk add --update python3 py-pip python-dev + - apk pip install cython + - pip install numpy - pip install pytest - echo "Début de la phase de test" - echo "Début des tests sur l'index inversé" @@ -17,4 +19,9 @@ lipn-search: - pytest test_hamming.py - cd ../../ - echo "Fin des tests sur l'index inversé" + - echo "Début des tests sur le pagerank" + - cd pagerank/test/ + - echo "Faire des trucs" + - cd ../../ + - echo "Début des tests sur le pagerank" - echo "Fin de la phase de test" \ No newline at end of file diff --git a/index_inverse/src/IndexInverse.py b/index_inverse/src/IndexInverse.py index 3f2cc38..d1f8583 100755 --- a/index_inverse/src/IndexInverse.py +++ b/index_inverse/src/IndexInverse.py @@ -51,7 +51,8 @@ class IndexInverse : self.invert_index.setdefault(word,[]).append(doc_id) IndexInverse.vocaCount=len(self.vocabulary) print(IndexInverse.vocaCount) - + + def get_index(self): '''Obtenir le dictionnaire invert_index. diff --git a/pagerank/test/test-graphe.c b/pagerank/test/test-graphe.c index b485df1..1cf4efd 100644 --- a/pagerank/test/test-graphe.c +++ b/pagerank/test/test-graphe.c @@ -11,6 +11,17 @@ dot -Tpdf graphe_3.dot -o graphe_3.pdf #define NB_SOMMETS 7 +void test_creation(){ + //Test création + graphe g; + creer_graphe(&g, NB_SOMMETS); + assert(g.max > 0); + assert(g.premierVide == 0); + assert(g.ligne); + assert(g.col); +} + + int main() { graphe g; @@ -22,13 +33,7 @@ int main() char* fichier3 = "graphe_3.dot"; assert(fichier3); - //Test création - creer_graphe(&g, NB_SOMMETS); - assert(g.max > 0); - assert(g.premierVide == 0); - assert(g.ligne); - assert(g.col); - + test_creation(); //Test insertion graphe_ajouter_arete(&g, 0, 1); diff --git a/pagerank/test/test-liste.c b/pagerank/test/test-liste.c index ebc2c47..16250f1 100644 --- a/pagerank/test/test-liste.c +++ b/pagerank/test/test-liste.c @@ -22,7 +22,7 @@ int main() liste_add(&l, pasGoogle); assert(!strcmp(l.urls[1], pasGoogle)); - + liste_add(&l, fichierNico); assert(!strcmp(l.urls[2], fichierNico)); -- GitLab From dc50c792135f445ea84ad2023c976bd9a8a8f64c Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 08:03:52 +0200 Subject: [PATCH 2/9] test ci valide --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9614d38..b1b795d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,8 @@ lipn-search: - echo "Installation des paquets" - apk update - apk add --update make cmake gcc g++ - - apk add --update python3 py-pip python-dev - - apk pip install cython + - apk add --update python3 py-pip + - pip install cython - pip install numpy - pip install pytest - echo "Début de la phase de test" -- GitLab From 4bea4ca37f2ca62d19d5d0646dc13302a49ce959 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 08:21:18 +0200 Subject: [PATCH 3/9] test ci valide --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1b795d..b8b79a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ lipn-search: - apk add --update make cmake gcc g++ - apk add --update python3 py-pip - pip install cython + - apk add --update gfortran python python-dev - pip install numpy - pip install pytest - echo "Début de la phase de test" -- GitLab From 5ed5b7febaa2ac4b2d7cb4e6e7fb8e8d6f69d646 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 08:37:06 +0200 Subject: [PATCH 4/9] test ci valide --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8b79a4..6e3c963 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,8 +11,8 @@ lipn-search: - apk add --update make cmake gcc g++ - apk add --update python3 py-pip - pip install cython - - apk add --update gfortran python python-dev - - pip install numpy + - pip install python-dev + - pip install numpy==1.14.3 - pip install pytest - echo "Début de la phase de test" - echo "Début des tests sur l'index inversé" -- GitLab From 1bc5431eb17cb564832170dd6f072940c1942a12 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 08:57:37 +0200 Subject: [PATCH 5/9] test ci valide --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e3c963..41957ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,6 @@ lipn-search: - apk add --update make cmake gcc g++ - apk add --update python3 py-pip - pip install cython - - pip install python-dev - pip install numpy==1.14.3 - pip install pytest - echo "Début de la phase de test" -- GitLab From 13714184222cbd4bf26756306dc19272c9b29ff8 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 09:10:13 +0200 Subject: [PATCH 6/9] ci image scratch --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41957ca..0f02c3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: alpine +image: scratch stages: - test @@ -7,11 +7,11 @@ lipn-search: stage: test script: - echo "Installation des paquets" - - apk update - - apk add --update make cmake gcc g++ - - apk add --update python3 py-pip + - apt-get update + - apt-get install -y make cmake gcc g++ + - apt-get install -y python3 python3-pip - pip install cython - - pip install numpy==1.14.3 + - pip install numpy - pip install pytest - echo "Début de la phase de test" - echo "Début des tests sur l'index inversé" -- GitLab From 602f18783fddc37dfae0566f3ad744b405d5ba71 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 09:13:37 +0200 Subject: [PATCH 7/9] ci image ubuntu --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f02c3b..d2433d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: scratch +image: ubuntu stages: - test -- GitLab From 34b658c0ae1ce2c29a4eaee10b963e4d07166fb3 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 09:32:59 +0200 Subject: [PATCH 8/9] remove cython --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2433d8..e54d35c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ lipn-search: - apt-get update - apt-get install -y make cmake gcc g++ - apt-get install -y python3 python3-pip - - pip install cython - pip install numpy - pip install pytest - echo "Début de la phase de test" -- GitLab From 8c617d439393181b0a4083c8dc5f48590be74ef5 Mon Sep 17 00:00:00 2001 From: Julien David Date: Wed, 7 Apr 2021 09:55:09 +0200 Subject: [PATCH 9/9] switch to pip3 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e54d35c..6bcba9c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,8 +10,8 @@ lipn-search: - apt-get update - apt-get install -y make cmake gcc g++ - apt-get install -y python3 python3-pip - - pip install numpy - - pip install pytest + - pip3 install numpy + - pip3 install pytest - echo "Début de la phase de test" - echo "Début des tests sur l'index inversé" - cd index_inverse/test/ -- GitLab