diff --git a/CHANGELOG.md b/CHANGELOG.md index af2b0b0b..732cfcec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.9.15] - 2024-06-05 + +### Changed + +- Switch HNO to use prod HDX data + ## [0.9.14] - 2024-06-03 ### Added diff --git a/pyproject.toml b/pyproject.toml index ea664d86..3f562610 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,12 +34,12 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ - "hapi-schema>=0.8.8", - "hdx-python-api>= 6.2.8", + "hapi-schema>=0.8.9", + "hdx-python-api>= 6.2.9", "hdx-python-country>= 3.7.2", "hdx-python-database[postgresql]>= 1.3.1", "hdx-python-scraper>= 2.3.7", - "hdx-python-utilities>= 3.6.8", + "hdx-python-utilities>= 3.6.9", "libhxl", "sqlalchemy" ] diff --git a/requirements.txt b/requirements.txt index efc3b60e..5fd53f90 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ click==8.1.7 # via typer coverage==7.5.3 # via pytest-cov -cryptography==42.0.7 +cryptography==42.0.8 # via pyopenssl defopt==6.4.0 # via hdx-python-api @@ -60,7 +60,7 @@ gspread==6.1.2 # via hdx-python-scraper hapi-schema==0.8.9 # via hapi-pipelines (pyproject.toml) -hdx-python-api==6.2.8 +hdx-python-api==6.2.9 # via # hapi-pipelines (pyproject.toml) # hdx-python-scraper @@ -73,7 +73,7 @@ hdx-python-database==1.3.1 # via hapi-pipelines (pyproject.toml) hdx-python-scraper==2.3.7 # via hapi-pipelines (pyproject.toml) -hdx-python-utilities==3.6.8 +hdx-python-utilities==3.6.9 # via # hapi-pipelines (pyproject.toml) # hdx-python-api @@ -128,7 +128,7 @@ more-itertools==10.2.0 # via inflect ndg-httpsclient==0.5.1 # via hdx-python-api -nodeenv==1.9.0 +nodeenv==1.9.1 # via pre-commit num2words==0.5.13 # via quantulum3 @@ -178,7 +178,7 @@ pyopenssl==24.1.0 # ndg-httpsclient pyphonetics==0.5.3 # via hdx-python-country -pytest==8.2.1 +pytest==8.2.2 # via # hapi-pipelines (pyproject.toml) # pytest-check diff --git a/src/hapi/pipelines/app/pipelines.py b/src/hapi/pipelines/app/pipelines.py index 15c30b2a..b0499ce2 100644 --- a/src/hapi/pipelines/app/pipelines.py +++ b/src/hapi/pipelines/app/pipelines.py @@ -263,6 +263,7 @@ def output(self): metadata=self.metadata, admins=self.admins, sector=self.sector, + configuration=self.configuration, ) humanitarian_needs.populate() diff --git a/src/hapi/pipelines/database/humanitarian_needs.py b/src/hapi/pipelines/database/humanitarian_needs.py index ff20b12e..f82adf7e 100644 --- a/src/hapi/pipelines/database/humanitarian_needs.py +++ b/src/hapi/pipelines/database/humanitarian_needs.py @@ -27,11 +27,13 @@ def __init__( metadata: Metadata, admins: admins.Admins, sector: Sector, + configuration: Configuration, ): super().__init__(session) self._metadata = metadata self._admins = admins self._sector = sector + self._configuration = configuration def get_admin2_ref(self, countryiso3, row, dataset_name, errors): admin_code = row["Admin 2 PCode"] @@ -59,12 +61,10 @@ def get_admin2_ref(self, countryiso3, row, dataset_name, errors): def populate(self): logger.info("Populating humanitarian needs table") reader = Read.get_reader("hdx") - configuration = Configuration(hdx_site="stage", hdx_read_only=True) - configuration.setup_session_remoteckan() datasets = reader.search_datasets( filename="hno_dataset", fq="name:hno-data-for-*", - configuration=configuration, + configuration=self._configuration, ) warnings = set() errors = set()