Giter Site home page Giter Site logo

Comments (10)

MKaras93 avatar MKaras93 commented on July 16, 2024 2

Reserved then, I will try to post a PR by the end of the weekend (maybe even today) :)

from deepdiff.

seperman avatar seperman commented on July 16, 2024 1

Hi @dbrrt @MKaras93
DeepDiff 5 is released. Thanks to @MKaras93 for the PR.
https://zepworks.com/posts/deepdiff-5-released/

from deepdiff.

seperman avatar seperman commented on July 16, 2024

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.

simonfontana avatar simonfontana commented on July 16, 2024

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.

seperman avatar seperman commented on July 16, 2024

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.

simonfontana avatar simonfontana commented on July 16, 2024

@seperman
That's probably better. I'll have a look and try it out. Thanks.

from deepdiff.

seperman avatar seperman commented on July 16, 2024

👍

from deepdiff.

MKaras93 avatar MKaras93 commented on July 16, 2024

Hi @seperman is this still open?

from deepdiff.

dbrrt avatar dbrrt commented on July 16, 2024

@MKaras93 seems to be. Still a very desirable feature :)

from deepdiff.

seperman avatar seperman commented on July 16, 2024

👍

from deepdiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.