- Notifications
You must be signed in to change notification settings - Fork 295
New API draft #42
Conversation
| Common usage will look like this: from data_diff import diff_tables, TableRef # will change to datadiff in another PR table1 = TableRef('postgres:///', 'Rating') table2 = TableRef('postgres:///', 'Rating_del1') diff_tables(table1, table2, update_column="timestamp", bisection_factor=64) |
data_diff/__init__.py Outdated
| @@ -1,9 +1,86 @@ | |||
| from typing import Tuple | |||
| from typing import Tuple, Iterator | |||
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 know you're not doing this yet because you want it to be finalized, and not conflict with the other README PR, but I think we need to add some examples to the README, as well as a link to the Pydocs 👍🏻
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 other thing is tests (which I know you didn't add for the same reason; want to finalize it first)
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.
Yep
| It's looking pretty good, let me try to play a bit around with the API in an almost-empty file and I'll see if any other feedback comes out of that! |
| Looking really good! 🚀 Some thoughts from playing around with a script locally (thanks for the sample!):
|
| @sirupsen Addressing your points:
|
Yeah, we can probably get away with just # of rows, and # of different rows. I guess the latter could even just be from
I think a function that returns a properly crated
I meant that I expected it to be
Works great now! For my own reference, this is the code, but works just fine now! from data_diff import diff_tables, TableRef # will change to datadiff in another PR import logging logging.basicConfig(level=logging.INFO) table1 = TableRef('postgres://postgres:Password1@localhost/postgres', 'rating') table2 = TableRef('postgres://postgres:Password1@localhost/postgres', 'rating_update001p') for diff in diff_tables(table1, table2, update_column="timestamp", debug=True, bisection_factor=64): print(diff) |
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.
Code looks good to me! Only smaller suggestions at your discretion.
README update with an example, a link to Pydocs, and then I think this is good to go!
| I believe I addressed all of the concerns, except for the docs which I will add later. This PR is already too big. |
| @sirupsen Ok I am blocked from merging because there is an unresolved conversation and github is glitching. I don't understand why I have to deal with these issues when I'm the one writing 95% of the commits. Whoever is playing with the settings isn't helping. |
No description provided.