Comments (10)
Reserved then, I will try to post a PR by the end of the weekend (maybe even today) :)
from deepdiff.
Hi @dbrrt @MKaras93
DeepDiff 5 is released. Thanks to @MKaras93 for the PR.
https://zepworks.com/posts/deepdiff-5-released/
from deepdiff.
Hi @dbrrt
Sorry it took me more than a year to see this ticket. It is a cool idea. Not sure when I will have time to implement it though.
Would you be interested in making a PR for it?
Basically this is going to be another "view". We have the "text" view and "tree" view already. This can be the "pretty" view.
If you have time to make a PR for it, that would be great!
Thanks
from deepdiff.
Hi @seperman,
I'm interested in creating a PR if I get the time. I was looking at the code a bit and noticed that TreeResult and TextResult are dictionaries. I think a pretty format should be returned as string. Do you think it would it be better to create method instead, pretty(), which returns a string?
If we create a "pretty view" as you suggested and return it as string i think it would break consistency with current views and confuse users. If we return it as dict I don't think it would be pretty. I would like to hear your thoughts on this.
As for how the text should be printed I was thinking something like this:
Value spec.replicas changed from 1 to 3
Value spec.template.spec.containers[0].image changed from alpine to ubuntu
Type of spec.template.spec.containers[0].tag changed from float to string.
Type of spec.template.spec.containers[1].tag changed from float to string and value changed from 0.1.0 to 0.2.0
I think this format will fit very nicely together with bdd tools such as behave and pytest-bdd.
from deepdiff.
Hi @simonfontana
Great points. You are right. We shouldn't make it as another view then. I like your idea. Maybe we can use the helper.short_repr
function and the verbose
parameter to have different variations of the pretty output. Sometimes what has changed is a big object and the pretty view probably just wants to show partial objects then.
from deepdiff.
@seperman
That's probably better. I'll have a look and try it out. Thanks.
from deepdiff.
👍
from deepdiff.
Hi @seperman is this still open?
from deepdiff.
@MKaras93 seems to be. Still a very desirable feature :)
from deepdiff.
👍
from deepdiff.
Related Issues (20)
- Unsupported Operation: readline + Debug Feature HOT 2
- iterable_compare_func not working properly HOT 4
- 6.4.0 - AttributeError: 'NoneType' object has no attribute '__version__' HOT 1
- 6.4.0 importing deepdiff results in none type error HOT 5
- Simple typo in test paths generation. HOT 1
- Delta.__add__ breaks with esoteric dict keys HOT 1
- Function `parse_path` doesn't exist but is referenced in the docs. HOT 1
- Keys containing "__a__" at the beginning will be ignored. HOT 1
- Diff does not work for attributes of a class that inherits from dict or collections.UserDict HOT 4
- DeepDiff raises decimal exception when using significant digits HOT 3
- Can't compare dicts with both single and double quotes in keys HOT 3
- Inconsistent Behavior with math_epsilon and ignore_order HOT 1
- max_diffs doesn't use ignore_nan_inequality flag
- Wrong diff on list of strings HOT 3
- DeepDiff fails when dictionary keys are unrepresentable and exclude_regex_paths is not None
- Errors with dictionary_item_removed and dictionary_item_added HOT 3
- Error on Delta With None Key and Removed Item from List
- Need to be able to see full path on all outputs HOT 1
- Error when subtracting Delta from a dictionary HOT 4
- Documentation on how to consume keys HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepdiff.