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

Harmonise folder structure for workflow outputs #1236

Merged
merged 7 commits into from
Dec 24, 2024

Conversation

ekatef
Copy link
Member

@ekatef ekatef commented Dec 11, 2024

Changes proposed in this Pull Request

PR address TODOs in Snakemake related to placing the outputs into resources instead of data. It has also required some changes in other Snakemake rules and inside the scripts.

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.

@ekatef ekatef marked this pull request as ready for review December 20, 2024 23:55
@davide-f davide-f linked an issue Dec 21, 2024 that may be closed by this pull request
unsd_path = (
os.path.dirname(snakemake.input["energy_totals_base"]) + "/demand/unsd/data/"
os.path.dirname(snakemake.input["transactions_path"]) + "/demand/unsd/data/"
Copy link
Member

Choose a reason for hiding this comment

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

Hello!
Apologies, the review of this PR may have been left in drafts.

The whole PR sounds great to me but I'm a bit in doubt about this line.
The rule build_base_energy_totals creates such folder with the target files here loaded.
I believe it would be advisable to add an output to the build base rule and an input here with the directory.
That should avoid the confusion and this inner hidden dependencies.
What do you think?

Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

Great :D Objective function of the -sec model does not change too.
Can we merge this?

@ekatef
Copy link
Member Author

ekatef commented Dec 24, 2024

Great :D Objective function of the -sec model does not change too.

Can we merge this?

Super 🙂 I think yes!

@davide-f davide-f merged commit b7f1ffb into pypsa-meets-earth:main Dec 24, 2024
6 checks passed
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.

Output of prepare_energy_totals shall be moved into resources folder
2 participants