insightsengineering / teal.reporter

Create and preview reports with Shiny modules
https://insightsengineering.github.io/teal.reporter/
Other
8 stars 8 forks source link

use rtables pkg function for generating report #265

Closed kartikeyakirar closed 1 month ago

kartikeyakirar commented 3 months ago

partially fixes :https://github.com/insightsengineering/teal.reporter/issues/258

feasibility to remove any call from flextable pkg and remove it from import

github-actions[bot] commented 3 months ago

badge

Code Coverage Summary

Filename                  Stmts    Miss  Cover    Missing
----------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------
R/AddCardModule.R           146       2  98.63%   170, 207
R/ContentBlock.R             18       2  88.89%   57-63
R/DownloadModule.R          238      67  71.85%   98-104, 152, 183-188, 197-202, 205-210, 219-224, 227-232, 240-245, 248-253, 260-265, 268-273, 312-316
R/FileBlock.R                13       0  100.00%
R/LoadReporterModule.R      103      19  81.55%   100-105, 108-113, 119-124, 136
R/NewpageBlock.R              2       0  100.00%
R/PictureBlock.R             30       2  93.33%   20, 118
R/Previewer.R               372      95  74.46%   96-98, 101-102, 184-213, 217-219, 222, 289, 304, 306-309, 312, 315-323, 437-481
R/RcodeBlock.R               15       0  100.00%
R/Renderer.R                113      37  67.26%   97-112, 216, 224, 233, 235-256
R/ReportCard.R               84       3  96.43%   236, 241, 266
R/Reporter.R                107       6  94.39%   273-278
R/ResetModule.R              53       0  100.00%
R/SimpleReporter.R           32       0  100.00%
R/TableBlock.R                9       0  100.00%
R/TextBlock.R                13       0  100.00%
R/utils.R                   126      86  31.75%   7, 38-97, 99, 102-109, 137, 161-169, 206-215
R/yaml_utils.R               81       2  97.53%   78, 289
R/zzz.R                      14      10  28.57%   2-13, 19
TOTAL                      1569     331  78.90%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  -------
R/utils.R       -45      +6  -21.47%
TOTAL           -45      +6  -0.96%

Results for commit: d493bd804d5552f19fa07ba2759b4c939ab72644

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 3 months ago

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
Renderer 💔 $0.85$ $+2.64$ $0$ $0$ $0$ $0$
ReportCard 💔 $0.97$ $+4.19$ $0$ $0$ $0$ $0$
Reporter 💔 $1.80$ $+1.92$ $0$ $0$ $0$ $0$
TableBlock 💔 $1.32$ $+13.68$ $0$ $0$ $0$ $0$
utils 💔 $0.50$ $+4.38$ $-3$ $0$ $0$ $0$
Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | Renderer | 💔 | $0.38$ | $+2.61$ | renderRmd_asserts_the_argument_is_a_list_of_TextBlocks_PictureBlock_NewpageBlock_TableBlock | | ReportCard | 💔 | $0.24$ | $+2.19$ | append_table_accepts_a_data.frame | | ReportCard | 💔 | $0.21$ | $+2.03$ | append_table_returns_self | | Reporter | 💔 | $1.55$ | $+1.91$ | default_reporter_id | | TableBlock | 💔 | $0.19$ | $+2.32$ | from_list_after_to_list_to_save_and_retrive | | TableBlock | 💔 | $0.19$ | $+2.18$ | set_content_accepts_a_table_object | | TableBlock | 💔 | $0.18$ | $+2.28$ | set_content_returns_the_TableBlock_object | | TableBlock | 💔 | $0.18$ | $+2.33$ | set_content_supports_data.frame_object | | TableBlock | 💔 | $0.19$ | $+2.29$ | to_list_returns_a_named_list_with_a_one_field_a_proper_file_name | | TableBlock | 💔 | $0.18$ | $+2.30$ | to_list_returns_a_named_list_with_a_one_field_a_proper_path | | utils | 💀 | $0.15$ | $-0.15$ | custom_theme_to_flextable | | utils | 💀 | $0.00$ | $-0.00$ | get_merge_index | | utils | 💀 | $0.00$ | $-0.00$ | get_merge_index_single | | utils | 💀 | $0.15$ | $-0.15$ | merge_at_indice | | utils | 💀 | $0.15$ | $-0.15$ | padding_lst_applies_padding_to_a_flextable_based_on_indentation_levels | | utils | 💀 | $0.03$ | $-0.03$ | to_flextable_supported_class | | utils | 👶 | | $+0.13$ | to_flextable_supported_class_data.frame_ | | utils | 👶 | | $+4.61$ | to_flextable_supported_class_listing_df_ | | utils | 👶 | | $+0.12$ | to_flextable_supported_class_rtables_ |

Results for commit 5314ea5a2bd59476c50b8a9d06157875c83b1f3a

♻️ This comment has been updated with latest results.

github-actions[bot] commented 1 month ago

CLA Assistant Lite bot ✅ All contributors have signed the CLA

Melkiades commented 1 month ago

I have read the CLA Document and I hereby sign the CLA

Melkiades commented 1 month ago

@kartikeyakirar, how is this going? I think it is kind of ready isnt it? ^^

kartikeyakirar commented 1 month ago

@Melkiades, I had paused work on this due to sprint priorities but have now resumed. The issue was addressed in the PR. We discussed the possibility of removing any calls to the flextable package and eliminating it from our imports. As a result, I've moved this to draft and am actively working on it.

Feasibility to remove any call from flextable pkg and remove it from import

I think i should have merged this and created a separate issue to remove flextable, to maintain momentum.

kartikeyakirar commented 1 month ago

I have read the CLA Document and I hereby sign the CLA

Melkiades commented 1 month ago

@Melkiades, I had paused work on this due to sprint priorities but have now resumed. The issue was addressed in the PR. We discussed the possibility of removing any calls to the flextable package and eliminating it from our imports. As a result, I've moved this to draft and am actively working on it.

Feasibility to remove any call from flextable pkg and remove it from import

I think i should have merged this and created a separate issue to remove flextable, to maintain momentum.

It is anyway imported by rtables function so I do not think it will make a lot of a difference

github-actions[bot] commented 1 month ago

Unit Tests Summary

  1 files   18 suites   37s :stopwatch: 189 tests 189 :white_check_mark: 0 :zzz: 0 :x: 329 runs  329 :white_check_mark: 0 :zzz: 0 :x:

Results for commit d493bd80.

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

kartikeyakirar commented 1 month ago

some tests for the functionality anyway?

done 800d071