Skip to content

Commit

Permalink
Merge pull request #95 from OCHA-DAP/HDXDSYS-691-funding
Browse files Browse the repository at this point in the history
HDXDSYS-691 funding
  • Loading branch information
b-j-mills authored May 16, 2024
2 parents 3f01931 + 8912337 commit aad55eb
Show file tree
Hide file tree
Showing 13 changed files with 602 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.3] - 2024-05-16

### Added

- Funding data and tests

## [0.9.2] - 2024-05-15

### Added
Expand Down
1 change: 1 addition & 0 deletions src/hapi/pipelines/app/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def main(
project_configs = [
"core.yaml",
"food_security.yaml",
"funding.yaml",
"humanitarian_needs.yaml",
"national_risk.yaml",
"operational_presence.yaml",
Expand Down
18 changes: 14 additions & 4 deletions src/hapi/pipelines/app/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from hapi.pipelines.database.admins import Admins
from hapi.pipelines.database.food_security import FoodSecurity
from hapi.pipelines.database.funding import Funding
from hapi.pipelines.database.humanitarian_needs import HumanitarianNeeds
from hapi.pipelines.database.locations import Locations
from hapi.pipelines.database.metadata import Metadata
Expand Down Expand Up @@ -154,6 +155,7 @@ def _create_configurable_scrapers(
"humanitarian_needs", "admintwo", adminlevel=self.admintwo
)
_create_configurable_scrapers("national_risk", "national")
_create_configurable_scrapers("funding", "national")
_create_configurable_scrapers("refugees", "national")

def run(self):
Expand All @@ -171,7 +173,6 @@ def output(self):
results = self.runner.get_hapi_results(
self.configurable_scrapers["population"]
)

population = Population(
session=self.session,
metadata=self.metadata,
Expand Down Expand Up @@ -219,7 +220,6 @@ def output(self):
results = self.runner.get_hapi_results(
self.configurable_scrapers["humanitarian_needs"]
)

humanitarian_needs = HumanitarianNeeds(
session=self.session,
metadata=self.metadata,
Expand All @@ -233,7 +233,6 @@ def output(self):
results = self.runner.get_hapi_results(
self.configurable_scrapers["national_risk"]
)

national_risk = NationalRisk(
session=self.session,
metadata=self.metadata,
Expand All @@ -246,11 +245,22 @@ def output(self):
results = self.runner.get_hapi_results(
self.configurable_scrapers["refugees"]
)

refugees = Refugees(
session=self.session,
metadata=self.metadata,
locations=self.locations,
results=results,
)
refugees.populate()

if not self.themes_to_run or "funding" in self.themes_to_run:
results = self.runner.get_hapi_results(
self.configurable_scrapers["funding"]
)
funding = Funding(
session=self.session,
metadata=self.metadata,
locations=self.locations,
results=results,
)
funding.populate()
Loading

0 comments on commit aad55eb

Please sign in to comment.