-
Notifications
You must be signed in to change notification settings - Fork 76
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 parse to properly support multipleOf (to avoid validation error) #179
Fix parse to properly support multipleOf (to avoid validation error) #179
Conversation
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.
Very minor nits, otherwise this looks great!
|
||
assert singer_stream.peek_invalid_records() | ||
assert singer_stream.count == 0 | ||
assert [] == missing_sdc_properties(singer_stream) |
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 we can drop this. It's not really adding value to the test overall.
@@ -31,6 +32,8 @@ def test_python_type(): | |||
== json_schema.STRING | |||
assert json_schema.python_type('world') \ | |||
== json_schema.STRING | |||
assert json_schema.python_type(decimal.Decimal(1)) \ | |||
== json_schema.NUMBER |
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.
Excellent
target_postgres/json_schema.py
Outdated
@@ -1,6 +1,7 @@ | |||
from copy import deepcopy | |||
import json | |||
import re | |||
import decimal |
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 isn't documented anywhere, so I wouldn't expect you to know this one, but we try to alphabetize our import
s. The breakdown is:
- Python
- 3rd Party
- Our code
…ert from test_BufferedSingerStream)
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.
Nit which is the result of my commenting on the wrong line originally 😿
|
||
assert not singer_stream.peek_invalid_records() | ||
assert singer_stream.count == len(multiple_of_values) | ||
assert [] == missing_sdc_properties(singer_stream) |
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.
@davicorreiajr it's this line, we can remove it same as the other, sorry for the confusion and appreciate your patience!
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.
no worries, fixing now
Will merge and hopefully deploy later this week! |
Motivation
#178