From c98a36f759c71691ef50df4a2b97760dfa2ca151 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Tue, 14 Oct 2025 12:54:47 +0200 Subject: [PATCH 1/3] Fix fiche marche --- src/pages/marche.py | 2 -- src/utils.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/marche.py b/src/pages/marche.py index bfa4bae..4fbd04b 100644 --- a/src/pages/marche.py +++ b/src/pages/marche.py @@ -110,8 +110,6 @@ def update_marche_info(marche, titulaires): # Dates elif col in ["dateNotification", "datePublicationDonnees"]: - print(marche[col]) - value = datetime.fromisoformat(marche[col]).strftime("%d/%m/%Y") # Listes diff --git a/src/utils.py b/src/utils.py index d73a6a0..acf5ae7 100644 --- a/src/utils.py +++ b/src/utils.py @@ -126,6 +126,8 @@ def format_number(number) -> str: def format_montant(dff: pl.DataFrame) -> pl.DataFrame: def format_function(expr, scale=None): # https://stackoverflow.com/a/78636786 + print(type(expr)) + expr = expr.cast(pl.String) expr = expr.str.splitn(".", 2) num = expr.struct[0] From 199476ec309f5e6857e421333b360ed5aed3ced7 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Wed, 15 Oct 2025 19:42:53 +0200 Subject: [PATCH 2/3] =?UTF-8?q?Stabilisation=20affichage=20fiche=20march?= =?UTF-8?q?=C3=A9=20#40?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/marche.py | 8 ++------ src/utils.py | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pages/marche.py b/src/pages/marche.py index 4fbd04b..bd90a50 100644 --- a/src/pages/marche.py +++ b/src/pages/marche.py @@ -66,6 +66,7 @@ def get_marche_data(url) -> tuple[dict, list]: marche_uid = url.split("/")[-1] # Récupération des données du marché à partir du df global + lff = df.lazy() lff = lff.filter(pl.col("uid") == pl.lit(marche_uid)) @@ -73,13 +74,9 @@ def get_marche_data(url) -> tuple[dict, list]: dff_titulaires = lff.select(cs.starts_with("titulaire")).collect(engine="streaming") # Données du marché - dff_marche = ( - lff.select(~cs.starts_with("titulaires")).unique().collect(engine="streaming") - ) + dff_marche = lff.unique("uid").collect(engine="streaming") dff_marche = format_montant(dff_marche) - assert dff_marche.height == 1 - return dff_marche.to_dicts()[0], dff_titulaires.to_dicts() @@ -93,7 +90,6 @@ def get_marche_data(url) -> tuple[dict, list]: def update_marche_info(marche, titulaires): def make_parameter(col): column_object = data_schema.get(col) - print(column_object) column_name = column_object.get("title") if column_object else col if marche[col]: diff --git a/src/utils.py b/src/utils.py index acf5ae7..85d9e43 100644 --- a/src/utils.py +++ b/src/utils.py @@ -126,7 +126,6 @@ def format_number(number) -> str: def format_montant(dff: pl.DataFrame) -> pl.DataFrame: def format_function(expr, scale=None): # https://stackoverflow.com/a/78636786 - print(type(expr)) expr = expr.cast(pl.String) expr = expr.str.splitn(".", 2) From 392f862baa35cd0778eb121a2f7d6e4f558ff96c Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Wed, 15 Oct 2025 19:44:02 +0200 Subject: [PATCH 3/3] Changelog 2.1.6 --- README.md | 6 +++++- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c490a3..1d26aa4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # decp.info -> v2.1.4 +> v2.1.6 Outil d'exploration et de téléchargement des données essentielles de la commande publique. @@ -38,6 +38,10 @@ Ne pas oublier de mettre à jour les fichier .env. ## Notes de version +##### 2.1.6 (15 octobre 2025) + +- Stabilisation de la vue marché + ##### 2.1.5 (10 octobre 2025) - réparation des filtres (notamment < > sur les montants) diff --git a/pyproject.toml b/pyproject.toml index a497672..0030ed6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "decp.info" description = "Interface d'exploration et d'analyse des marchés publics français." -version = "2.1.5" +version = "2.1.6" requires-python = ">= 3.10" authors = [ { name = "Colin Maudry", email = "colin+decp@maudry.com" }