Skip to content

Commit

Permalink
Merge pull request #77 from OCHA-DAP/HDXDSYS-633
Browse files Browse the repository at this point in the history
Update org matching to use canonical names as well
  • Loading branch information
b-j-mills authored Apr 9, 2024
2 parents b280887 + d2d1aed commit 524441f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
10 changes: 8 additions & 2 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.7.5] - 2024-04-09

### Changed

- Updated operational presence theme to better match organizations

## [0.7.4] - 2024-04-02

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

### Added

- Added national_risk_view, humanitarian_needs_view, population_group_view,
population_status_view
- Added national_risk_view, humanitarian_needs_view, population_group_view,
population_status_view

## [0.7.2] - 2024-02-08

Expand Down
28 changes: 12 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ chardet==5.2.0
# via frictionless
charset-normalizer==3.3.2
# via requests
ckanapi==4.7
ckanapi==4.8
# via hdx-python-api
click==8.1.7
# via typer-slim
# via typer
coverage[toml]==7.4.4
# via pytest-cov
cryptography==42.0.5
Expand All @@ -41,13 +41,13 @@ docopt==0.6.2
# via
# ckanapi
# num2words
docutils==0.20.1
docutils==0.21
# via defopt
email-validator==2.1.1
# via hdx-python-api
et-xmlfile==1.1.0
# via openpyxl
filelock==3.13.3
filelock==3.13.4
# via virtualenv
frictionless==5.16.1
# via hdx-python-utilities
Expand Down Expand Up @@ -220,17 +220,19 @@ requests-oauthlib==2.0.0
rfc3986==2.0.0
# via frictionless
rich==13.7.1
# via typer-slim
# via typer
rsa==4.9
# via google-auth
ruamel-yaml==0.18.6
# via hdx-python-utilities
ruamel-yaml-clib==0.2.8
# via ruamel-yaml
shellingham==1.5.4
# via typer-slim
# via typer
simpleeval==0.9.13
# via frictionless
simplejson==3.19.2
# via ckanapi
six==1.16.0
# via
# ckanapi
Expand Down Expand Up @@ -259,15 +261,9 @@ text-unidecode==1.3
# via python-slugify
typeguard==4.2.1
# via inflect
typer[all]==0.12.0
typer[all]==0.12.3
# via frictionless
typer-cli==0.12.0
# via typer
typer-slim[standard]==0.12.0
# via
# typer
# typer-cli
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# frictionless
# inflect
Expand All @@ -276,7 +272,7 @@ typing-extensions==4.10.0
# pydantic-core
# sqlalchemy
# typeguard
# typer-slim
# typer
unidecode==1.3.8
# via
# libhxl
Expand All @@ -285,7 +281,7 @@ urllib3==2.2.1
# via
# libhxl
# requests
validators==0.27.0
validators==0.28.0
# via frictionless
virtualenv==20.25.1
# via pre-commit
Expand Down
3 changes: 3 additions & 0 deletions src/hapi/pipelines/database/org.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def populate(self):
for row in iterator:
org_name = row.get("#x_pattern")
self._org_map[org_name] = row
canonical_org_name = row.get("#org+name")
if canonical_org_name:
self._org_map[canonical_org_name] = row

def populate_single(
self,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_pipelines(self, configuration, folder):
)
assert count == 4
count = session.scalar(select(func.count(DBOrg.id)))
assert count == 498
assert count == 497
count = session.scalar(select(func.count(DBOrgType.code)))
assert count == 18
count = session.scalar(select(func.count(DBSector.code)))
Expand Down

0 comments on commit 524441f

Please sign in to comment.