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 tree function to print nested structure list-like objects #56

Merged
merged 65 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
dab5dfb
Add tree function to print nested structure of arbitrary list-like ob…
nstrayer Mar 30, 2021
b80a8df
Removed (out of date) docs from tree_internal function
nstrayer Mar 30, 2021
16f6974
Made ellipsis documentation explicit and checked for arguments that s…
nstrayer Mar 30, 2021
269ed77
Fixed mistake of not updating el -> x in roxygen
nstrayer Mar 30, 2021
45c937d
Made the unknown arguments test a bit more robust and turned it into …
nstrayer Apr 1, 2021
9ea6e7a
Character strings that contain new-lines or are super long are now cl…
nstrayer Apr 2, 2021
dcb5312
Made max length shorter for strings in character vectors
nstrayer Apr 2, 2021
e4b1fea
Put newline at end of cat so there's no space before and the next cal…
nstrayer Apr 2, 2021
a1a2837
Merge remote-tracking branch 'original_repo/master'
nstrayer Apr 6, 2021
40ecd2d
Switched to Recall for recursive calls in case we change name of func…
nstrayer Apr 6, 2021
b4e3d20
Converted most tests to snapshot tests
nstrayer Apr 6, 2021
dfb4550
Fixed indenting to use tidyverse standard
nstrayer Apr 6, 2021
4576280
Renamed index_arraylike to index_unnamed
nstrayer Apr 6, 2021
00847e8
Return object printed so tree can be used in pipes
nstrayer Apr 6, 2021
8e8e9a7
Added option for max-length of printing
nstrayer Apr 6, 2021
0e88d47
Added max_length tests
nstrayer Apr 6, 2021
2b79563
replaced the base is.* functions with rlang's underscored versions
nstrayer Apr 6, 2021
b70accb
Added spaces after every if statement before the parens
nstrayer Apr 6, 2021
e54d098
Swapped out my hacky unnamed argument checking to the ellipsis package
nstrayer Apr 6, 2021
9e6ac57
Substantially less hacky way of enforcing max_length
nstrayer Apr 6, 2021
6279aaf
index_unamed now does what it's name implies and indexes any unnamed …
nstrayer Apr 6, 2021
63bc4e1
Updated default value of index_unnamed to be FALSE
nstrayer Apr 6, 2021
45290b3
Instead of simply erasing newlines they are replaced with a down-left…
nstrayer Apr 6, 2021
49e2fcc
Atomic vectors get wrapped in square brackets with an optional n:<num…
nstrayer Apr 6, 2021
791acef
Updated tests with new spacing rules and converted missing values tes…
nstrayer Apr 6, 2021
cd4c863
Early termination due to max-length being reached is now marked with …
nstrayer Apr 6, 2021
3da09aa
ellipses now indicate when we've reached the max depth
nstrayer Apr 6, 2021
67798db
Switched to using lobstr::box_chars() instead of hand specifying all …
nstrayer Apr 7, 2021
37a3152
Switched to snapshot test for non-named elements test
nstrayer Apr 7, 2021
a697b73
Removed old bug-catch test that is no longer needed due to refactoring
nstrayer Apr 7, 2021
b2849f5
Environments are now recursed into (can be disabled)
nstrayer Apr 7, 2021
5635514
Reverted back to using dotted characters for attribute chains so ther…
nstrayer Apr 7, 2021
def0b5b
All list-like objects now get their class name wrapped in angle brackets
nstrayer Apr 7, 2021
61dc0eb
Class printing is now a lot more informative with the oo-type and inh…
nstrayer Apr 7, 2021
6940485
Removed unnecessary comments
nstrayer Apr 7, 2021
fff8fe6
Used more resilient logical operators
nstrayer Apr 7, 2021
cb07a1c
Added environment print filtering before the child-phase for less ver…
nstrayer Apr 7, 2021
1c204c1
tree_label now just gets the whole opts object to avoid confusing pas…
nstrayer Apr 8, 2021
bcc0cd2
Shortened to n_printed instead of n_elements_printed
nstrayer Apr 8, 2021
ce4128a
Environments no longer have parents shown and also let the user know …
nstrayer Apr 8, 2021
3193e39
Extracted the truncation logic to separate functions
nstrayer Apr 8, 2021
4ccdf83
Functions now print their arguments (up to 5)
nstrayer Apr 8, 2021
77bb48d
New atomic vector printing
nstrayer Apr 8, 2021
5913e27
More optimized array append
nstrayer Apr 8, 2021
02772da
attributes now print as attr(,"id") to avoid conflict with <> used fo…
nstrayer Apr 8, 2021
32c687a
Simplified function argument snapshot test
nstrayer Apr 8, 2021
afaa4f7
Accidentally was adding every object seen to seen_envs list
nstrayer Apr 8, 2021
2469f17
Fixes but where single-length non-atomics will cause infinite recursi…
nstrayer Apr 8, 2021
926e6f9
Fixed up recursion logic to say what should go through rather than wh…
nstrayer Apr 8, 2021
7c5d46e
Clarified logic around if an environment has already been seen
nstrayer Apr 8, 2021
d034040
Added support for printing of expressions
nstrayer Apr 8, 2021
e212545
Added formula printing as well
nstrayer Apr 8, 2021
05fdae2
Moved the separated tree_label methods next to each-other in file
nstrayer Apr 8, 2021
e2a0dbf
Reformmated using styler to make sure I match tidyverse styleguide
nstrayer Apr 12, 2021
5ebab19
Rebuilt docs
nstrayer Apr 12, 2021
5d7bcb1
Switched to more robust list conversion function due to some tricky l…
nstrayer May 12, 2021
ac2f5d2
Set all.names = TRUE in as.list.environment() so we don't omit "hidde…
nstrayer May 13, 2021
5586cef
Moved tree_as_list() inline, simplified its implementation, and added…
nstrayer May 13, 2021
e9a921d
Fixed bug where attributes with children followed by other attributes…
nstrayer May 13, 2021
4342a1b
Ran styleR
nstrayer May 13, 2021
40deb1a
Remove test that used shiny::input_slider
nstrayer May 13, 2021
7d791bf
Namespaced some env calls in tests
nstrayer May 13, 2021
ab3652b
Fixed all issues from running R CMD Check locally
nstrayer May 13, 2021
971b44b
Switch to explicit function definition for argument printing test
nstrayer May 13, 2021
df3b36e
Skip all but one tree test on windows due to lack of "fancy" box char…
nstrayer May 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Depends:
R (>= 3.2)
Imports:
crayon,
rlang (>= 0.3.0)
rlang (>= 0.3.0),
ellipsis,
methods
Suggests:
covr,
pillar,
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ S3method(format,lobstr_inspector)
S3method(print,lobstr_bytes)
S3method(print,lobstr_inspector)
S3method(print,lobstr_raw)
S3method(tree_label,"NULL")
S3method(tree_label,"function")
S3method(tree_label,character)
S3method(tree_label,default)
S3method(tree_label,environment)
export(ast)
export(cst)
export(mem_used)
Expand All @@ -15,5 +20,7 @@ export(obj_size)
export(obj_sizes)
export(ref)
export(sxp)
export(tree)
export(tree_label)
import(rlang)
useDynLib(lobstr, .registration = TRUE)
Loading