Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'skip' counter to diff.summary() #168

Merged
merged 4 commits into from
Oct 18, 2022

Conversation

ubaumann
Copy link
Contributor

Closes #89

Adding the processed model counter to the Diff object to be able to calculate the number of skipped models.

@ubaumann
Copy link
Contributor Author

This implementation only works on the Diff object and not with the DiffElement. At the moment <Diff>.summary() returns a dict with the "skip" key and <DiffElement>.summer() returns a dict without the "skip" key. So I am not sure if this could let to some confusion.

My first idea was to implement the solution in the DiffElement class, but when a model is skipped, there is no DiffElement returned. Changing this would probably bring more changes, so I decided to first make a simple solution and see what you think about.

I appreciate feedback and can change the code accordingly.

Copy link
Collaborator

@chadell chadell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the approach seems reasonable to me, only 2 questions.

diffsync/diff.py Show resolved Hide resolved
diffsync/diff.py Show resolved Hide resolved
chadell
chadell previously approved these changes Oct 17, 2022
Copy link
Collaborator

@chadell chadell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@Kircheneer Kircheneer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me bar this comment. 🥳

Copy link
Collaborator

@Kircheneer Kircheneer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kircheneer Kircheneer merged commit 538b661 into networktocode:develop Oct 18, 2022
itdependsnetworks pushed a commit to itdependsnetworks/diffsync that referenced this pull request Oct 30, 2022
* Add 'skip' to diff.summary()

* Fix location of variable and comment

* Update summary in example 6

* Add comment to skip callculation in diff.summary()
Kircheneer pushed a commit that referenced this pull request Nov 8, 2022
* Add 'skip' to diff.summary()

* Fix location of variable and comment

* Update summary in example 6

* Add comment to skip callculation in diff.summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new skip counter in diff.summary()
3 participants