diff --git a/CHANGELOG.md b/CHANGELOG.md index ca10a5a0..69d66d68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Use freeform category for humanitarian needs - Populate provider_admin1_name and provider_amdin2_name +## [0.10.10] - 2024-10-16 + +### Fixed + +- Output error for blank appeal code + +## [0.10.9] - 2024-10-15 + +### Added + +- Lebanon operational presence + ## [0.10.8] - 2024-10-10 ### Fixed diff --git a/requirements.txt b/requirements.txt index dc05ff5b..ea3f31f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ ckanapi==4.8 # via hdx-python-api click==8.1.7 # via typer -coverage==7.6.2 +coverage==7.6.3 # via pytest-cov defopt==6.4.0 # via hdx-python-api diff --git a/src/hapi/pipelines/configs/core.yaml b/src/hapi/pipelines/configs/core.yaml index ae92574e..d944c67e 100755 --- a/src/hapi/pipelines/configs/core.yaml +++ b/src/hapi/pipelines/configs/core.yaml @@ -361,6 +361,7 @@ sector_map: ame: "SHL" ash: "WSH" assainissement: "WSH" + basic assistance: "Hum" camp coordination and camp management: "CCM" camp coordination camp management: "CCM" cash: "Cash" @@ -456,6 +457,7 @@ sector_map: services humanitaires communs: "Hum" sexual and reproductive health: "HEA" shelter: "SHL" + shelter & site coordination: "SHL" shelter nfi: "SHL" shelter nfis: "SHL" shelter and nfi: "SHL" diff --git a/src/hapi/pipelines/configs/operational_presence.yaml b/src/hapi/pipelines/configs/operational_presence.yaml index b072bca8..32d261d5 100644 --- a/src/hapi/pipelines/configs/operational_presence.yaml +++ b/src/hapi/pipelines/configs/operational_presence.yaml @@ -11,6 +11,7 @@ operational_presence_default: - "operational_presence_gtm" - "operational_presence_hnd" - "operational_presence_hti" + - "operational_presence_lbn" - "operational_presence_mli" - "operational_presence_ner" - "operational_presence_nga" @@ -265,6 +266,38 @@ operational_presence_admintwo: - "adm1Name" - "adm2_Name" + operational_presence_lbn: + dataset: "lebanon-operational-presence" + resource: "lbn_sectorsreporting_bydistrict_20240902_hxlated.csv" + format: "csv" + headers: 1 + source_date: + start: "01/07/2024" + end: "02/09/2024" + use_hxl: True + filter_cols: + - "#date+year" + - "#date+quarter" + prefilter: "#date+year=='2024' and #date+quarter=='Q3'" + admin: + - ~ + - "#adm2+code" + admin_exact: True + input: + - "#org+name" + - "#org+acronym" + - "#org+type" + - "#sector+cluster+name" + - "#adm1+name" + - "#adm2+name" + list: + - "#org+name" + - "#org+acronym" + - "#org+type" + - "#sector+cluster+name" + - "#adm1+name" + - "#adm2+name" + operational_presence_mli: dataset: "mali-operational-presence" resource: "MALI_3W_June_2024" diff --git a/src/hapi/pipelines/database/funding.py b/src/hapi/pipelines/database/funding.py index f0e52f6c..521cded5 100644 --- a/src/hapi/pipelines/database/funding.py +++ b/src/hapi/pipelines/database/funding.py @@ -71,12 +71,20 @@ def populate(self) -> None: self._metadata.add_dataset(dataset) self._metadata.add_resource(dataset_id, resource) for row in rows: - appeal_code = row["#activity+appeal+id+external"] - appeal_name = row["#activity+appeal+name"] - appeal_type = row["#activity+appeal+type+name"] requirements_usd = row["#value+funding+required+usd"] if not requirements_usd: continue + appeal_name = row["#activity+appeal+name"] + appeal_code = row["#activity+appeal+id+external"] + if appeal_code is None: + add_message( + errors, + dataset_name, + f"Blank appeal_code for {appeal_name}", + ) + continue + + appeal_type = row["#activity+appeal+type+name"] funding_usd = row["#value+funding+total+usd"] # This check for a missing funding line has been added due to # an error in the UKR funding requirements data