-
Notifications
You must be signed in to change notification settings - Fork 2
Custom profile print #72
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
base: main
Are you sure you want to change the base?
Conversation
JulStraus
left a comment
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.
I generally like the idea and it seems to work out well. While we miss a bit of information in the show statement compared to the current design (the specific type), I think it is still beneficial to operate it this way.
Your rough solution works out rather well in my opinion :)
src/profiles.jl
Outdated
| nshow = round(Int, max_elems / 2) | ||
| seq1 = vals[1:nshow] | ||
| seq2 = vals[(end-nshow+1):end] | ||
| return join(seq1, sep) * sep * "... " * sep * join(seq2, sep) |
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.
| return join(seq1, sep) * sep * "... " * sep * join(seq2, sep) | |
| return join(seq1, sep) * sep * "..." * sep * join(seq2, sep) |
I think it looks better without spaces before ....
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.
You removed the comma in general? It is more in line with how Julia represents the values, so I think it is ok.
|
I have updated and tweaked the printing a bit based on ideas from Julian (indenting) and tried to align with what looks to be Julia standard (vector, matrices). |
|
I like the new changes. We can however consider to have in the Note that |
Codecov Report❌ Patch coverage is
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Working with some large models, I get overwhelmed by the printing of large profiles. My suggestion is to have some customized printing that just prints the first and last values in line with other Julia printing. This is a rough first version and just shows what I was thinking as a possible solution.