-
Notifications
You must be signed in to change notification settings - Fork 193
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
Make CoefTable width adjustable #794
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Would it be possible to print fewer hdots? Matrices and data frames print only one every 5-6 rows. |
tighter test bounds
@nalimilan ready for another review round. |
ct = CoefTable(rand(15,100), ["c$i" for i in 1:100], [], 4) | ||
sct = sprint(show, ct, context=:limit=>false) | ||
@test textwidth(first(split(sct, '\n'))) > 900 | ||
sct = sprint(show, ct, context=:limit=>true) | ||
@test textwidth(first(split(sct, '\n'))) <= displaysize()[2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't you found a way to test the exact output as discussed above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The displaysize()
returns current terminal dimensions, what ever they may be in the CI environment. I would assume standard 80x25.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think it's same to assume that, and check the string output for these dimensions.
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Large tables tend to mess output by wrapping lines. See JuliaStats/MultivariateStats.jl#186.
This PR make
CoefTable
width adjustable by omitting columns that are not fit into the screen.