Skip to content

Conversation

@angranl-flex
Copy link
Contributor

No description provided.

@angranl-flex angranl-flex changed the title [FXC-4006][FXC-4053] Add validation for transition model output fields and output frequency settings [FXC-4006][FXC-4053][25.6] Add validation for transition model output fields and output frequency settings Nov 11, 2025
+ " 0 is at beginning of simulation.",
)

@pd.field_validator("frequency", "frequency_offset")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def disable_frequecy_settings_in_steady_simulation(cls, value, info: pd.ValidationInfo):
def disable_frequency_settings_in_steady_simulation(cls, value, info: pd.ValidationInfo):

Copy link
Collaborator

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):
Copy link
Collaborator

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):
Copy link
Collaborator

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
Copy link
Collaborator

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():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove haha :)

@angranl-flex
Copy link
Contributor Author

Closed since we will only fix 25.7

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.

3 participants