-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add tests for module compression_heatpumps_and_chillers #57
Conversation
Thanks for the tests! Looks good, just some minor remarks. |
- improve readability of exceptions
- Remove argument 'consider_icing' in calc_cop - New: argument 'factor_icing' alone triggers icing to be considered
Good feedback! |
# Combining 'consider_icing' and mode 'chiller' is not possible! | ||
cops = None | ||
|
||
raise ValueError('Argument factor ising has ' |
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.
raise ValueError('Argument factor ising has ' | |
raise ValueError("Argument factor_icing has " |
cops = None | ||
|
||
raise ValueError('Argument factor ising has ' | ||
'to be None for mode=chiller!') |
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.
'to be None for mode=chiller!') | |
"to be None for mode='chiller'!") |
@@ -139,6 +158,9 @@ def calc_max_Q_dot_chill(nominal_conditions, cops): | |||
|
|||
|
|||
""" | |||
if not isinstance(cops, list): | |||
raise TypeError('Argument cops is not of type 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.
raise TypeError('Argument cops is not of type list!') | |
raise TypeError("Argument 'cops' is not of type list!") |
Thanks, looks good. Just a little suggestion in for the error messages. Apart from that, it could be merged. In another PR, you could implement the functionality of giving back a pd.Series as result when passing one as input. But that can be dealt with separately. |
compression_heatpumps_and_chillers.py
.It also includes two additional changes (I know, I should have done this in seperate PRs - sry!)
2) The PR fixes the docstring of a pre-calculation-function. Before it said the input argument had to be of type list but in fact it can be a pandas.Series as well. I added that information to the docstring.