From 7af25699b94ce9ba2a2c20aca4430fd666678f70 Mon Sep 17 00:00:00 2001 From: Valentin Matton Date: Tue, 5 Dec 2023 11:08:25 +0100 Subject: [PATCH] chore(pipeline): clean up settings --- pipeline/dags/import_sources.py | 3 ++- .../data_inclusion/scripts/tasks/un_jeune_une_solution.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 pipeline/src/data_inclusion/scripts/tasks/un_jeune_une_solution.py diff --git a/pipeline/dags/import_sources.py b/pipeline/dags/import_sources.py index 4bd946b2..d218bc10 100644 --- a/pipeline/dags/import_sources.py +++ b/pipeline/dags/import_sources.py @@ -63,6 +63,7 @@ def _extract( mes_aides, reseau_alpha, soliguide, + un_jeune_une_solution, utils, ) @@ -81,7 +82,7 @@ def _extract( "finess": utils.extract_http_content, "mes-aides": mes_aides.extract, "siao": utils.extract_http_content, - "un-jeune-une-solution": utils.extract_http_content, + "un-jeune-une-solution": un_jeune_une_solution.extract, "soliguide": soliguide.extract, "monenfant": utils.extract_http_content, "reseau-alpha": { diff --git a/pipeline/src/data_inclusion/scripts/tasks/un_jeune_une_solution.py b/pipeline/src/data_inclusion/scripts/tasks/un_jeune_une_solution.py new file mode 100644 index 00000000..0c0c8987 --- /dev/null +++ b/pipeline/src/data_inclusion/scripts/tasks/un_jeune_une_solution.py @@ -0,0 +1,5 @@ +from data_inclusion.scripts.tasks import utils + + +def extract(id: str, url: str, **kwargs) -> bytes: + return utils.extract_http_content(url.rstrip("/") + "/" + id)