Closed holyjak closed 1 year ago
This is not currently supported.
On Tue, Aug 20, 2019, 18:03 Jakub Holy notifications@github.com wrote:
How to skip printing values same in both structures? I am sorry, I am overwhelmed by fipp and puget and haven't managed to understand how to only print +/-/mismatches. Is there a way to override print-other to be a noop or something? Sorry and thank you!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lambdaisland/deep-diff/issues/13?email_source=notifications&email_token=AAAH3VDFXEGTPIKMOWFJNLLQFQIUTA5CNFSM4INZJAGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGJHVBQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH3VEKGNLBJCF4S5AGVNLQFQIUTANCNFSM4INZJAGA .
Ah, ok. Thank you.
On Tue, Aug 20, 2019, 6:56 PM Arne Brasseur notifications@github.com wrote:
This is not currently supported.
On Tue, Aug 20, 2019, 18:03 Jakub Holy notifications@github.com wrote:
How to skip printing values same in both structures? I am sorry, I am overwhelmed by fipp and puget and haven't managed to understand how to only print +/-/mismatches. Is there a way to override print-other to be a noop or something? Sorry and thank you!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/lambdaisland/deep-diff/issues/13?email_source=notifications&email_token=AAAH3VDFXEGTPIKMOWFJNLLQFQIUTA5CNFSM4INZJAGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGJHVBQ , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAAH3VEKGNLBJCF4S5AGVNLQFQIUTANCNFSM4INZJAGA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lambdaisland/deep-diff/issues/13?email_source=notifications&email_token=AAEYSPQ4ONPRXL6QUVQCZSTQFQO2VA5CNFSM4INZJAGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4W6UTI#issuecomment-523102797, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEYSPV6OXMRGQ5T7CPREPLQFQO2VANCNFSM4INZJAGA .
is this still not supported? I had a look at the diff datastructure. seems changes are of a special type, so one could filter the keys that way.
If it had been you would probably see it mentioned here. I don't think anyone has stepped up yet to implement this.
This isn't a solution in terms of dropping things while diffing or while printing, but it's functional as an intermediate step:
https://gist.github.com/hsartoris-bard/856d79d3a13f6cafaaa6e5079c76cd97
Even for relatively small data, the time cost incurred postwalking the diff is often negligible compared to how much faster rendering the diff is without the unchanged values.
This isn't a solution in terms of dropping things while diffing or while printing, but it's functional as an intermediate step:
https://gist.github.com/hsartoris-bard/856d79d3a13f6cafaaa6e5079c76cd97
Even for relatively small data, the time cost incurred postwalking the diff is often negligible compared to how much faster rendering the diff is without the unchanged values.
Run the gist with the newest main commit, it does not work.
hsartoris-bard
My friend kindly pointed out my English expression can probably make people misinterpret my intention. What I want to express is: "hi, I've tried running this code on the latest main branch, but it doesn't seem to be working anymore."
The code base sometimes changes quickly (so the gist does not work now), but the gist actually provided a good way to help me understand the issue.
An modified version of the solution provided by @hsartoris-bard https://gist.github.com/humorless/166ead294433179abb0b840305950914
This is great @humorless , let's add that remove-unchanged function in so at least we have API for this, we can consider separately how to expose this in kaocha.
In the newest release, there is a new function minimize
, which can solve this issue. https://github.com/lambdaisland/deep-diff2#minimizing
How to skip printing values same in both structures? I am sorry, I am overwhelmed by fipp and puget and haven't managed to understand how to only print +/-/mismatches. Is there a way to override
print-other
to be a noop or something? Sorry and thank you!