-
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
Fix data modeling data type Enum dumping #2091
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2091 +/- ##
=======================================
Coverage 90.67% 90.68%
=======================================
Files 149 149
Lines 22881 22880 -1
=======================================
Hits 20748 20748
+ Misses 2133 2132 -1
|
0765c9e
to
c7ec016
Compare
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.
A few clarifying questions, otherwise all good.
res = self._post(self._RESOURCE_PATH + "/summarize", json={"items": ident.as_dicts()}) | ||
return Summary._load(res.json()["items"][0]) |
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.
Unrelated changes?
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 #42190b2
@@ -276,8 +276,8 @@ def dump(self, camel_case: bool = True) -> dict[str, str | dict]: | |||
output["immutable"] = self.immutable | |||
for key in ["nullable", "auto_increment", "name", "default_value", "description"]: | |||
if (value := getattr(self, key)) is not None: | |||
output[key] = value | |||
return convert_all_keys_to_camel_case_recursive(output) if camel_case else output |
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.
This is a dangerous function. Should we have a task to remove it? Or do it have any good use cases?
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.
Agreed, I had the same thought!
def test_ai(self): | ||
run_docstring_tests(ai) | ||
run_docstring_tests(ai.tools) | ||
run_docstring_tests(ai.tools.documents) |
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.
Have they forgotten to do it?
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.
They did, and I missed it in review
https://cognitedata.atlassian.net/browse/DM-2478
Raised on slack: https://cognitedata.slack.com/archives/C031G8Y19HP/p1736859754500529