-
Notifications
You must be signed in to change notification settings - Fork 40
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
refactor: move generation of matfile to separate function #406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense.
I would create a new module in PowerSimData/input next to grid.py since it can be used outside the scenario framework and it is an input of the simulation |
Propose a location and I will move it. I have no attachment to the current one, I just wanted to decouple the function somehow. Wherever we put it, it would probably be good to have a convenience method on the Grid object that calls the function. |
48d7520
to
866fcb8
Compare
I would wait that |
Once a Grid is instantiated, does it matter where it came from in order to write the tables into a matfile? |
No it does not. I said to wait because we did quite some modifications in the |
I am not in a particular rush. I needed to do this for some of my own work, and I used an ugly workaround, and in the process I saw how simple the change could be so I decided to get the ball rolling on a PR. |
866fcb8
to
ecfa4fd
Compare
ecfa4fd
to
153bdfa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful
Purpose
Decouple the matfile generation from the client/server setup. Closes #364.
What the code is doing
Code doesn't functionally change, it's just reorganized.
Testing
Not tested yet to prepare a scenario, but tested for creating a matfile from a base grid.
Usage Example/Visuals
Time estimate
5 minutes to understand, maybe longer to decide exactly where you think this should live.