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

Prepare the MERGE #312

Open
6 of 18 tasks
davide-f opened this issue May 23, 2024 · 4 comments
Open
6 of 18 tasks

Prepare the MERGE #312

davide-f opened this issue May 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@davide-f
Copy link
Member

davide-f commented May 23, 2024

Copying from #308

Changes proposed in this Pull Request

This PR should clean the scripts, enhance the readability and overall architecture of the model preparing for a future model merge with the power sector model. All open PRs should be reviewed and merged before this one.

Subtasks

This PR consists of sevaral tasks

  • 1. Prepare the config files.
  • 2. Improve the script prepare_sector_network.py.
    • Enhance code quality and architecture. -> optional, not spend too much time here for the merge
    • Add sufficient documentation.
  • 3. Revise the heat sector.
    • Check the heat scripts. -> secondary priority
  • 4. Prepare the snakefile.
  • 5. General style improvement
  • 6. Other functionalities
    • Support last environment and pypsa version, by adopting linopy Linopy Integration #351 . PyPSA-Earth has a ready PR that supports it and it may be interesting to have this too
@davide-f davide-f added the enhancement New feature or request label May 23, 2024
@finozzifa
Copy link
Contributor

Use a single config file --> #313

@finozzifa
Copy link
Contributor

finozzifa commented May 28, 2024

Hi @davide-f,
what is it meant exactly with Prepare the snakefile, align with PyPSA-Earth
Thanks : )

@davide-f
Copy link
Member Author

davide-f commented May 30, 2024

Macrotopics

Usability

  • compatibility with previous repos

Procedure

  • define procedure to avoid conflicts
    • avoid files in the scripts folder to have the same name across repos
    • do not have file "snakefile" in both repos
    • make sure no other file has the same path and name
  • define the repo structure [the -eur one?]
    • have a scripts folder only or more? 1 only is easy but overwhelming; more may be tricky from a coding perspective
    • Maybe define smart naming conventions: e.g. retrieve_power/sec_...
      Add these only if needed
  • restructure the repos to make sure to avoid git merge conflicts
  • overlapping rules need to be sorted out
  • move issues across repos
  1. config files
  2. snakefile modularity
  3. styling convention of python (snakemake params and scenario runs)
  4. structure of the repo
    • we keep 1 script folder only
    • do we want the networks folder?
  5. how to make sure to satisfy usability?
    • make sure that the commands for both CIs work the same
  6. need to revise the documentation folder accordingly

COMMUNICATE TO THE COMMUNITY:

  • we go for the merge
  • in the next weeks, we will be preparing the repos
  • need to close PRs before merge
  • once we start the merge, no more merge and it will break existing PRs

Past experience

In -eur there have been misalignment between the repos to be fixed.
A lot of brute force.

First, the two packages have been merged (brute force) and then let's see.
Most snakefile rules were diverging, thus lot of rearrangement, done during the merge-> the snakefile has been modularized into multiple .smk files.
The config: large merge issue: append entries first and then consolidated. Done lots of brute force. [3 intense days]
Not much preparation

Suggestion: make sure that the two git repositories are on the same state: use the latest version.

Concrete steps

  1. config files
  2. snakefile modularity: secondary priority
  3. styling convention of python:
    • drop deprecations
    • update to linopy?
    • snakemake params [not necessary but maybe nice to have]
    • scenario runs [third priority]
  4. structure of the repo
    • we keep 1 script folder only
    • do we want the networks folder? -> ask to the community
  5. how to make sure to satisfy usability?
    • make sure that the commands for both CIs work the same
  6. need to revise the documentation folder accordingly

Timeline

  • low availability by Hazem
  • fabian, from 2 weeks may have availability

2-4 weeks preparation
weekly update during the -sec model
4-8 weeks target for merge success

@ekatef
Copy link
Collaborator

ekatef commented May 30, 2024

In part of linopy integration: we have a PR opened in pypsa-eath. No problem to keep it opened to after merge. But also happy to support integration of it into pypsa-earth-sec before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants