Move hydrology over to the new configuration system#1114
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1114 +/- ##
========================================
Coverage 94.68% 94.69%
========================================
Files 90 90
Lines 7887 7872 -15
========================================
- Hits 7468 7454 -14
+ Misses 419 418 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8 tasks
sallymatson
approved these changes
Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the
hydrologymodel for the new configuration system.HydroConstsfor the newHydrologyConstantsCompiledConfigurationobjecthydrology.model_configto add some value constraints that were previously checked by the model. This is part of a general move to validate configurations before they get anywhere near being used.test_model_config.pythat runs the config validation tests that were previously built into model generation test.There's one hanging issue, which is the embedded hard coded
AbioticConstsin_setup.AbioticSimpleConstantsdoesn't provide those values and we only useabiotic_simplein the example dataset and tests. So, we need to find decide which way to pass that information in with the new configuration setup. This is all related to a bunch of long standing issues with inheritance of constants classes._from_configand added theabiotic_constantsas an argument to__init__. That's closer to what will happen in the future, because it is configurable.Fixes #1110
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks