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

ValidationError upon reading StructureModel #353

Closed
veenstrajelmer opened this issue Oct 3, 2022 · 1 comment · Fixed by #352 or #416
Closed

ValidationError upon reading StructureModel #353

veenstrajelmer opened this issue Oct 3, 2022 · 1 comment · Fixed by #352 or #416
Assignees
Milestone

Comments

@veenstrajelmer
Copy link
Collaborator

Describe the bug
Pli is not supported by StructureModel, currently only brancId+chainage or num/x/yCoordinates are supported. Error upon running reproduction code:

ValidationError: 2 validation errors for StructureModel
RMM_structures.ini -> structure -> 0 -> HV_1029.81_R_SK_Haringvlietsluizen1 -> __root__
  Specify location either by setting `branchId` and `chainage` or `num/x/yCoordinates` fields. (type=assertion_error)
RMM_structures.ini -> structure -> 1 -> HV_1029.81_R_SK_Haringvlietsluizen2 -> __root__
  Specify location either by setting `branchId` and `chainage` or `num/x/yCoordinates` fields. (type=assertion_error)

To Reproduce

from pathlib import Path
from hydrolib.core.io.mdu.models import StructureModel
file_struct = Path(r'p:\11206813-006-kpp2021_rmm-2d\C_Work\31_RMM_FMmodel\computations\model_setup\run_206_HYDROLIB\RMM_structures.ini')
structs = StructureModel(file_struct)

Expected behavior
Acceptance of coordinates via a pli file.

Version info (please complete the following information):

  • OS: Windows 10 and Spyder
  • Version: hydrolib-core main branch
@priscavdsluis priscavdsluis linked a pull request Oct 4, 2022 that will close this issue
@priscavdsluis priscavdsluis added this to To do in HYDROLIB-core via automation Oct 4, 2022
@priscavdsluis priscavdsluis added this to the 0.3.1 milestone Oct 4, 2022
@priscavdsluis priscavdsluis moved this from To do to Done in HYDROLIB-core Oct 4, 2022
@priscavdsluis priscavdsluis reopened this Oct 14, 2022
HYDROLIB-core automation moved this from Done to In progress Oct 14, 2022
@priscavdsluis priscavdsluis moved this from In progress to Done in HYDROLIB-core Oct 25, 2022
@arthurvd arthurvd closed this as completed Nov 9, 2022
@priscavdsluis priscavdsluis reopened this Nov 11, 2022
HYDROLIB-core automation moved this from Done to In progress Nov 11, 2022
@arthurvd
Copy link
Member

arthurvd commented Nov 11, 2022

Should be fixed by #416

@arthurvd arthurvd moved this from In progress to Ready to review in HYDROLIB-core Nov 11, 2022
@priscavdsluis priscavdsluis moved this from Ready to review to Review in progress in HYDROLIB-core Nov 22, 2022
@priscavdsluis priscavdsluis moved this from Review in progress to Reviewer follow up in HYDROLIB-core Nov 22, 2022
@arthurvd arthurvd moved this from Reviewer follow up to Ready to review in HYDROLIB-core Dec 16, 2022
HYDROLIB-core automation moved this from Ready to review to Done Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment