refactor(etl): aligne la DAG historical_import sur le SDK Airflow 3

Même mouvement que pour ml_train, ml_score et alertes (#135) : DAG depuis
airflow.sdk, BashOperator depuis le provider standard, et la planification
lue sur dag.schedule puisque les timetables n'exposent plus summary. Les
anciens imports fonctionnaient encore, avec un avertissement de dépréciation.
This commit is contained in:
Johan LEROY
2026-09-22 09:05:53 +02:00
parent f81959c1a9
commit 091ee344d1
2 changed files with 46 additions and 46 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ from __future__ import annotations
from datetime import datetime, timedelta from datetime import datetime, timedelta
from airflow.models.dag import DAG from airflow.providers.standard.operators.bash import BashOperator
from airflow.operators.bash import BashOperator from airflow.sdk import DAG
COMMANDE_BACKEND = "cd /opt/backend && env -u VIRTUAL_ENV uv run --no-sync python -m" COMMANDE_BACKEND = "cd /opt/backend && env -u VIRTUAL_ENV uv run --no-sync python -m"
+1 -1
View File
@@ -49,7 +49,7 @@ def test_alertes_runs_after_the_hourly_scoring(dagbag: DagBag) -> None:
def test_historical_import_has_no_schedule(dagbag: DagBag) -> None: def test_historical_import_has_no_schedule(dagbag: DagBag) -> None:
assert dagbag.dags["historical_import"].timetable.summary == "None" assert dagbag.dags["historical_import"].schedule is None
def test_ml_train_task_calls_the_training_module(dagbag: DagBag) -> None: def test_ml_train_task_calls_the_training_module(dagbag: DagBag) -> None: