Closed mariusves closed 7 years ago
This is a good suggestion!
Towards a future structure of this package, I would suggest having an OOP structure in mind. From my perspective this does not contradict the restructuring proposal by @mariusves.
I suggest something like
ego.powerflow/
|-- egopowerflow/
|-- powerflow/
|-- __init__.py <-- could contain basic class(es) like PowerFlow
|-- tools/
|-- __init__.py <-- could contain create_powerflow_problem() or similar
|-- io.py
|-- plot.py
|-- tools.py <-- could contain oedb_session()
|-- etc. ...
|-- examples/
|-- docs/
|-- tests/
|-- setup.py
|-- README.md
|-- .gitignore
|-- LICENSE
Some of the proposed folders/files do not exist, yet. Other are missing in the structure proposal above. This is just to give an idea how the package could be structured.
I'd like to point out we should create quite soon a class for powerflow calculations. Maybe like I illustrated above. Until then we could keep currently required methods in the tools folder and maybe move them later to the class definition or just import them. We could discuss this more in detail.
Furthermore, regarding branch management, I would suggest first to merge this branch back to dev, when #3 and #6 are closed (involves examples to run). And the open a new branch for restructuring. In general, this means keeping one branch related to one feature/issue. This will become easier if we have agreed on a general structure of this package...
In summary, if you ( @mariusves) would like to restructure the existing pypsa_io.py I would appreciate if you consider the above proposal.
Now, I saw you already did it... :)
Decided to postpone #6 until work on MV example will be continued. You can do the merge now, I do my work afterwards
Already realized, thus closed!
IMO we should split the pypsa_io.py into seperate modules and rename it.
Examples: ego_pf_io: functions for in/outputs (former pypsa_io) ego_pf_plot: various predefined plotting functions ego_pf_tools: other functions to be used in pf that don't fit into categories named before