insightsengineering / rtables

Reporting tables with R
https://insightsengineering.github.io/rtables/
Other
224 stars 48 forks source link

Fix `as_html` newlines and add parameters to `export_as_tsv` #899

Closed Melkiades closed 2 months ago

Melkiades commented 2 months ago

Fixes #898 #289

github-actions[bot] commented 2 months ago

Unit Tests Summary

    1 files     26 suites   1m 42s :stopwatch:   210 tests   210 :white_check_mark: 0 :zzz: 0 :x: 1 562 runs  1 562 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 1dbcfbf7.

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

github-actions[bot] commented 2 months ago

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
Exporters 💀 $21.10$ $-21.10$ $-45$ $0$ $0$ $0$
Exporting to HTML 👶 $+1.88$ $+13$ $0$ $0$ $0$
Exporting to txt, pdf, rtf, and docx 👶 $+20.31$ $+34$ $0$ $0$ $0$
Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | Exporters | 💀 | $5.28$ | $-5.28$ | Can_create_flextable_object_that_works_with_different_styles | | Exporters | 💀 | $0.23$ | $-0.23$ | as_html_Viewer_with_newline_test | | Exporters | 💀 | $0.05$ | $-0.05$ | as_html_bolding_works | | Exporters | 💀 | $0.04$ | $-0.04$ | as_html_does_not_trim_whitespace | | Exporters | 💀 | $0.05$ | $-0.05$ | as_html_header_line_works | | Exporters | 💀 | $0.13$ | $-0.13$ | as_html_indentation_is_translated_to_rows_with_linebreaks | | Exporters | 💀 | $0.52$ | $-0.52$ | as_html_smoke_test | | Exporters | 💀 | $3.10$ | $-3.10$ | export_as_doc_works_thanks_to_tt_to_flextable | | Exporters | 💀 | $3.84$ | $-3.84$ | export_as_pdf_works | | Exporters | 💀 | $1.69$ | $-1.69$ | export_as_rtf_works | | Exporters | 💀 | $0.48$ | $-0.48$ | export_as_txt_works_with_and_without_pagination | | Exporters | 💀 | $1.70$ | $-1.70$ | export_as_txt_works_with_wrapping | | Exporters | 💀 | $2.87$ | $-2.87$ | exporting_pdf_does_the_inset | | Exporters | 💀 | $0.06$ | $-0.06$ | path_enriched_df_works_for_tables_with_a_column_that_has_all_length_1_elements | | Exporters | 💀 | $1.06$ | $-1.06$ | tsv_roundtripping_for_path_enriched_df | | Exporting to HTML | 👶 | | $+0.13$ | as_html_Viewer_with_newline_test | | Exporting to HTML | 👶 | | $+0.05$ | as_html_bolding_works | | Exporting to HTML | 👶 | | $+0.05$ | as_html_does_not_trim_whitespace | | Exporting to HTML | 👶 | | $+0.22$ | as_html_expands_or_not_newlines_depending_on_expand_newlines | | Exporting to HTML | 👶 | | $+0.05$ | as_html_header_line_works | | Exporting to HTML | 👶 | | $+0.14$ | as_html_indentation_is_translated_to_rows_with_linebreaks | | Exporting to HTML | 👶 | | $+1.24$ | as_html_smoke_test | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+5.58$ | Can_create_flextable_object_that_works_with_different_styles | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+3.09$ | export_as_doc_works_thanks_to_tt_to_flextable | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+4.05$ | export_as_pdf_works | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+1.74$ | export_as_rtf_works | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+0.51$ | export_as_txt_works_with_and_without_pagination | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+1.83$ | export_as_txt_works_with_wrapping | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+3.06$ | exporting_pdf_does_the_inset | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+0.06$ | path_enriched_df_works_for_tables_with_a_column_that_has_all_length_1_elements | | Exporting to txt, pdf, rtf, and docx | 👶 | | $+0.39$ | tsv_roundtripping_for_path_enriched_df |

Results for commit affa591a2773f8925129d032d7c6fcad855707de

♻️ 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/00tabletrees.R               780      63  91.92%   20, 94, 97, 428, 519-520, 523, 681, 785, 877-878, 980, 983, 985-986, 1004-1007, 1027, 1142-1145, 1243-1248, 1404, 1504-1507, 1573-1576, 1612-1615, 1621-1626, 1677, 1684, 1778, 1886, 1899, 1902-1905, 1908-1911, 1938, 1969-1970
R/as_html.R                    167      25  85.03%   5-10, 77, 149-154, 159-164, 179-183, 270
R/colby_constructors.R         594      24  95.96%   81, 134, 197-200, 267-270, 410, 426, 1175, 1263, 1424, 1463, 1485, 1509, 1530, 1676, 1899-1902
R/compare_rtables.R             83      17  79.52%   93-96, 99-102, 115-118, 137, 156-157, 188, 193
R/format_rcell.R                12       0  100.00%
R/indent.R                      13       2  84.62%   40-41
R/index_footnotes.R             66       0  100.00%
R/make_split_fun.R             138      31  77.54%   22-26, 36-39, 52-55, 58-61, 115, 119, 267, 270-273, 278-281, 295, 366, 375, 377, 379, 430
R/make_subset_expr.R           137      15  89.05%   35, 47-61, 135-142, 178, 267, 271, 280
R/simple_analysis.R              5       1  80.00%   56
R/split_funs.R                 510      66  87.06%   127, 132, 138-143, 156, 173-177, 353-358, 375-380, 456, 502, 518-521, 537, 599, 609-610, 612, 624, 668, 693, 868, 875, 899-902, 913-914, 916, 918, 1090-1092, 1106-1110, 1174-1177, 1240-1243
R/summary.R                    144      38  73.61%   35, 80, 178-220, 269, 315-331, 366, 397
R/tree_accessors.R            1120     140  87.50%   110, 139-140, 264, 284, 310, 333, 363, 381, 400-404, 426, 448-451, 566, 593-594, 880-886, 1030, 1049, 1075, 1127, 1184-1185, 1222, 1257, 1295-1300, 1359, 1433-1437, 1455-1464, 1542, 1657-1660, 1685, 1707-1708, 1718, 1769, 1790-1795, 1816-1821, 1832, 1906, 1947, 2046, 2153, 2166, 2180, 2196, 2205, 2215-2219, 2269-2274, 2477, 2487-2490, 2500, 2525-2528, 2535, 2537-2540, 2662, 2696-2697, 2754, 3059, 3420, 3536, 3570-3595, 3686-3694, 3847, 3921-3927, 4139-4140, 4147, 4150-4153, 4157, 4207, 4268, 4293-4317
R/tt_afun_utils.R              411      32  92.21%   48, 155, 162, 171-184, 250, 258-259, 477, 485-488, 570-574, 594, 608-610
R/tt_compare_tables.R           70       4  94.29%   51, 174, 246, 250
R/tt_compatibility.R           570      62  89.12%   19, 142-143, 186, 191, 319-320, 324-327, 333, 337, 521, 575-578, 615-617, 655, 688, 708, 741-744, 789, 806-810, 893, 920-923, 932, 994, 1002, 1013-1016, 1127, 1134, 1162-1176, 1207-1208
R/tt_dotabulation.R           1161      95  91.82%   54, 246, 251, 253, 301, 325, 329-332, 364-367, 390, 423-426, 454-457, 552, 690-694, 743, 747, 775-778, 788, 808-812, 819-822, 1082, 1086, 1117, 1220-1223, 1433-1441, 1705-1714, 1796-1799, 1810, 1815, 1820-1821, 1823, 1834, 1839, 1862, 1948-1967
R/tt_export.R                  513      31  93.96%   45, 183-187, 235-238, 290-293, 438, 444, 476, 528, 808, 817, 842-846, 1013-1016, 1019, 1050, 1056
R/tt_from_df.R                  15       0  100.00%
R/tt_paginate.R                513      37  92.79%   74, 122-131, 441, 576-579, 600-604, 749-752, 803-810, 887, 890, 908, 915, 918
R/tt_pos_and_access.R          571      42  92.64%   76, 78-80, 105, 166, 212-216, 258, 507, 509, 517, 523, 537, 547-550, 730, 733, 741-745, 750-753, 780, 833-834, 845, 1007-1008, 1076-1092, 1361, 1436
R/tt_showmethods.R             162      21  87.04%   56, 91-113, 223, 249, 258, 263, 266-270, 359-360
R/tt_sort.R                    101       5  95.05%   245-248, 256
R/tt_toString.R                436      27  93.81%   123, 345, 365-368, 374, 387, 397, 403, 406, 412-422, 515, 616, 818-843
R/utils.R                       29       0  100.00%
R/validate_table_struct.R       84      10  88.10%   80-84, 93-94, 140, 149-150
R/Viewer.R                      61       9  85.25%   46, 50, 60-64, 84, 118
TOTAL                         8466     797  90.59%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 1dbcfbf723e9cf49622e9b90f32d315b9501c106

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results