-
Notifications
You must be signed in to change notification settings - Fork 21
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
GSYE-842: Provide filepath to ProfilesHandler.rotate_profile in order… #1827
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -128,7 +128,10 @@ def read_or_rotate_profiles(self, reconfigure=False): | |||||||
profile = self.profile | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It needs to be checked whether it violates the previous if clauses, however the solution can be similar to this, so that the profile variable is overridden if we need to rotate a profile that originates from a CSV file:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Grrrr, you are right, I just saw the |
||||||||
self.profile = global_objects.profiles_handler.rotate_profile( | ||||||||
profile_type=self.profile_type, profile=profile, profile_uuid=self.input_profile_uuid | ||||||||
profile_type=self.profile_type, | ||||||||
profile=profile, | ||||||||
profile_uuid=self.input_profile_uuid, | ||||||||
input_profile_path=self.input_profile, | ||||||||
) | ||||||||
|
||||||||
|
||||||||
|
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 understand but why the extra parameter here? If I recall correctly, this is exactly the reason why we allow
str
as the type of theprofile
parameter, in order to be able to support file paths. Did you try setting the profile path to theprofile
parameter and it did not work out?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.
Please have a look into the StrategyProfile. If the profiles was already read once, the profile will be the profile for he first week. This will be used by the read_arbitrary_profile which will re-use it, but even worse: it will convert it again into kWh. The latter resulted in very low energy demands that are close to or lower than our Floating_point_tollerance.
I am open to better solutions 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 think that you can use the
input_profile
in theStrategyProfile
class. Let me leave a possible suggestion that you can also double check if it works out.