Skip to content

Commit

Permalink
Remove filter for food security
Browse files Browse the repository at this point in the history
  • Loading branch information
b-j-mills committed Oct 14, 2024
1 parent a37ffa1 commit 64fbc5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/hapi/pipelines/app/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def output_food_security(self):
admins=self.admins,
adminone=self.adminone,
admintwo=self.admintwo,
countryiso3s=self.countries,
configuration=self.configuration,
)
food_security.populate()
Expand Down
6 changes: 4 additions & 2 deletions src/hapi/pipelines/database/food_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from dataclasses import dataclass
from logging import getLogger
from typing import Dict, Optional, Set
from typing import Dict, List, Optional, Set

from hapi_schema.db_food_security import DBFoodSecurity
from hdx.api.configuration import Configuration
Expand Down Expand Up @@ -38,13 +38,15 @@ def __init__(
admins: admins.Admins,
adminone: AdminLevel,
admintwo: AdminLevel,
countryiso3s: List[str],
configuration: Configuration,
):
super().__init__(session)
self._metadata = metadata
self._admins = admins
self._adminone = adminone
self._admintwo = admintwo
self._countryiso3s = countryiso3s
self._configuration = configuration
self._country_status = {}

Expand Down Expand Up @@ -334,7 +336,7 @@ def populate(self) -> None:
if "#" in row["Date of analysis"]: # ignore HXL row
continue
countryiso3 = row["Country"]
if countryiso3 not in self._configuration["HAPI_countries"]:
if countryiso3 not in self._countryiso3s:
continue
provider_admin1_name = get_provider_name(row, "Level 1")
provider_admin2_name = get_provider_name(row, "Area")
Expand Down

0 comments on commit 64fbc5e

Please sign in to comment.