-
Notifications
You must be signed in to change notification settings - Fork 2
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 missing automatic_{profile,trend}_frequency parameter #252
Add missing automatic_{profile,trend}_frequency parameter #252
Conversation
Codecov Report
@@ Coverage Diff @@
## rb-ASIM-v22.2.0 #252 +/- ##
================================================
Coverage 99.95% 99.95%
================================================
Files 41 41
Lines 4457 4457
================================================
Hits 4455 4455
Misses 2 2 |
@@ -1592,8 +1592,10 @@ def load_case_output_description( | |||
) -> case_description.CaseOutputDescription: |
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.
Should I add a unit test for this function 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.
I believe it is already tested since you just added those new parameters to the filled_case_description
.
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.
You'd think that, but the tests pass regardless of the two fields added to this dict.
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 say "don't add test for this" because I think all explicit loaders should die =) #216
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, add a new entry to CHANGELOG.rst
.
@@ -1592,8 +1592,10 @@ def load_case_output_description( | |||
) -> case_description.CaseOutputDescription: |
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 believe it is already tested since you just added those new parameters to the filled_case_description
.
@@ -441,8 +441,10 @@ | |||
) | |||
CASE_OUTPUT_DESCRIPTION = case_description.CaseOutputDescription( | |||
trends=TRENDS_OUTPUT_DESCRIPTION, | |||
automatic_trend_frequency=True, |
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 is the idea of these parameters? If they are True
, the trend_frequency
and profile_frequency
are ignored?
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.
They already exist, but are missing in some places. If I understand them correctly, it's like what you said, automatic_...
being True
means the property will be derived automatically from some defaults.
From the application's tooltips:
Uses an automatically defined frequency to save profile output data.
The frequency used is the highest value between: default profile frequency, maximum timestep configured, and an estimate based on simulation time (1/10 of total time).
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.
Nice. Thanks for the explanation!
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.
It is also possible that the "case description"-"alfacase" round trip is saving the unused values. I remember to add that option with the multi inputs to test transient and constant in one go (but disabled on production).
But as he pointed out "... used is the highest value between: default profile frequency, maximum timestep configured, and an estimate ..."
No description provided.