Skip to content
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

Conversation

cauebs
Copy link
Contributor

@cauebs cauebs commented Jun 17, 2022

No description provided.

@cauebs cauebs requested review from ggrbill and nicoddemus June 17, 2022 19:45
@codecov
Copy link

codecov bot commented Jun 17, 2022

Codecov Report

Merging #252 (613b3e9) into rb-ASIM-v22.2.0 (ee2fb88) will not change coverage.
The diff coverage is n/a.

@@               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:
Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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

@cauebs cauebs changed the base branch from master to rb-ASIM-v22.2.0 June 17, 2022 19:52
Copy link
Member

@ggrbill ggrbill left a 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:
Copy link
Member

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,
Copy link
Member

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?

Copy link
Contributor Author

@cauebs cauebs Jun 17, 2022

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).

Copy link
Member

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!

Copy link
Member

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 ..."

@cauebs cauebs requested a review from ggrbill June 20, 2022 19:17
@cauebs cauebs merged commit eb3a99d into rb-ASIM-v22.2.0 Jun 21, 2022
@cauebs cauebs deleted the fb-ASIM-4691-alfacase-import-export-not-respecting-automatic-params branch June 21, 2022 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants