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

Bypass external urls #1257

Merged
merged 6 commits into from
Dec 23, 2024
Merged

Conversation

davide-f
Copy link
Member

@davide-f davide-f commented Dec 23, 2024

Closes #1256

Changes proposed in this Pull Request

Checklist

  • I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and doc/requirements.txt.
  • Changes in configuration options are added in all of config.default.yaml and config.tutorial.yaml.
  • Add a test config or line additions to test/ (note tests are changing the config.tutorial.yaml)
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@davide-f davide-f requested a review from ekatef December 23, 2024 14:38
@davide-f
Copy link
Member Author

If you had time @ekatef , it would be great to review this PR and potentially merge.
This PR includes the updated tutorial files that host a gadm-like source, which should solve the CI issue.
Locally the CI worked

@ekatef
Copy link
Member

ekatef commented Dec 23, 2024

If you had time @ekatef , it would be great to review this PR and potentially merge. This PR includes the updated tutorial files that host a gadm-like source, which should solve the CI issue. Locally the CI worked

Perfect, fantastic news!! Thank you so much for tackling that. Reviewing 😄

Copy link
Member

@ekatef ekatef left a comment

Choose a reason for hiding this comment

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

Perfect @davide-f! That is fantastic news that you have managed to make CI work, and geoboundaries seem to be a good replacement 😄

Have added a couple of comments which mainly relate to documenting the changes. Could you please to have a look? Happy to merge afterwards.

Comment on lines 44 to 47
- data/gadm/gadm41_NGA/gadm41_NGA.gpkg
- data/gadm/gadm41_BEN/gadm41_BEN.gpkg
- data/gadm/gadm36_NGA/gadm36_NGA.gpkg
- data/gadm/gadm36_BEN/gadm36_BEN.gpkg
Copy link
Member

Choose a reason for hiding this comment

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

As far as I remember, gadm41 is needed for the power-only model, while gadm36 is being used by the cross-sectoral part, right? It would be nice to have a comment on that

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure it is so relevant to add these details; we have no comments on the other pieces, but I can add the lines

Comment on lines 61 to 62
- data/gadm/gadm41_BWA/gadm41_BWA.gpkg
- data/gadm/gadm36_BWA/gadm36_BWA.gpkg
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as above: it would be really great to explain a reason why we need two sources for GADM

Copy link
Member Author

Choose a reason for hiding this comment

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

as above

Comment on lines 373 to 375

# # tutorial bundle specific for Nigeria and Benin only, without gadm-like data
# bundle_tutorial_NGBJ:
Copy link
Member

Choose a reason for hiding this comment

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

Probably, it would be handy to have a short explanation on the reason to comment-out this part with a link to #1258

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding :)

Comment on lines -375 to +379
co2limit = float(m[0]) * snakemake.params.electricity["co2base"]
co2limit = float(m[0]) * float(snakemake.params.electricity["co2base"])
logger.info("Setting CO2 limit according to wildcard value.")
else:
co2limit = snakemake.params.electricity["co2limit"]
co2limit = float(snakemake.params.electricity["co2limit"])
Copy link
Member

Choose a reason for hiding this comment

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

My guess is that these changes in prepare_network have been needed to test the workflow properly. Can you please confirm that? 🙂 (apologies for an idiotic question, just double-checking that the changes are intentional and exactly as they are supposed to be)

Copy link
Member Author

Choose a reason for hiding this comment

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

Today there has been a temporary issue with the automatic download of emission data; because of that I disabled that and I had issues as the float(..) was needed to make it work.
It was a minor thing and decided to add it as it is minor

@davide-f davide-f merged commit 236e0d0 into pypsa-meets-earth:main Dec 23, 2024
4 of 5 checks passed
@davide-f davide-f mentioned this pull request Dec 23, 2024
2 tasks
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.

Avoid over-relying on GADM in CI and normal workflow
2 participants