pypsa-meets-earth / pypsa-earth

PyPSA-Earth: A flexible Python-based open optimisation model to study energy system futures around the world.
https://pypsa-earth.readthedocs.io/en/latest/
213 stars 169 forks source link

Hard coded sets_path_to_root name #639

Open Tomkourou opened 1 year ago

Tomkourou commented 1 year ago

Checklist

Describe the Bug

The function to sets_path_to_root is hardcoded in a number of places with pypsa-earth. This caused some issues because I have forked and renamed the repo therefore breaking the code. the retrieve_databundle_light rule was breaking until I changed this to my repo name.

https://github.com/pypsa-meets-earth/pypsa-earth/blob/508f80c4726b8373cec0eac1f0b52d7520c99077/scripts/retrieve_databundle_light.py#L630

Above is one example of this but I found it in 10 other places in scripts.

I would suggest changing this to a variable and perhaps putting it in the snakefile or the config file? What do you think?

davide-f commented 1 year ago

Thanks @Tomkourou for the comment and indeed we could discuss here and in one of the next developers meeting.

This issue could be a nice first issue to address