From 160f4cf68df59c11e3f3ad8f1a49141cc13d0405 Mon Sep 17 00:00:00 2001 From: davy39 Date: Wed, 28 Feb 2024 12:24:09 +0100 Subject: [PATCH] load csv --- .../tables/requetes_elaborees/pythons/family_horror/exo.py | 2 +- .../tables/requetes_elaborees/pythons/film_annee/exo.py | 2 +- .../requetes_elaborees/pythons/film_annee_max/exo.py | 2 +- .../tables/requetes_elaborees/pythons/film_genre/exo.py | 2 +- .../tables/requetes_elaborees/pythons/film_moyenne/exo.py | 4 +--- .../requetes_elaborees/pythons/film_projection/exo.py | 7 +------ .../pythons/film_projection_multiple/exo.py | 4 +--- .../tables/requetes_elaborees/pythons/film_revenus/exo.py | 2 +- .../tables/requetes_elaborees/pythons/film_somme/exo.py | 5 +---- 9 files changed, 9 insertions(+), 21 deletions(-) diff --git a/docs/data/tables/requetes_elaborees/pythons/family_horror/exo.py b/docs/data/tables/requetes_elaborees/pythons/family_horror/exo.py index f12a4086a..48411676f 100644 --- a/docs/data/tables/requetes_elaborees/pythons/family_horror/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/family_horror/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: diff --git a/docs/data/tables/requetes_elaborees/pythons/film_annee/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_annee/exo.py index 7a8073a30..3dd329545 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_annee/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_annee/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: diff --git a/docs/data/tables/requetes_elaborees/pythons/film_annee_max/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_annee_max/exo.py index 647939627..117497fc2 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_annee_max/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_annee_max/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: diff --git a/docs/data/tables/requetes_elaborees/pythons/film_genre/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_genre/exo.py index bce2279f4..f441e6193 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_genre/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_genre/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: diff --git a/docs/data/tables/requetes_elaborees/pythons/film_moyenne/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_moyenne/exo.py index fe47ef529..68a97885c 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_moyenne/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_moyenne/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: @@ -33,5 +33,3 @@ def moyenne(donnees, descripteur): """Renvoie la moyenne des valeurs de ce descripteur""" pass - -assert abs(moyenne(films, "Minutes") - 122.57) < 10**-2, "Erreur sur la moyenne de 'Minutes'" diff --git a/docs/data/tables/requetes_elaborees/pythons/film_projection/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_projection/exo.py index 5ad3fa302..c1e3cd362 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_projection/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_projection/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: @@ -27,8 +27,3 @@ def projection(donnees, descripteur): """Renvoie la liste des valeurs de ce descripteur""" pass - - -assert projection(films, "Ranking")[4] == 5, "Erreur sur la projection de 'Ranking'" -assert projection(films, "Name")[4] == "Pulp Fiction", "Erreur sur la projection de 'Name'" -assert projection(films, "Year")[4] == 1994, "Erreur sur la projection de 'Year'" diff --git a/docs/data/tables/requetes_elaborees/pythons/film_projection_multiple/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_projection_multiple/exo.py index 5be603134..7f320059f 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_projection_multiple/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_projection_multiple/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: @@ -28,5 +28,3 @@ def projection_multiple(donnees, descripteurs): """Renvoie les valeurs de ces descripteurs""" pass - -assert projection_multiple(films, ("Name", "Year", "Rating"))[0] == ("Citizen Kane", 1941, 8.3), "Erreur" diff --git a/docs/data/tables/requetes_elaborees/pythons/film_revenus/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_revenus/exo.py index c986f5124..9b46c55f3 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_revenus/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_revenus/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: diff --git a/docs/data/tables/requetes_elaborees/pythons/film_somme/exo.py b/docs/data/tables/requetes_elaborees/pythons/film_somme/exo.py index 473eaa829..21501f329 100644 --- a/docs/data/tables/requetes_elaborees/pythons/film_somme/exo.py +++ b/docs/data/tables/requetes_elaborees/pythons/film_somme/exo.py @@ -4,7 +4,7 @@ from js import fetch -reponse = await fetch(f"../{url_fichier}") +reponse = await fetch(f"{url_fichier}") contenu = await reponse.text() with open(file=url_fichier, mode="w", encoding=encodage) as fichier: @@ -27,6 +27,3 @@ def somme(donnees, descripteur): """Renvoie la somme des valeurs de ce descripteur""" pass - - -assert abs(somme(films, "Gross") - 33072.07) < 10**-6, "Erreur sur la somme de 'Gross'"