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

Support pagination of lists of rtables/rlistings objects #213

Closed edelarua closed 6 months ago

edelarua commented 1 year ago

Closes #212

github-actions[bot] commented 1 year ago

badge

Code Coverage Summary

Filename             Stmts    Miss  Cover    Missing
-----------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------------------
R/format_value.R       194      12  93.81%   88, 104-111, 189, 301, 401, 412, 420
R/generics.R           108       8  92.59%   454, 466, 499, 528, 643, 663-669
R/labels.R              55       7  87.27%   49, 55, 64, 105, 133, 142, 146
R/matrix_form.R        560      38  93.21%   103, 459-460, 548, 561-564, 583, 615, 709-710, 725-730, 760-763, 796-797, 829-830, 874, 1050, 1086, 1089-1093, 1140, 1191, 1194, 1198
R/mpf_exporters.R      257      17  93.39%   2, 100-102, 180, 220, 225, 409-415, 419, 422, 460, 556
R/page_size.R           45       1  97.78%   172
R/pagination.R         670      38  94.33%   302-305, 407-420, 506, 582, 765-766, 787-797, 1011-1012, 1195, 1202, 1281, 1416-1417, 1429-1430, 1444-1445
R/tostring.R           586      49  91.64%   41, 93, 162, 196, 204, 240, 297-300, 393-397, 400-403, 410-415, 492, 631-632, 697-704, 761-765, 849, 864, 958, 1010, 1051, 1096, 1151, 1158
R/utils.R                3       0  100.00%
R/zzz.R                 17       6  64.71%   29-34
TOTAL                 2495     176  92.95%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  -------
R/generics.R            +3      +1  -0.74%
R/matrix_form.R         +8     -12  +2.27%
R/mpf_exporters.R      +19      -2  +1.37%
R/pagination.R         +36     -11  +2.06%
TOTAL                  +66     -24  +1.18%

Results for commit: 25396b0b58ed2065bd117f4f7e0596695c1937f8

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 1 year ago

Unit Tests Summary

  1 files    5 suites   13s :stopwatch:  46 tests  46 :white_check_mark: 0 :zzz: 0 :x: 322 runs  322 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 25396b0b.

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

edelarua commented 7 months ago

@Melkiades I have a rough solution here that is working for lists of listings (haven't tested lists of tables yet). Feel free to test and make any changes as you see fit! You can also modify https://github.com/insightsengineering/rlistings/pull/166 if you'd like which is also working (in combination with this PR) to paginate by parameter.

EDIT: Full solution is now uploaded. :)

github-actions[bot] commented 7 months ago

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
exporters 💔 $2.21$ $+2.01$ $+9$ $0$ $0$ $0$
pagination 💔 $5.35$ $+1.53$ $+17$ $0$ $0$ $0$
Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | exporters | 👶 | | $+2.07$ | exporting_lists_of_tables_and_listings_works | | pagination | 👶 | | $+0.94$ | colwidths_and_num_rep_cols_work_when_using_lists_of_tables_and_listings | | pagination | 👶 | | $+0.76$ | rep_cols_works_as_intended_for_listings_and_tables |

Results for commit b8eae3c34cba2522e80eb259fb85fe2f366e36c6

♻️ This comment has been updated with latest results.