You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update sync_from and sync_to to return the diff and the status of the sync #77
Currently the functions sync_to/from are not returning anything, whether the sync was completed or not.
It would be useful to return at least the status of the sync and eventually the diff that was generated by the function.
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!
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?
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.
Activity
Kircheneer commentedon Sep 29, 2022
This can be done here.
dakonr commentedon Nov 15, 2022
Is that issue a task wich can be handled by a new contributor?
Kircheneer commentedon Nov 15, 2022
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!
dakonr commentedon Nov 16, 2022
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.
I couldn't find any clear design principles about that. Wich one will rise the DX @dgarros ?
Kircheneer commentedon Nov 18, 2022
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?
glennmatthews commentedon Nov 18, 2022
I think that makes sense, yeah.
dakonr commentedon Nov 18, 2022
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.