Replies: 1 comment
-
|
@thatguy7 , interesting Idea. Pandapower is over 10 Years old now, and when we started, dataclasses did not exist (If I remember correctly). I think a separation into different classes for results and so on will not happen. But currently we are trying to get pandera to work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys, I've been using pandapower at work more often recently and found using the pandapowerNet class somewhat cumbersome, so I was wondering what the story behind it is.
From the way I was interacting with it so far, it seems to me like it could be a well defined class. Simplified, it could be something like e.g.
From what I gather, in the current implementation the pandapowerNet is a subclass of dict (MutableMapping). Is there a reason for this? As a user, I would much rather prefer the net being a well defined type that I can rely on having certain attributes - which would also let my IDE provide proper hints, and even a little type checking on my side of the code.
One might even push it further: Analogously one might consider splitting of the results into their own classes with well defined structure instead of adding
res_...tables to the original net e.g.This would be nice, but also break existing code, so the pandapowerNet would need to catch this and warn with a deprecation until it is eventually removed so
net.res_<table>no longer works.Analogously one might handle
res_<something>_estand any other result types. I can imagine that this would be a quite huge change, but in my opinion worth it for usability in the long run.But whatever the details might end up being, is there a plan to move pandapower to more type-able data structures in the future?
Beta Was this translation helpful? Give feedback.
All reactions