Adds print elision logic for similar consecutive nodes.#163
Open
ghyatzo wants to merge 3 commits intoJuliaCollections:masterfrom
Open
Adds print elision logic for similar consecutive nodes.#163ghyatzo wants to merge 3 commits intoJuliaCollections:masterfrom
ghyatzo wants to merge 3 commits intoJuliaCollections:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #163 +/- ##
==========================================
+ Coverage 70.69% 72.30% +1.61%
==========================================
Files 8 8
Lines 430 455 +25
==========================================
+ Hits 304 329 +25
Misses 126 126 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b7c76c8 to
69f3a68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, this PR aims at adding the ability to elide printing siblings that are similar.
at the moment it introduces the following behaviour:
after
maxsiblingsoccurrences of similar node values start elidingif a different enough node value appears reset the counter and start printing again
elided siblings are not recursed into.
users can define a
nodevalue_distancefunction similar to how they can overrideprintnodeto define what "similar" means. it defaults to equality. Users can also pass in a threshold to finetune when things are going to be elided.fixes: #144
initial prototype built with a robot friend, finetuned by hand.