-
Notifications
You must be signed in to change notification settings - Fork 36
Release branch for v8.0.0a4 #2440
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
base: pysdk-release-v8
Are you sure you want to change the base?
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
8c9eba6 to
e17688b
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## pysdk-release-v8 #2440 +/- ##
====================================================
- Coverage 64.80% 64.58% -0.23%
====================================================
Files 467 467
Lines 47418 47484 +66
====================================================
- Hits 30731 30669 -62
- Misses 16687 16815 +128
🚀 New features to boost your workflow:
|
ae07d8b to
abf38e6
Compare
d6a889b to
2a622fc
Compare
2a622fc to
c9e780f
Compare
c9e780f to
f0bb599
Compare
doctrino
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.
Good stuff, on request for further v8 improvement.
| self._cognite_client = cast("AsyncCogniteClient", cognite_client) | ||
| super().__init__(resources) | ||
| self._build_id_mappings() | ||
| self._build_id_mappings() # TODO: Make lazy? |
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.
Is it possible to drop this for v8. It does not make sense to me that a list object build up a custom mapping to behave like a dict.
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.
Yeah, you for sure have a point. I believe, unfortunately, that this is one of the more used helper utilities we have and so removing it might annoy a bit too many users. I do think we should make it lazy init though.
| instance = resource_cls(*positional_arguments, **keyword_arguments) | ||
|
|
||
| # Set client reference on resources that use it: | ||
| if hasattr(instance, "set_client_ref"): |
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.
Shouldn't this use the _maybe_set_client method?
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.
Since the FakeCogniteResourceGenerator can create all kinds of objects, from filters to aggregations to sequences of strings, I assumed most objects were not going to be CogniteResource subclasses, that I went with this hasattr check instead.
https://cognitedata.atlassian.net/browse/DM-3373
New changes
Should be reviewed commit-by-commit:
ANDextractor_extensions/v1.pyis_uploadedanduploaded_timefrom file apply inextractor_extensions/v1.pycdm/v1.pyCogniteResponseandCogniteObject. remove client reference fromCogniteResourceAPIClientto use _maybe_set_client_ref patternallow_expired_cursors_and_accept_missed_deletesininstances/sync