insightsengineering / cards

CDISC Analysis Results Data
https://insightsengineering.github.io/cards/
24 stars 0 forks source link

Improved environment handling in `process_formula_selectors()` for formulas #252

Closed ddsjoberg closed 1 month ago

ddsjoberg commented 1 month ago

FYI @bzkrouse, I ran into a situation in gtsummary development where process_formula_selectors() was being called inside some nested functions, and ran into an environment handling issue. Hopefully, we don't uncover many more of these 😬 I'll request your review when this is ready for review. I need to do some cross-package checking to ensure this solves the issue.

What changes are proposed in this pull request?


Pre-review Checklist (if item does not apply, mark is as complete)

Reviewer Checklist (if item does not apply, mark is as complete)

When the branch is ready to be merged:

github-actions[bot] commented 1 month ago

Unit Tests Summary

  1 files   87 suites   13s :stopwatch:  85 tests  53 :white_check_mark: 32 :zzz: 0 :x: 174 runs  128 :white_check_mark: 46 :zzz: 0 :x:

Results for commit 361bc625.

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

github-actions[bot] commented 1 month ago

badge

Code Coverage Summary

Filename                       Stmts    Miss  Cover    Missing
---------------------------  -------  ------  -------  --------------------------
R/apply_fmt_fn.R                  83      16  80.72%   97-104, 186-193
R/ard_attributes.R                33       0  100.00%
R/ard_categorical.R              348      16  95.40%   223, 383-384, 540-555, 589
R/ard_complex.R                   34       0  100.00%
R/ard_continuous.R               176       4  97.73%   118, 200-201, 299
R/ard_dichotomous.R               66       2  96.97%   60, 146
R/ard_hierarchical.R              83       0  100.00%
R/ard_missing.R                   21       0  100.00%
R/ard_stack.R                     70       1  98.57%   103
R/as_nested_list.R                41       0  100.00%
R/bind_ard.R                      22       3  86.36%   51-53
R/check_ard_structure.R           39       6  84.62%   31, 55-59
R/default_stat_labels.R           18       0  100.00%
R/eval_capture_conditions.R       18       0  100.00%
R/get_ard_statistics.R            16       1  93.75%   75
R/nest_for_ard.R                  70       1  98.57%   56
R/print_ard_conditions.R          75      66  12.00%   60-176
R/print.R                         72       0  100.00%
R/process_selectors.R            125       1  99.20%   334
R/replace_null_statistic.R        11       0  100.00%
R/round5.R                         1       0  100.00%
R/selectors.R                     14       0  100.00%
R/shuffle_ard.R                  134       1  99.25%   268
R/summary_functions.R             58       1  98.28%   91
R/tidy_ard_order.R                25       0  100.00%
R/tidy_as_ard.R                   39      11  71.79%   88-98
R/utils.R                         24       0  100.00%
TOTAL                           1716     130  92.42%

Diff against main

Filename                 Stmts    Miss  Cover
---------------------  -------  ------  -------
R/process_selectors.R       -1      +1  -0.80%
TOTAL                       -1      +1  -0.06%

Results for commit: 361bc6251a10f960f89a8688844fa5f2f0b5eb4e

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

ddsjoberg commented 1 month ago

OK i think this solves the issue! I'll go ahead and merge it.