Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDXDSYS-742 global coverage #160

Closed
wants to merge 28 commits into from
Closed

Conversation

b-j-mills
Copy link
Collaborator

I've added global coverage for all of the standardized data categories. The ones left are non-standard data: operational presence, population, and poverty rate. I left food security out of this branch because I think it's worth waiting to incrementally p-code the data if we can. If we need to p-code it first I'll make a new branch.

Copy link

github-actions bot commented Sep 9, 2024

Test Results

1 tests   - 16   0 ✅  - 17   8s ⏱️ - 15m 4s
1 suites ± 0   0 💤 ± 0 
1 files   ± 0   0 ❌ ± 0   1 🔥 +1 

For more details on these errors, see this check.

Results for commit 2e11555. ± Comparison against base commit a19efdd.

♻️ This comment has been updated with latest results.

@coveralls
Copy link

coveralls commented Sep 9, 2024

Pull Request Test Coverage Report for Build 10838185780

Details

  • 68 of 82 (82.93%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 92.4%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/hapi/pipelines/database/conflict_event.py 4 5 80.0%
src/hapi/pipelines/database/locations.py 3 4 75.0%
src/hapi/pipelines/database/funding.py 43 49 87.76%
src/hapi/pipelines/database/wfp_market.py 15 21 71.43%
Totals Coverage Status
Change from base Build 10831862368: -0.7%
Covered Lines: 1544
Relevant Lines: 1671

💛 - Coveralls

Copy link
Contributor

@mcarans mcarans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this Briar!

@@ -70,12 +88,22 @@ def populate(self) -> None:
add_missing_value_message(
errors, identifier, "admin 2 code", adm2_name
)
continue
if adm1_code is None:
# Map units that cannot be p-coded to national level
Copy link
Contributor

@mcarans mcarans Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the units that cannot be p-coded be mapped to UNSPECIFIED admin 2 codes of the form CD41-XXX or COD-XXX-XXX?

Should this change be added to food security (not necessarily in this PR)?

Copy link
Collaborator Author

@b-j-mills b-j-mills Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Units that can't be p-coded at adm1 will be mapped to unspecified units like COD-XXX-XXX. If we can p-code them to adm1 but not adm2, then they'll be mapped to units like CD41-XXX.

I think it would be good to add this kind of logic to food security! The more data we can get into HAPI the better, even if we can only p-code it to a certain level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx Briar

self.hapi_countries = countries
else:
self.hapi_countries = list(
Country.countriesdata()["countries"].keys()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be added as a method to HDX Python Country at some point

Copy link
Member

@turnerm turnerm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be amazing to have this new feature!

Any idea how it impacts the run time?

@b-j-mills
Copy link
Collaborator Author

The only pipeline I'm concerned about is conflict events, which ran ok on my computer. I'll test the database export before releasing!

@b-j-mills b-j-mills marked this pull request as draft September 23, 2024 12:50
@b-j-mills
Copy link
Collaborator Author

Incorporated into develop-global branch

@b-j-mills b-j-mills closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants