-
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
feat: support getting profiles from execute state #523
Conversation
Working on reconfiguring the exported methods |
We should extend this to the |
powersimdata/scenario/ready.py
Outdated
|
||
def _update_scenario_info(self): | ||
"""Updates scenario information.""" | ||
pass |
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.
How does it work? Where is the update happening?
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.
When called from analyze state, we default to this. But execute overrides the method, so it will still download the scenario list.
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.
BTW, I'm working on moving this to state.py instead, so it can also be used from the create state, which also defines its own version of _update_scenario_info
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.
The Scenario
class has a print_scenario_info
method. Just wondering if the inheritance is not going to break somewhere.
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.
Yeah I was concerned about that. After testing again it seems to work fine. Changed it so print_scenario_info
is exported from scenario.state
, so the Scenario
doesn't have to explicitly proxy.
d7c43fb
to
8ae4fa8
Compare
Thinking we save that for a future PR. I don't want to do anything too crazy with inheritance without a bit more thought regarding the design. |
Agree. Implementing capabilities of getting time series profiles in |
8ae4fa8
to
363ce3b
Compare
363ce3b
to
1949283
Compare
@@ -28,6 +29,19 @@ def refresh(self, scenario): | |||
""" | |||
pass | |||
|
|||
def _update_scenario_info(self): |
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.
I think I see what's going on here, but maybe it would be clearer if we add a comment that this method is overwritten in the Execute class, and that's why we have a placeholder here.
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.
I changed the docstring to be more useful, but didn't mention specific classes so if things change later the description won't also need to change.
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.
Looks good, thanks.
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.
LGTM. A presume a subsequent PR would be dealing with getting time series at create state.
1949283
to
aebf5c6
Compare
Purpose
Address #522
What the code is doing
Define a new
State
subclass with methods to access transformed profiles, and haveExecute
andAnalyze
inherit from that.Testing
Checked some of the methods for:
Time estimate
10 min