Skip to content

Commit

Permalink
Ignore rows with populated Error column (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarans authored Jan 27, 2025
1 parent 5a9374e commit 6068787
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 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.10.35] = 2025-01-27

### Changed

- Ignore any HNO rows with a populated Error column

## [0.10.34] = 2025-01-23

### Changed
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
annotated-types==0.7.0
# via pydantic
attrs==24.3.0
attrs==25.1.0
# via
# frictionless
# jsonlines
Expand Down Expand Up @@ -156,7 +156,7 @@ pyasn1==0.6.1
# rsa
pyasn1-modules==0.4.1
# via google-auth
pydantic==2.10.5
pydantic==2.10.6
# via frictionless
pydantic-core==2.27.2
# via pydantic
Expand Down Expand Up @@ -196,7 +196,7 @@ quantulum3==0.9.2
# via hdx-python-api
ratelimit==2.2.1
# via hdx-python-utilities
referencing==0.36.1
referencing==0.36.2
# via
# jsonschema
# jsonschema-specifications
Expand Down
3 changes: 3 additions & 0 deletions src/hapi/pipelines/database/humanitarian_needs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def populate(self) -> None:
max_admin_level = self._admins.get_max_admin_from_headers(headers)
# Admin 1 PCode,Admin 2 PCode,Sector,Gender,Age Group,Disabled,Population Group,Population,In Need,Targeted,Affected,Reached
for row in rows:
error = row.get("Error")
if error:
continue
countryiso3 = row["Country ISO3"]
if countryiso3 == "#country+code": # ignore HXL row
continue
Expand Down

0 comments on commit 6068787

Please sign in to comment.