-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixed electricity example, added holiday functionality to industrial profile generation. #60
Conversation
Fix the load profiles named "i0", "i1" and "i2", which do not produce any profile to the new naming scheme ("l0" to "l2") which do.
Added functionality to add holiday profiles to the industrial electricity profile generator. Addittionally simplified the particular_profiles.py function with a loop to reduce the amount of repetitive function calls. Fixed a futurewarning arising from the initialization of the "int" column with an int instead of a float.
Hello @ddceruti! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-07-16 16:52:31 UTC |
…ofile According to recent changes.
src/demandlib/particular_profiles.py
Outdated
except KeyError as e: | ||
warnings.warn(f"Missing entry for {e} in profile_factors", UserWarning) | ||
|
||
# Example usage |
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.
What does this comment mean?
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.
Changed for clarity, this comment was not supposed to be there.
src/demandlib/particular_profiles.py
Outdated
inplace=True, | ||
) | ||
except KeyError as e: | ||
warnings.warn(f"Missing entry for {e} in profile_factors", UserWarning) |
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 would rather use logging.warning
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.
Changed! Thanks for your feedback
Thanks for your efforts. Your ideas were considered in #68, as far as I see. |
Correcten an error in the electricity_demand_example where the "i0" to "i2" profiles did not produce any time series. Added a funcitonality to particular_profiles.py to allow defining holiday weights, which were being treated as weekend days until now. If the holiday key is not specified, the function treats the holidays as weekend days as before. Simplified the function by adding a loop.