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

Major refactor to print_tree() #84

Merged
merged 14 commits into from
Sep 2, 2021

Conversation

jlumpe
Copy link
Collaborator

@jlumpe jlumpe commented Sep 1, 2021

  • Made formatting and structural changes to _print_tree() to simplify code and improve readability
  • Added types to most arguments, explicit keyword arguments in public print_tree() function
  • Removed unused to and from arguments to _print_tree()
  • Typed TreeCharSet attributes as strings, constructor still accepts Chars. Added constructor which modifies select fields of an existing instance.
  • Fix/implement index/key printing, rename withinds keyword argument to printkeys. Keys printed by default for return types of children() other than AbstractVector and Tuple.
  • Fix bug where truncation character was printed under leaf nodes at max depth
  • Test for multi-line node representations

@jlumpe jlumpe requested a review from Keno September 1, 2021 01:35
@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2021

Codecov Report

Merging #84 (fd91ba5) into master (e3afae7) will increase coverage by 3.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   64.55%   67.58%   +3.03%     
==========================================
  Files           7        7              
  Lines         378      401      +23     
==========================================
+ Hits          244      271      +27     
+ Misses        134      130       -4     
Impacted Files Coverage Δ
src/printing.jl 95.38% <100.00%> (+15.05%) ⬆️
src/iteration.jl 62.87% <0.00%> (-0.82%) ⬇️
src/AbstractTrees.jl
src/base.jl 100.00% <0.00%> (ø)
src/indexing.jl 19.60% <0.00%> (+1.24%) ⬆️
src/builtins.jl 66.66% <0.00%> (+6.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3afae7...fd91ba5. Read the comment docs.

@jlumpe jlumpe force-pushed the refactor-print_tree-3 branch 4 times, most recently from f3acae2 to af06928 Compare September 2, 2021 04:26
@jlumpe jlumpe force-pushed the refactor-print_tree-3 branch from fd91ba5 to df8a2eb Compare September 2, 2021 05:56
@jlumpe jlumpe merged commit 5c01ee5 into JuliaCollections:master Sep 2, 2021
@jlumpe jlumpe deleted the refactor-print_tree-3 branch May 4, 2022 06:51
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.

2 participants