-
Notifications
You must be signed in to change notification settings - Fork 4
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
T3D header not correct #356
Conversation
…s a vertical position index.
…pdated testcase data to reflect the changes made to some keywords in the .bc file.
…Model instead of a NamedTuple.
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.
@tim-vd-aardweg : please see my recommendations and some questions.
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.
Tested it with the testcase from #317. All reported issues are solved
…w comments. Updated testcases.
Implemented review comments and fixed a small bug. |
…eltares/HYDROLIB-core into fix/317_t3d_header_not_correct
… a [TimeSeries] block.
…hat is required in the root_validator
…rver and is not super relevant.
…eneric root validator that can be used to rename keys.
Co-authored-by: Prisca van der Sluis <36264671+priscavdsluis@users.noreply.github.com>
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.
Will continue a separate review directly after this for Tim's later commits of this day. Those will contain important cleanups for the field name validators
"""VerticalPositionType: The vertical position type of the verticalpositions values.""" | ||
|
||
timeinterpolation: TimeInterpolation = Field( | ||
TimeInterpolation.linear, alias="timeInterpolation" | ||
TimeInterpolation.linear.value, alias="timeInterpolation" |
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.
Can .value
be removed?
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.
Here, it cannot. If we leave it out here, it will write TimeInterpolation.linear
to the files.
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 find this very strange behaviour I must say 🤔
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'm ok after Prisca's earlier comments have been resolved.
@@ -462,3 +462,28 @@ def is_valid_coordinates_with_num_coordinates_specification() -> bool: | |||
raise ValueError(error) | |||
|
|||
return root_validator(allow_reuse=True)(validate_location_specification) | |||
|
|||
|
|||
def get_key_renaming_root_validator(keys_to_rename: Dict[str, List[str]]): |
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.
Yes! Like this a lot :-)
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.
Thanks! :)
SonarCloud Quality Gate failed.
|
Fixes #317