Skip to content

Commit

Permalink
Merge pull request #30 from OCHA-DAP/main
Browse files Browse the repository at this point in the history
Fix TCD population (again)
  • Loading branch information
alexandru-m-g authored Sep 18, 2024
2 parents 6fca18a + 8dd2e14 commit f0a0f5c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
8 changes: 7 additions & 1 deletion 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.58] - 2024-09-18

### Fixed

- Fix for TCD population dataset change (again)

## [0.9.57] - 2024-09-17

### Added
Expand All @@ -14,7 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Fixed

- Fix for TCD population dataset change
- Fix for TCD population dataset change

## [0.9.55] - 2024-09-17

Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ email-validator==2.2.0
# via hdx-python-api
et-xmlfile==1.1.0
# via openpyxl
filelock==3.16.0
filelock==3.16.1
# via virtualenv
frictionless==5.17.1
# via hdx-python-utilities
Expand Down Expand Up @@ -134,7 +134,7 @@ packaging==24.1
# via pytest
petl==1.7.15
# via frictionless
platformdirs==4.3.3
platformdirs==4.3.6
# via virtualenv
pluggy==1.5.0
# via pytest
Expand All @@ -156,9 +156,9 @@ pyasn1==0.6.1
# rsa
pyasn1-modules==0.4.1
# via google-auth
pydantic==2.9.1
pydantic==2.9.2
# via frictionless
pydantic-core==2.23.3
pydantic-core==2.23.4
# via pydantic
pygments==2.18.0
# via rich
Expand Down Expand Up @@ -283,7 +283,7 @@ urllib3==2.2.3
# requests
validators==0.34.0
# via frictionless
virtualenv==20.26.4
virtualenv==20.26.5
# via pre-commit
wheel==0.44.0
# via libhxl
Expand Down
9 changes: 5 additions & 4 deletions src/hapi/pipelines/configs/population.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,9 @@ population_national:

population_tcd:
dataset: "cod-ps-tcd"
resource: "tcd_admpop_adm0_2023.csv"
format: "csv"
resource: "tcd_admpop_2023.xlsx"
format: "xlsx"
sheet: "tcd_admpop_adm0_2023"
use_hxl: False
admin_single: "TCD"
input:
Expand Down Expand Up @@ -1913,9 +1914,9 @@ population_adminone:

population_tcd:
dataset: "cod-ps-tcd"
resource: "tcd_adm1_pop_2023.xlsx"
resource: "tcd_admpop_2023.xlsx"
format: "xlsx"
sheet: "TCD_ADM1_POP_2023"
sheet: "tcd_admpop_adm1_2023"
use_hxl: False
admin:
- ~
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/input/cod-ps-tcd.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions tests/fixtures/input/population_tcd_tcd_admpop_adm0_2023.csv

This file was deleted.

4 changes: 2 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ def test_population(self, configuration, folder, pipelines):
count = session.scalar(select(func.count(DBDataset.hdx_id)))
check.equal(count, 5)
count = session.scalar(select(func.count(DBResource.hdx_id)))
check.equal(count, 12)
check.equal(count, 11)
count = session.scalar(
select(func.count(DBPopulation.resource_hdx_id))
)
check.equal(count, 7359)
check.equal(count, 8601)

@pytest.mark.parametrize(
"themes_to_run", [{"operational_presence": ("AFG", "MLI", "NGA")}]
Expand Down

0 comments on commit f0a0f5c

Please sign in to comment.