Open torfjelde opened 3 years ago
Merging #433 (919fa4b) into master (381de22) will decrease coverage by
1.14%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #433 +/- ##
==========================================
- Coverage 74.05% 72.91% -1.15%
==========================================
Files 26 26
Lines 1353 1355 +2
==========================================
- Hits 1002 988 -14
- Misses 351 367 +16
Flag | Coverage Δ | |
---|---|---|
unittests | 72.91% <100.00%> (-1.15%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/config.jl | 20.00% <ø> (ø) |
|
src/run.jl | 84.42% <100.00%> (+0.12%) |
:arrow_up: |
src/rendering/common.jl | 69.87% <0.00%> (-19.28%) |
:arrow_down: |
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 381de22...919fa4b. Read the comment docs.
@sebastianpech would you be willing to accept this?
I assume that you meant to tag @pfitzseb
Haha, yes; sorry!
AFAIK there's not a good way of setting the
displaysize
forIO
instances in Weave.jl. In particular this leads to issues when outputting tables, e.g. https://github.com/JunoLab/Weave.jl/issues/200. The issue is made more confusing by the fact that we have a:line_width
chunk option which specifies the number of columns before we wrap the lines, not truncate, and so even if you try to dowithin a notebook, you still end up with wrapped output even though now the truncation is okay.
So, this PR makes the following changes:
displaysize
. This is equivalent to the current behavior since as of right now we simply set:limit => true
and thus implicitly:displaysize => displaysize()
introduced in #311.displaysize
as a chunk option. This addresses all the annoyances with truncated tables, etc. + naturally follows the same behavior as you'd expect fromIO
.wrap
by default since it's utility is somewhat limited due to the #311 + the default value of:line_width
is actually lower than the defaultdisplaysize()[2]
(which is80
), hence we end up wrapping lines that "shouldn't" be wrapped according to default settings in Julia (most other packages will display according todisplaysize
so most outputs will take advantage of 80 cols if need be).~I'll add docs too once I get the thumbs up that this is a good idea from ya'll :)~
EDIT: Added tests.