-
Notifications
You must be signed in to change notification settings - Fork 2
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
HAPI-133 food security #55
Conversation
|
@b-j-mills thanks so much for the great advice! Some more questions below:
|
@turnerm I think 1 could be accommodated by allowing AdminLevel in the hdx-python-country level to accept a list of countries so it doesn't get all countries from the dataset on HDX. Then only p-codes within the desired list would be accepted. For 2, it would be possible to add imports to hdx-python-scraper for whatever functions you need so that they are accessible at the config file level. For 3, do you mean making a single configurable scraper that first tries admin2, then if not filled in tries admin1, then if that's not filled in, gets admin0? If so, then that is not currently supported and would require making a custom scraper. |
|
@b-j-mills The p-code read from the dataset has to match a p-code within the AdminLevel object. (With hapi-pipelines the AdminLevel object is currently configured to read all countries from the dataset on HDX.) |
@turnerm I took a look at the data and filters and I think this one may require a custom scraper. We're scraping all of the historical data as well, right? Not just the latest? |
@b-j-mills @mcarans thanks so much for all of your feedback. Going back to the quesitons:
So with all that it's ready to review! |
country["input"] = country["input"] + default["input"] | ||
country["output"] = country["output"] + default["output"] | ||
country["output_hxl"] = country["output_hxl"] + default["output_hxl"] | ||
for list_name in ["input", "list", "output", "output_hxl"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to use tuples rather than lists because the former are immutable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point, changed!
@turnerm Regarding 1, please make a ticket. I'm not sure if the solution is related to the countries being read into AdminLevel, but anyway I've made a PR: OCHA-DAP/hdx-python-country#28 |
The tests are working on my machine, but not on GHA due to the hapi-schema branch requirements. Once HAPI-132 is closed and merged then the dependency can be changed and hopefully everything will work here, so that it can be merged. |
Pull Request Test Coverage Report for Build 6667812961
💛 - Coveralls |
Pull Request Test Coverage Report for Build 6667812405
💛 - Coveralls |
Decided to start by adding CH data which is p-coded. Leaving as draft for now, but a couple of questions @b-j-mills: