-
Notifications
You must be signed in to change notification settings - Fork 9
[FXC-4006][FXC-4053][25.6] Add validation for transition model output fields and output frequency settings #1580
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
[FXC-4006][FXC-4053][25.6] Add validation for transition model output fields and output frequency settings #1580
Conversation
| + " 0 is at beginning of simulation.", | ||
| ) | ||
|
|
||
| @pd.field_validator("frequency", "frequency_offset") |
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.
| @pd.field_validator("frequency", "frequency_offset") | |
| @pd.field_validator("frequency", "frequency_offset", mode="after") |
|
|
||
| @pd.field_validator("frequency", "frequency_offset") | ||
| @classmethod | ||
| def disable_frequecy_settings_in_steady_simulation(cls, value, info: pd.ValidationInfo): |
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.
| def disable_frequecy_settings_in_steady_simulation(cls, value, info: pd.ValidationInfo): | |
| def disable_frequency_settings_in_steady_simulation(cls, value, info: pd.ValidationInfo): |
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.
Let's make this change to 25.7 instead and write updater for this.
|
|
||
| @pd.field_validator("frequency", "frequency_offset") | ||
| @classmethod | ||
| def disable_frequecy_settings_in_steady_simulation(cls, value, info: pd.ValidationInfo): |
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.
Let's make this change to 25.7 instead and write updater for this.
| return params | ||
|
|
||
|
|
||
| def _check_output_fields_valid_given_transition_model(params): |
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.
Same here. Please add updater.
| import os | ||
| import re | ||
|
|
||
| import pydantic as pd |
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.
remove
| ) | ||
|
|
||
|
|
||
| def test_output_frequecy_settings_in_steady_simulation(): |
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.
| def test_output_frequecy_settings_in_steady_simulation(): | |
| def test_output_frequency_settings_in_steady_simulation(): |
| ) | ||
|
|
||
| params_as_dict = params.model_dump(exclude_none=True, mode="json") | ||
| print("haha", params_as_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.
remove haha :)
|
Closed since we will only fix 25.7 |
No description provided.