-
Notifications
You must be signed in to change notification settings - Fork 27
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
Upgrade resource usage tracker (Pydantic v2) #6517
Merged
giancarloromeo
merged 24 commits into
ITISFoundation:pydantic_v2_migration
from
giancarloromeo:is4481/upgrade-resource-usage-tracker
Oct 21, 2024
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bd6a8be
upgrade reqs
giancarloromeo b7f91f0
fix code
giancarloromeo 468576c
fix url
giancarloromeo 6d95b55
remove deprecated
giancarloromeo 3ead85e
Merge branch 'pydantic_v2_migration' into is4481/upgrade-resource-usa…
giancarloromeo 5e17799
fix validation
giancarloromeo d6133d0
fix field prop
giancarloromeo 42cc639
fix validation
giancarloromeo 462aa6f
fix typecheck
giancarloromeo 729b495
fix
giancarloromeo 98a2457
fix test
giancarloromeo 6d663fe
fix
giancarloromeo b3d9692
fix
giancarloromeo cd27d98
fix
giancarloromeo fa263f6
remove deprecated
giancarloromeo d40fcc3
Merge branch 'pydantic_v2_migration' into is4481/upgrade-resource-usa…
giancarloromeo 9bc9c7b
change mode
giancarloromeo c2c98d3
revert credit validator
giancarloromeo a68cdc4
fix Decimal serialization
giancarloromeo 9564942
replace deprecated
giancarloromeo 7463f60
add serializer
giancarloromeo ea7536d
fix openapi
giancarloromeo d751091
fix Decimal field serialization
giancarloromeo 768defd
fix error handler
giancarloromeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
3 questions here:
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.
The
PlainSerializer
is used here to serialize asfloat
theDecimal
field that from Pydantic v2 would be returned asstr
in theJSON
serialization. Without it the OpenAPI schema would have a field of typestring
instead ofnumber
, changing the interface.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.
If unit tests are passing, then it should be fine (we have some tests for this Decimal checks)
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.
@matusdrobuliak66 I’m quite skeptical about the changes in these
Decimal
... should be test it further ?:-(