-
Notifications
You must be signed in to change notification settings - Fork 87
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
add rightonly jsondiff syntax #60
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.
didn't know you have to submit review for comments to become visible. anyhow, the hash issue has now been fixed.
jsondiff/symbols.py
Outdated
@@ -12,6 +12,10 @@ def __str__(self): | |||
def __eq__(self, other): | |||
return self.label == other.label | |||
|
|||
def __hash__(self): |
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.
Given how eq works, I think this should be
def __hash__(self):
return hash(self.label)
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 was fixed in #61
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.
ok
@@ -8,6 +9,15 @@ | |||
from hypothesis import given, settings, strategies | |||
|
|||
|
|||
logging.basicConfig( |
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 seems like debugging code. Did you intend to leave this in here?
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.
It's convenient to add some log during test.
IntuitiveSyntax is interesting! If you're still working on this it would be really cool to have as an option. Maybe a followup commit to strip this PR down to just that feature? |
After testing this some more I'm questioning the name Some ideas:
|
In my senario, I only what to know what field has changed. And check if the newest value is reasonable. |
Those sound reasonable to me! +1 for |
Can you edit the title to reflect the latest changes and add a PR description explaining your changes? That will make it easier to understand months from now. |
@corytodd I have updated the pull request title and added a PR description. Thank you for your advice. |
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
Hello, do you intend to make a release soon with this PR? |
I some senario, we often compare old value and new value and check if the newer value is reasonabel. So the rightonly syntax will compute the dicfference and keep the later one compared to CompactJsonDiffSyntax