insightsengineering / formatters

A framework for creating listings of raw data that include specialized formatting, headers, footers, referential footnotes, and pagination.
https://insightsengineering.github.io/formatters/
Other
15 stars 6 forks source link

Add Truetype support and fix col_gap bug #296

Closed gmbecker closed 2 months ago

gmbecker commented 2 months ago

Move fork changes to internal branch for truetype PR. closes #261 #249

github-actions[bot] commented 2 months ago

Unit Tests Summary

  1 files    8 suites   15s :stopwatch:  51 tests  51 :white_check_mark: 0 :zzz: 0 :x: 361 runs  361 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 5069bac3.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

badge

Code Coverage Summary

Filename             Stmts    Miss  Cover    Missing
-----------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/format_value.R       195      12  93.85%   88, 105-112, 187, 296, 396, 407, 415
R/generics.R           125      12  90.40%   142, 280-284, 486, 498, 529, 559, 667, 680, 701-708
R/labels.R              55       7  87.27%   51, 57, 66, 107, 133, 142, 146
R/matrix_form.R        683      40  94.14%   121, 492-493, 585, 595-598, 616, 647, 737-738, 752-757, 787-790, 850-851, 939-940, 967, 995, 1047, 1209, 1245, 1248-1252, 1302, 1350, 1353, 1357
R/mpf_exporters.R      277      20  92.78%   2, 100-102, 147, 183, 227, 230, 235, 414-420, 424, 427, 431, 479, 557
R/page_size.R           45       2  95.56%   10, 221
R/pagination.R         759      52  93.15%   327-330, 435-450, 540, 593, 598, 639, 677-688, 764, 876-877, 899-908, 1046, 1097-1098, 1249, 1286-1290, 1306, 1313, 1395, 1530-1531, 1547-1548, 1562-1563
R/tostring.R           783      66  91.57%   88, 296, 351, 421, 454, 462, 498, 555-558, 594, 658-661, 667-671, 674-677, 684-689, 772-773, 913-914, 979-986, 1036-1040, 1109, 1162, 1181-1185, 1196, 1214, 1231, 1246, 1344, 1385, 1430, 1516, 1555, 1609, 1616
R/utils.R                3       0  100.00%
R/zzz.R                 17       6  64.71%   28-33
TOTAL                 2942     217  92.62%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  -------
R/generics.R            +7      +2  -1.13%
R/matrix_form.R        +48      -2  +0.76%
R/mpf_exporters.R      +14      +1  +0.00%
R/page_size.R            0      +1  -2.22%
R/pagination.R         +79     +12  -0.97%
R/tostring.R          +197     +17  -0.07%
TOTAL                 +345     +31  -0.21%

Results for commit: 5069bac3a31b4f4db0cac8862f1de09fcc01586f

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 2 months ago

Unit Test Performance Difference

Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | table_inset and titles and footers word wrapping | 👶 | | $+0.06$ | misc_font_device_related_test_coverage | | table_inset and titles and footers word wrapping | 👶 | | $+0.02$ | wrapping_works_with_truetype_font |

Results for commit 2c9996c3afbe66d750425eaa5d43dab2d0d7c8af

♻️ This comment has been updated with latest results.

Melkiades commented 2 months ago

last commit fixes https://github.com/insightsengineering/formatters/issues/278

Melkiades commented 2 months ago

@gmbecker could we add more tests? I think toString is principally affected (Total +359 +82 -1.90%)

gmbecker commented 2 months ago

@gmbecker could we add more tests? I think toString is principally affected (Total +359 +82 -1.90%)

I've added tests for the stuff that was my fault, though it looks like the styler is messing stuff up by moving around nocov comments @cicdguy, see e.g.,

https://github.com/insightsengineering/formatters/blob/ed23f8176b82fe4b351965faa7c734332778047d/R/tostring.R#L145-L149

from coverage report: Screenshot 2024-06-03 at 1 24 49 PM

(obviously its nice that there is coverage there, but it was supposed to be nocov...)

gmbecker commented 2 months ago

@cicdguy is the restyler running unconditionally (my code passed the linter), and what is with the above styler error?

shajoezhu commented 2 months ago

let's fix the styling issue. but i think everything else I think is good to go @Melkiades fyi

cicdguy commented 2 months ago

@gmbecker - for problematic styler fixes, similar to # nocov or # nocov start + # nocov end, you can do # stylerignore start + # stylerignore end in your code blocks. {styler} will then ignore those sections completely.

Ref: Someone had a similar issue a while back: https://github.com/r-lib/styler/issues/365