-
Notifications
You must be signed in to change notification settings - Fork 2
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 checks related to vegetation and variable friction #353
Conversation
…hreedi-modelchecker into margriet_339-var-friction-and-veg
…nd catch tabulated yz shapes with neither friction value or friction values defined
nens/threedi-schema#51 has been approved with one requested change; could you fix, merge and release it to see if the tests run afterwards? @margrietpalm |
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.
Mostly looks fine; I haven't tested the checks in depth. Again just a few small changes, and the changelog needs updating.
Co-authored-by: Eli Sallé <eli.salle@nelen-schuurmans.nl>
…hreedi-modelchecker into margriet_339-var-friction-and-veg
threedi_modelchecker/config.py
Outdated
column=col, | ||
shapes=(constants.CrossSectionShape.TABULATED_YZ,), | ||
) | ||
for col in vegetation_parameter_columns |
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.
for col in vegetation_parameter_columns | |
for col in [ | |
*vegetation_parameter_columns, | |
models.CrossSectionDefinition.friction_values | |
] |
if they use the same error code it would be nice if the checks are together
Changed to draft because a check has to be added that all vegetation parameters are present together. |
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.
This is really neat! I like the new base check; very useful.
I added a load of checks. See detailed description below (ticket was not very clear). Note that the contents of these checks needs to be double checked by @GolnesaK or @nvolp.
Note that the tests fail because threedi-schema 0.219 hasn't been released, see nens/threedi-schema#51.
Added checks
The added checks involve variable friction, vegetation and variable vegetation.
Type checks for variable properties
CrossSectionDefinition
friction_values
,vegetation_drag_coefficients
,vegetation_heights
,vegetation_stem_diameters
,vegetation_stem_densities
Check column length of variable properties
CrossSectionDefinition
friction_values
,vegetation_drag_coefficients
,vegetation_heights
,vegetation_stem_diameters
,vegetation_stem_densities
CrossSectionDefinition.width
andCrossSectionDefinition.height
Range checks for variable friction and vegetation properties
Vegetation
CrossSectionLocation
vegetation_drag_coefficient
,vegetation_height
,vegetation_stem_diameter
,vegetation_stem_density
Variable vegetation
CrossSectionDefinition
vegetation_drag_coefficients
,vegetation_heights
,vegetation_stem_diameters
,vegetation_stem_densities
Variable friction
CrossSectionDefinition
friction_values
Limit to open channels
CrossSectionDefinition
friction_values
,vegetation_drag_coefficients
,vegetation_heights
,vegetation_stem_diameters
,vegetation_stem_densities
Missing friction values
CrossSectionDefinition.friction_values
andCrossSectionLocation.friction_value
CrossSectionLocation.shape
is notTABULED_YZ
andCrossSectionLocation.friction_value
is definedCrossSectionLocation.shape
isTABULED_YZ
andCrossSectionLocation.friction_value
and/orCrossSectionDefinition.friction_values
is definedLimit variable friction and vegetation to cross section shape TABULATED_YZ
CrossSectionLocation
vegetation_drag_coefficient
,vegetation_height
,vegetation_stem_diameter
,vegetation_stem_density
Dependence friction type and vegetation
CrossSectionLocation
vegetation_drag_coefficient
,vegetation_height
,vegetation_stem_diameter
,vegetation_stem_density
CrossSectionDefinition
friction_values
,vegetation_drag_coefficients
,vegetation_heights
,vegetation_stem_diameters
,vegetation_stem_densities
Handling cases with fixed and variable parameters defined for friciton of vegetation
CrossSectionLocation
) is usedCrossSectionDefinition
) is used