Comments (7)
This can be done here.
from diffsync.
This can be done here.
Is that issue a task wich can be handled by a new contributor?
from diffsync.
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.
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.
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.
I think that makes sense, yeah.
from diffsync.
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)
- Automated adapter unit tests HOT 1
- Pydantic 2.0 Migration HOT 4
- Feature request: self-referencing models HOT 2
- Remove need to call `add_child` AND `add`
- How can one reduce duplication of effort between create & update HOT 3
- DiffSync Fails to Identify Discrepancies in Item Sets Between Source and Target HOT 2
- Provide a `filter` method on the `DiffSync` class
- Bug with DiffSyncModelFlags.NATURAL_DELETION_ORDER
- Feature to pass logger into Backend or sync_from/sync_to methods
- Return sync result from create/update/delete methods instead of returning the HOT 4
- Refactor parent/child relationship HOT 2
- Remove `diffsync` field from DiffSyncModel HOT 4
- Add `.load()` class-method to DiffSyncModel
- non id non attribute fields are not available during creation HOT 1
- Upgrade networktocode/gh-action-setup-poetry-environment to v6
- field "model_flags" conflicts with Pydantic 2 protected namespaces
- Add Depends On Attribute
- Add `Adapter.filter` method
- General versus Per-Model flags
- Update Docs for Redis Backend
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 diffsync.