-
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
Upsert #1287
Upsert #1287
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1287 +/- ##
==========================================
- Coverage 90.75% 90.69% -0.06%
==========================================
Files 104 104
Lines 12120 12269 +149
==========================================
+ Hits 10999 11127 +128
- Misses 1121 1142 +21
|
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 good stuff, yo
PropertySpec("name", is_nullable=False), | ||
PropertySpec("description"), | ||
PropertySpec("data_set_id"), | ||
PropertySpec("metadata", is_list=True), |
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 is_list
name feels odd. What about is_object
or is_container
?
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.
I think is_object
is misleading. Not a strong preference, although I lean towards staying is_list
. @erlendvollset Thought?
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_list
sounds wrong for objects yes. how about just is_primitive
?
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.
I think is_primitive
would be the opposite of is_list
? In that case I will go with is_container
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.
Let's add a section to the docs describing the patch vs. replace behaviour.
PropertySpec("name", is_nullable=False), | ||
PropertySpec("description"), | ||
PropertySpec("data_set_id"), | ||
PropertySpec("metadata", is_list=True), |
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_list
sounds wrong for objects yes. how about just is_primitive
?
We should also make it very explicit that this upsert operation is not atomic. |
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!
Description
Done ready for full review.
Found a issue with
Sequence.columns
added an issue on it here; #1292But saving that implementation for later.
Checklist:
If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.