Skip to content

Conversation

@iaugusty
Copy link
Collaborator

this PR is linked to rtables issue insightsengineering/rtables#1040

@iaugusty
Copy link
Collaborator Author

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

Unit Tests Summary

  1 files    8 suites   14s ⏱️
 57 tests  57 ✅ 0 💤 0 ❌
431 runs  431 ✅ 0 💤 0 ❌

Results for commit eb17984.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

badge

Code Coverage Summary

Filename             Stmts    Miss  Cover    Missing
-----------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/format_value.R       272       6  97.79%   117, 233, 276, 288, 564, 572
R/generics.R           128      13  89.84%   148, 286-290, 492, 504, 535, 565, 673, 686, 707-714, 769
R/labels.R              55       7  87.27%   51, 57, 66, 107, 133, 142, 146
R/matrix_form.R        701      36  94.86%   134, 174, 410, 530-531, 623, 633-636, 654, 685, 775-776, 790-795, 825-828, 888-889, 982-983, 1038, 1090, 1256, 1292, 1349, 1397, 1400, 1404
R/mpf_exporters.R      292      31  89.38%   2-9, 110-120, 165, 201, 246, 249, 254, 435-441, 445, 448, 452, 502, 581
R/page_size.R           42       1  97.62%   219
R/pagination.R         770      56  92.73%   327-330, 435-450, 540, 595, 600, 641, 679-690, 766, 878-879, 901-910, 1051, 1054, 1275, 1312-1316, 1333-1341, 1422, 1562-1563, 1579-1580, 1594-1595
R/tostring.R           783      66  91.57%   88, 296, 351, 421, 454, 462, 498, 555-558, 594, 660-663, 669-673, 676-679, 686-691, 774-775, 915-916, 981-988, 1038-1042, 1111, 1164, 1183-1187, 1198, 1216, 1233, 1248, 1346, 1389, 1434, 1520, 1559, 1613, 1620
R/utils.R                3       0  100.00%
R/zzz.R                 17       6  64.71%   28-33
TOTAL                 3063     222  92.75%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  -------
R/format_value.R        +7      +1  -0.32%
R/generics.R            +3      +1  -0.56%
R/matrix_form.R         +6      -1  +0.19%
R/mpf_exporters.R       +5      +3  -0.86%
TOTAL                  +21      +4  -0.08%

Results for commit: eb17984

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@shajoezhu
Copy link
Contributor

hi @iaugusty , can you please resolve the cicd checks. thanks

@iaugusty
Copy link
Collaborator Author

@shajoezhu resolved, thx

Signed-off-by: Davide Garolini <dgarolini@gmail.com>
Copy link
Contributor

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikolas-burkoff
Copy link
Collaborator

Hi @shajoezhu when I run scda.test with this branch of formatters and the corresponding branches of rtables and rlistings (1040_rtables_roundtype) I don't get any errors locally.

image

The processes have changed since I was last involved so is there something extra we need to do?
Thanks

@shajoezhu
Copy link
Contributor

Hi @shajoezhu when I run scda.test with this branch of formatters and the corresponding branches of rtables and rlistings (1040_rtables_roundtype) I don't get any errors locally.

image The processes have changed since I was last involved so is there something extra we need to do? Thanks

Let me see how this goes https://github.com/insightsengineering/scda.test/pull/201/files

@nikolas-burkoff
Copy link
Collaborator

nikolas-burkoff commented Nov 28, 2025

Yay that worked.

I will make similar changes in rtables and rlistings so in their PRs the DESC files reference the correct branch of formatters as well so we can make those checks pass as well. Edit I see you have done this

When the code is merged into main (we still want Gabe to take a look so it won't be this week) - does the automation set insightsengineering/formatters@1040_rtables_round_type back to insightsengineering/formatters in the Desc file? Or do we have to do something else?

Copy link
Contributor

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! this is working thanks! see insightsengineering/scda.test#201

Copy link
Collaborator

@gmbecker gmbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall new rounding type and generics look good. Please update default rounding type in various places from a fixed value to obj_round_type of the relevant (other) argument. I think I added suggestions for all of them but do another pass to make sure I didn't miss anything.

Note this looks like a ton of issues but its really just 2, I think, but one of them happens in many places, so not nearly as bad as it looks.

After applying suggestions and other changes please test locally (and remember to roxygenize). Marking as draft so you can apply the suggestions and then pull pull the changes to do the rest an test locally. reset it to non-draft whenever you feel its ready @iaugusty

R/tostring.R Outdated
round_type = c("iec", "sas")) {
round_type = valid_round_type) {
checkmate::assert_flag(tf_wrap)
round_type <- match.arg(round_type)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
round_type <- match.arg(round_type)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only when paired with above change

paginate = TRUE,
round_type = valid_round_type,
...) {
round_type <- match.arg(round_type)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
round_type <- match.arg(round_type)

R/generics.R Outdated
fontspec = font_spec(),
col_gap = mf_colgap(tt) %||% 3L,
round_type = c("iec", "sas")) {
round_type = valid_round_type) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine because it throws an error but could be changed to obj_round_type as with others

@gmbecker gmbecker marked this pull request as draft December 1, 2025 00:50
@iaugusty
Copy link
Collaborator Author

iaugusty commented Dec 1, 2025

updates as suggested and tested related PRs + scda.test locally. All seems fine, therefor convert back to PR

@iaugusty iaugusty marked this pull request as ready for review December 1, 2025 16:00
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
formatters 👶 $+0.16$ Methods_for_obj_round_type

Results for commit fbe6305

♻️ This comment has been updated with latest results.

@iaugusty
Copy link
Collaborator Author

iaugusty commented Dec 1, 2025

all checks passed, I hope we are good to go

@shajoezhu shajoezhu requested a review from gmbecker December 2, 2025 00:51
Copy link
Contributor

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

downstream all good! insightsengineering/scda.test#201 thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants