Giter VIP home page Giter VIP logo

Comments (7)

Kircheneer avatar Kircheneer commented on May 29, 2024

This can be done here.

from diffsync.

dakonr avatar dakonr commented on May 29, 2024

This can be done here.

Is that issue a task wich can be handled by a new contributor?

from diffsync.

Kircheneer avatar Kircheneer commented on May 29, 2024

Yes absolutely @dakonr

In fact I had the hacktoberfest label on it until a couple of days ago. Feel free to submit a draft PR if you're unsure about something and you will get some feedback. Thanks!

from diffsync.

dakonr avatar dakonr commented on May 29, 2024

ok @Kircheneer I will try my best, you can assign that issue to me (I can't do that by myself)

First of all I need to understand the requirement and the intended behaviour.

  • The easy way could be to retrun always true at the end of the function. The code looks like, that on some stop points an error will raise.
  • An other solution is to return the diff. That can be used to check the sync and will interpret to true BUT also as false if there is no diff.
  • The third solution can return a tuple with state of the sync as first value and the diff as second value.

I couldn't find any clear design principles about that. Wich one will rise the DX @dgarros ?

from diffsync.

Kircheneer avatar Kircheneer commented on May 29, 2024

I just went through the code and with the way the API is currently structured I am not sure how we can get useful information about a sync status. Like you said, for example here we raise an exception rather then defining some error message to be returned. Since this is a common Python pattern I would prefer that we stick with it rather then returning the result information from the methods. Therefore I vouch for just returning the diff with the successful return of the function signaling execution success. Any differing opinion @glennmatthews?

from diffsync.

glennmatthews avatar glennmatthews commented on May 29, 2024

I think that makes sense, yeah.

from diffsync.

dakonr avatar dakonr commented on May 29, 2024

I agree with you both, the diff will be the best solution and will return more implicit information to the calling procedure.
So, I will start with an implementation of that solution.

from diffsync.

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.