-
Notifications
You must be signed in to change notification settings - Fork 77
Add update row to low level python #1597
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
Conversation
@jeromekelleher Can I get a quick review here before the copy-paste-athon? |
Codecov Report
@@ Coverage Diff @@
## main #1597 +/- ##
==========================================
+ Coverage 93.62% 93.65% +0.03%
==========================================
Files 27 27
Lines 23075 23237 +162
Branches 1079 1079
==========================================
+ Hits 21603 21763 +160
- Misses 1438 1440 +2
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Hmm, not sure about this pattern. I see what you're trying to do though, and avoiding duplicating all the arg parsing logic is definition worth doing.
Let me have a think about it and see if I can come up with anything better. So, hold off on the copy-paste-athon for a bit if you don't mind, please.
I've had a look at this, and actually the IndividualTable is the wrong place to start as it's by far and away the most complicated example. For the other tables, it'll be much simpler to just copy and paste and tweak in the obvious way than to try and factor out the common code. Try seeing what it looks like for EdgeTable, and then consider which option (i.e., trying to factor out the argument parsing code, or just copy-paste-altering) would be easier for a new contributor to understand. |
e5847f6
to
8cf9e4a
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.
LGTM, minor points on type safety
1c9df87
to
e8335c4
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.
Looks good, thanks @benjeffery. Unfortunately I think we do need to get a bit more test coverage on the argument parsing error and default handling - perhaps we could add a handful of update_row invocations to where we're doing this stuff for add_row? Exhastive testing of all the options would be really tedious and a bit pointless, but we want some coverage on the error cases for the new methods (I see we do have good tests for the row_id case, all right though, which does give a lot of assurance that the error handling code is working properly).
I'm paranoid about this error handling stuff as it has turned into a real time-sink in the past trying to track down segfaults caused by weird behaviour in small mistakes with ArgParseTuple
In that case I'm tempted to update the old |
Changes look good, great to cut down on our technical dept a bit like this. |
1d0eb0c
to
1453fd4
Compare
Ok, I think this is good to go. I didn't add the update tests where we are doing add row tests as they are in the higher-level tests. I also spotted some missing |
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.
Looks great, thanks @benjeffery!
Initial low level work for #1545
WIP - only individuals done