-
Notifications
You must be signed in to change notification settings - Fork 51
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
troute.config: Implementation of t-route configuration file schema using pydantic #628
Conversation
This package provides pydantic data models that capture troute's configuration file schema. This enables validating and programmatically accessing troute config files.
@shorvath-noaa, it doesnt look like I can assign a reviewer. If you could assign one that would be great! Look forward to working through this with you all! |
…rbody_parameters exists
…meseries_filepath root_validator
@kumdonoaa @hellkite500 @aaraney I've made my updates to this PR that @aaraney started (thanks for getting the ball rolling!). Could someone give it a review? I focused on implementing this for v4, and I plan to make an additional branch/PR after this is merged to integrate this module into t-route. I'm sure there will be additional edits that need to be made once integration begins, but this seems like a good start. |
This is my first go at implementing pydantic "data models" (often called schemas) that capture troute's configuration file. Im sure that I've missed some fields or used incorrect types / default values in several places.
closes #618
Additions
troute.config
namespace package that capture troute's configuration file. This package provides APIs for validating and programmatically accessing troute's configuration file.Notes
pydantic~=1.10
. Nearly all, if not all, OWP code that uses pydantic currently pins pydantic in this way for several reasons. The first being breaking changes introduced in pydantic v2, the second relates to concerns with using pydantic >= 2 in deployment environments that don't yet supportrustc
. The long and short of it is, pydantic v2 was re-written with the core written inrust
. Until we can verify that all deployment environments support some version ofrustc
, this pinning will remain.Todos
Checklist