-
Notifications
You must be signed in to change notification settings - Fork 209
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
Add option to create subregion with minimalistic impact to the workflow #1300
base: main
Are you sure you want to change the base?
Conversation
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.
Hello @virio-andreyana :D
Many thanks for the revision! quite neat and very interesting!
I've added some comments, good to align.
On top of them, please go through the checklist, I believe it would be great to:
- add a release note
- add changes into the configuration options [the table
doc/configtables/*.csv
and line references indoc/configuration.rst
anddoc/tutorial.rst
]. - It would be advisable to integrate in build_shapes docstring (at the top) a description of the output including your proposal
- Include the feature in the tests. It could be added to the landlock test to avoid adding a new test config file
- Add the configuration option into config.default.yaml
The configuration file may contain a flag enable to be used as flag on whether the feature is used or not, instead of the option being present or not.
By doing so, the template of the config option can be added to config.default.yaml
What do you think?
This PR is architectural; any additional review is welcome
I've now added the documentations and test runs in the land-lock config for Botswana. It looks like the GADM formatting from the premade databundle for BW is somewhat outdated. But that is fixed by hashing it out, and letting the GADM be downloaded during The last problem is this
|
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've now added the documentations and test runs in the land-lock config for Botswana. It looks like the GADM formatting from the premade databundle for BW is somewhat outdated. But that is fixed by hashing it out, and letting the GADM be downloaded during
build_shapes
.The last problem is this
def save_to_geojson()
function. We have three definitions for the same function: in_helper.py
,build_shapes.py
, andcluster_network.py
. I want to make an empty geojson based onbuild_shapes.py
definition by having an empty lis as its input, but the program pulls out_helper.py
definition, which requires the input to be at least a dataframe. I couldn't find a solution that suffice them both. So what do you think is the correct approach @davide-f :
- (simple) rename the
def save_to_geojson()
to be different in each script- (difficult) create
def save_to_geojson()
in_helper.py
that is valid for all conditions
Thanks! Starting from save_to_geojson, your PR seems a bit old, please update it as this issue was solved [or improved].
We now have a generalized formulation in _helpers
Can you elaborate on the preloaded data of GADM of botswana?
Commenting the line in bundle config should not actually avoid downloading the file of the bundle it is just for information.
What issue have you found about it?
P.S. After updating the branch, please, run pre-commit run --all; the precommit is not passing
Closes #788 and #1046.
Changes proposed in this Pull Request
This is a new approach to #1046 that allows countries to be redefined into subregions and back. It's more robust because it does not impact any other rules other that the one that is being focused, namely in simplify network:
Before:
After:
Again, this requires config such as this:
As suggested by @davide-f, we also have the option to use a custom shapes for this
Checklist
test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.