This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
migrate LayerInfo, Result, and ModelResult to pydantic BaseModel #405
Merged
Conversation
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
rahul-tuli
previously approved these changes
Oct 12, 2021
Member
rahul-tuli
left a comment
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.
LGTM!
markurtz
previously approved these changes
Oct 14, 2021
Member
markurtz
left a comment
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.
Looks great Ben, I also love how much pydantic takes over for us to remove the boilerplate! Once this lands, it might be good to cherry pick this over for 0.8
…o in favor of pydantic built-ins
Contributor
Author
|
thanks @markurtz, your point actually made me realize that pydantic can handle the JSON serialization for the layer info and result objects, so I've updated this. the only drawback is that pydantic includes optionals that are |
Member
rahul-tuli
approved these changes
Oct 14, 2021
markurtz
approved these changes
Oct 14, 2021
bfineran
added a commit
that referenced
this pull request
Oct 14, 2021
* migrate LayerInfo and analysis result classes to pydantic * bump pydantic min version to 1.5.0 (default_factory support) * removing boilerplate JSON serialization fns for results and layer info in favor of pydantic built-ins
markurtz
pushed a commit
that referenced
this pull request
Oct 19, 2021
… (#411) * migrate LayerInfo and analysis result classes to pydantic * bump pydantic min version to 1.5.0 (default_factory support) * removing boilerplate JSON serialization fns for results and layer info in favor of pydantic built-ins
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

default_factory