simplify warning + save figures with white background + use environment.yaml
martavp opened this issue · 3 comments
Hi @ricnogfer
I was trying pypsatop this morning and it looks great!
I tested with the following more updated versions and it worked nicely
Python 3.10
PyPSA 0.25.1
Pandas 2.0.3
I installed graphviz in my environment using
mamba install graphviz
- I only tried activating the focus option and neighbouring=1, more than that it takes > 10 minutes to produce a figure for the typically pypsa-eur network with 37 countries.
Some ideas to improve the current version:
[ ] remove the warning message when a link does not have bus3 or bus4 specified, this is very common and makes the warning log very busy.
[ ] Add an 'environment.yaml' to keep track of the working version of packages
[ ] Save .png and .jpg by default with a white background (currently difficult to see with dark background)
[ ] In readme, instead of defining the components, you can just link the documentation
https://pypsa.readthedocs.io/en/latest/components.html
Hi @martavp,
Great to know that PyPSATopo works nicely!
Thanks for the suggestions. Concerning the background color... by default, the background is set to transparent (see https://github.com/ricnogfer/pypsatopo/blob/master/pypsatopo.py#L49) as I assumed that this would be what most users prefer. That said, PyPSATopo is highly configurable and the background may be set with a specific color. As an example, this will generate the topographical representation of a network with a white background:
pypsatopo.BACKGROUND_COLOR = "white"
pypsatopo.generate(my_network)
Will look/implement the remaining suggestions when the time comes. Thanks for your time for having tried out the tool!
Concerning the idea/suggestion:
[ ] Add an 'environment.yaml' to keep track of the working version of packages
This is solved in commit 01106a0.
Concerning the idea/suggestion:
[ ] remove the warning message when a link does not have bus3 or bus4 specified, this is very common and makes the warning log very busy.
A new issue has been created (#6) that specifies the logic that will be implemented to solve this in a generic way (so that other possible future use-cases can be solved too).