Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 367e5f64ff | |||
| adda58bada | |||
| 2b0b048520 | |||
| 5c43bfea78 |
@@ -1,3 +1,7 @@
|
|||||||
|
#### 2.6.1 (17 février 2026)
|
||||||
|
|
||||||
|
- Corrections la création des liens canoniques (SEO)
|
||||||
|
|
||||||
#### 2.6.0 (5 février 2026)
|
#### 2.6.0 (5 février 2026)
|
||||||
|
|
||||||
- Suite de la refonte graphique
|
- Suite de la refonte graphique
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# decp.info
|
# decp.info
|
||||||
|
|
||||||
> v2.6.0
|
> v2.6.1
|
||||||
> Outil d'exploration et de téléchargement des données essentielles de la commande publique.
|
> Outil d'exploration et de téléchargement des données essentielles de la commande publique.
|
||||||
|
|
||||||
=> [decp.info](https://decp.info)
|
=> [decp.info](https://decp.info)
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "decp.info"
|
name = "decp.info"
|
||||||
description = "Interface d'exploration et d'analyse des marchés publics français."
|
description = "Interface d'exploration et d'analyse des marchés publics français."
|
||||||
version = "2.6.0"
|
version = "2.6.1"
|
||||||
requires-python = ">= 3.10"
|
requires-python = ">= 3.10"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Colin Maudry", email = "colin@colmo.tech" }
|
{ name = "Colin Maudry", email = "colin@colmo.tech" }
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ app.index_string = """
|
|||||||
<title>{%title%}</title>
|
<title>{%title%}</title>
|
||||||
{%favicon%}
|
{%favicon%}
|
||||||
{%css%}
|
{%css%}
|
||||||
|
<!-- canonical link -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{%app_entry%}
|
{%app_entry%}
|
||||||
|
|||||||
+4
-10
@@ -17,7 +17,6 @@ from dash import (
|
|||||||
from src.callbacks import get_top_org_table
|
from src.callbacks import get_top_org_table
|
||||||
from src.figures import DataTable, make_column_picker, point_on_map
|
from src.figures import DataTable, make_column_picker, point_on_map
|
||||||
from src.utils import (
|
from src.utils import (
|
||||||
add_canonical_link,
|
|
||||||
columns,
|
columns,
|
||||||
df,
|
df,
|
||||||
df_acheteurs,
|
df_acheteurs,
|
||||||
@@ -34,12 +33,12 @@ from src.utils import (
|
|||||||
|
|
||||||
|
|
||||||
def get_title(acheteur_id: str = None) -> str:
|
def get_title(acheteur_id: str = None) -> str:
|
||||||
df_acheteur = df_acheteurs.filter(pl.col("acheteur_id") == acheteur_id).select(
|
acheteur_nom = df_acheteurs.filter(pl.col("acheteur_id") == acheteur_id).select(
|
||||||
"acheteur_nom"
|
"acheteur_nom"
|
||||||
)
|
)
|
||||||
acheteur_nom = df_acheteur.item(0, 0)
|
if acheteur_nom.height > 0:
|
||||||
|
return f"Marchés publics attribués par {acheteur_nom.item(0, 0)} | decp.info"
|
||||||
return f"Marchés publics attribués par {acheteur_nom} | decp.info"
|
return "Marchés publics attribués | decp.info"
|
||||||
|
|
||||||
|
|
||||||
register_page(
|
register_page(
|
||||||
@@ -476,8 +475,3 @@ def toggle_acheteur_columns(click_open, click_close, is_open):
|
|||||||
)
|
)
|
||||||
def reset_view(n_clicks):
|
def reset_view(n_clicks):
|
||||||
return "", []
|
return "", []
|
||||||
|
|
||||||
|
|
||||||
@callback(Input("acheteur_url", "pathname"))
|
|
||||||
def cb_add_canonical_link(pathname):
|
|
||||||
add_canonical_link(pathname)
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ from dash import (
|
|||||||
from figures import make_column_picker
|
from figures import make_column_picker
|
||||||
from src.figures import DataTable
|
from src.figures import DataTable
|
||||||
from src.utils import (
|
from src.utils import (
|
||||||
add_canonical_link,
|
|
||||||
columns,
|
columns,
|
||||||
df,
|
df,
|
||||||
filter_table_data,
|
filter_table_data,
|
||||||
@@ -534,14 +533,3 @@ def toggle_tableau_columns(click_open, click_close, is_open):
|
|||||||
)
|
)
|
||||||
def reset_view(n_clicks):
|
def reset_view(n_clicks):
|
||||||
return "", []
|
return "", []
|
||||||
|
|
||||||
|
|
||||||
@callback(Input("tableau_url", "pathname"))
|
|
||||||
def cb_add_canonical_link(pathname):
|
|
||||||
add_canonical_link(pathname)
|
|
||||||
|
|
||||||
|
|
||||||
# @callback(Input("tableau_url", "pathname"), Output("btn-copy-url", "children"))
|
|
||||||
# def cb_add_canonical_link(pathname):
|
|
||||||
# add_canonical_link(pathname)
|
|
||||||
#
|
|
||||||
|
|||||||
+5
-11
@@ -17,7 +17,6 @@ from dash import (
|
|||||||
from src.callbacks import get_top_org_table
|
from src.callbacks import get_top_org_table
|
||||||
from src.figures import DataTable, make_column_picker, point_on_map
|
from src.figures import DataTable, make_column_picker, point_on_map
|
||||||
from src.utils import (
|
from src.utils import (
|
||||||
add_canonical_link,
|
|
||||||
columns,
|
columns,
|
||||||
df,
|
df,
|
||||||
df_titulaires,
|
df_titulaires,
|
||||||
@@ -34,12 +33,12 @@ from src.utils import (
|
|||||||
|
|
||||||
|
|
||||||
def get_title(titulaire_id: str = None) -> str:
|
def get_title(titulaire_id: str = None) -> str:
|
||||||
titulaire_nom = (
|
titulaire_nom = df_titulaires.filter(pl.col("titulaire_id") == titulaire_id).select(
|
||||||
df_titulaires.filter(pl.col("titulaire_id") == titulaire_id)
|
"titulaire_nom"
|
||||||
.select("titulaire_nom")
|
|
||||||
.item(0, 0)
|
|
||||||
)
|
)
|
||||||
return f"Marchés publics remportés par {titulaire_nom} | decp.info"
|
if titulaire_nom.height > 0:
|
||||||
|
return f"Marchés publics remportés par {titulaire_nom.item(0, 0)} | decp.info"
|
||||||
|
return "Marchés publics remportés | decp.info"
|
||||||
|
|
||||||
|
|
||||||
register_page(
|
register_page(
|
||||||
@@ -490,8 +489,3 @@ def toggle_titulaire_columns(click_open, click_close, is_open):
|
|||||||
)
|
)
|
||||||
def reset_view(n_clicks):
|
def reset_view(n_clicks):
|
||||||
return "", []
|
return "", []
|
||||||
|
|
||||||
|
|
||||||
@callback(Input("titulaire_url", "pathname"))
|
|
||||||
def cb_add_canonical_link(pathname):
|
|
||||||
add_canonical_link(pathname)
|
|
||||||
|
|||||||
+1
-10
@@ -5,7 +5,6 @@ import uuid
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from time import localtime, sleep
|
from time import localtime, sleep
|
||||||
|
|
||||||
import dash
|
|
||||||
import polars as pl
|
import polars as pl
|
||||||
import polars.selectors as cs
|
import polars.selectors as cs
|
||||||
from dash import no_update
|
from dash import no_update
|
||||||
@@ -443,7 +442,7 @@ def get_default_hidden_columns(page):
|
|||||||
"codeCPV",
|
"codeCPV",
|
||||||
"dureeRestanteMois",
|
"dureeRestanteMois",
|
||||||
]
|
]
|
||||||
elif page == "titulaire":
|
elif page == "tableau":
|
||||||
displayed_columns = os.getenv("DISPLAYED_COLUMNS")
|
displayed_columns = os.getenv("DISPLAYED_COLUMNS")
|
||||||
else:
|
else:
|
||||||
displayed_columns = os.getenv("DISPLAYED_COLUMNS")
|
displayed_columns = os.getenv("DISPLAYED_COLUMNS")
|
||||||
@@ -740,14 +739,6 @@ def make_org_jsonld(org_id, org_type, org_name=None, type_org_id="SIRET") -> dic
|
|||||||
return jsonld
|
return jsonld
|
||||||
|
|
||||||
|
|
||||||
def add_canonical_link(pathname):
|
|
||||||
@dash.hooks.index()
|
|
||||||
def update_index(html_string):
|
|
||||||
url = f"https://{domain_name}{pathname}"
|
|
||||||
canonical_tag = f'<link rel="canonical" href="{url}" />'
|
|
||||||
return html_string.replace("</head>", f"{canonical_tag}\n </head>")
|
|
||||||
|
|
||||||
|
|
||||||
df: pl.DataFrame = get_decp_data()
|
df: pl.DataFrame = get_decp_data()
|
||||||
schema = df.collect_schema()
|
schema = df.collect_schema()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user