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

simplify warning + save figures with white background + use environment.yaml #2

Open
martavp opened this issue Sep 5, 2023 · 3 comments

Comments

@martavp
Copy link
Contributor

martavp commented Sep 5, 2023

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

@ricnogfer
Copy link
Owner

ricnogfer commented Sep 5, 2023

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!

@ricnogfer
Copy link
Owner

Concerning the idea/suggestion:

[ ] Add an 'environment.yaml' to keep track of the working version of packages

This is solved in commit 01106a0.

@ricnogfer
Copy link
Owner

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).

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

No branches or pull requests

2 participants