-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[MAINTENANCE] Ban future use of convert_to_json_serializable
#9935
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9935 +/- ##
========================================
Coverage 77.85% 77.85%
========================================
Files 454 454
Lines 39517 39517
========================================
Hits 30766 30766
Misses 8751 8751
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
"great_expectations.util.convert_to_json_serializable".msg = "Use pydantic for serialization." | ||
"great_expectations.util.ensure_json_serializable".msg = "Use pydantic for serialization." |
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.
Not sure if we care as much about ensure_json_serializable
🤷
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.
Yes, this is what I had in mind!
Use of
convert_to_json_serializable
is a sign that we aren't properly using pydantic models for objects that require json serialization.Ban the import of the function and add
# noqa: TID25
for existing violations.Also ban
ensure_json_serializable
(maybe we don't care as much about this one?)