-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/acp regions #342
base: develop
Are you sure you want to change the base?
Feature/acp regions #342
Conversation
csv = CSV.read(BIOPAMA_COUNTRIES_CSV) | ||
csv.shift # remove headers |
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 think these two lines can be removed now you are using the foreach
at line 10
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.
Ah, I forgot about those. Fixed now. Thanks, @lucacug !
Happy now!! |
@stacytalbot We were waiting for JRC to approve this before merging and going on production, but I think they never came back to us (or at least to me). Might be worth double checking internally with the rest of the team. |
Description
This is to amend the representation of biopama countries and replace the
is_biopama
bool with anacp_region
string to also represent the ACP region countries belong to.This means that countries with
acp_region
equal tonil
are not ACP countries.This PR specifically is about updating the CSV source and the importer.
Changes made on the db can be found on the related pp-db PR.
Notes
Wdpa::BiopamaCountriesImporter.import
countries
table. Another potential approach would have been doing a Single Table Inheritance with the region model so that, in the future, we could add different regions for different mappings. However, that requires important changes within the code which would need to be properly scheduled in.