Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shinytest2 app init on R 4.4.0+ #1211

Merged
merged 1 commit into from
May 6, 2024
Merged

Fix shinytest2 app init on R 4.4.0+ #1211

merged 1 commit into from
May 6, 2024

Conversation

vedhav
Copy link
Contributor

@vedhav vedhav commented May 6, 2024

Fixes the broken shinytest2 tests

The root cause is that numeric_version only accepts character to convert into numeric_version class. So typecasting of the numeric version was giving the error.

Example code to test. This works in older R versions. But, in R 4.4.0 it does not work.

# Broken
numeric_version('123') > 120

#Works
numeric_version('123') > '120'

@vedhav vedhav added the core label May 6, 2024
Copy link
Contributor

github-actions bot commented May 6, 2024

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  --------------------------------------------------------------------------------------------------------------------------------------------------
R/TealAppDriver.R                   315     315  0.00%    43-650
R/dummy_functions.R                  36      25  30.56%   21-37, 40-47
R/get_rcode_utils.R                  31       1  96.77%   50
R/include_css_js.R                   22      17  22.73%   12-38, 76-82
R/init.R                             86      31  63.95%   108-115, 161-162, 164, 176-197, 228-229, 231
R/landing_popup_module.R             25      25  0.00%    61-87
R/module_bookmark_manager.R         158     125  20.89%   42-43, 57-59, 70-83, 93-143, 148-149, 189, 224-301
R/module_filter_manager.R            84      19  77.38%   38-42, 157, 162-175
R/module_nested_tabs.R              161      60  62.73%   39-112, 128, 180, 202, 224, 232, 236
R/module_snapshot_manager.R         241     178  26.14%   95-107, 136-139, 143-144, 159-169, 173-188, 190-198, 205-220, 224-228, 230-236, 239-252, 255-273, 282-298, 313-336, 339-350, 353-359, 373, 394-418
R/module_tabs_with_filters.R         76      33  56.58%   33-68, 100, 116
R/module_teal.R                     113      79  30.09%   52-119, 150-151, 157-160, 171, 184-215
R/module_teal_with_splash.R         114      34  70.18%   60-95, 110, 131, 197-198
R/module_wunder_bar.R                60      39  35.00%   23-41, 55-64, 68-77
R/modules.R                         159      26  83.65%   127-130, 147-151, 206-209, 291-292, 344, 356-364, 418-421
R/reporter_previewer_module.R        19       2  89.47%   30, 34
R/show_rcode_modal.R                 19      19  0.00%    17-36
R/tdata.R                            53       1  98.11%   154
R/teal_data_module-eval_code.R       27       0  100.00%
R/teal_data_module-within.R           7       0  100.00%
R/teal_data_module.R                  6       0  100.00%
R/teal_reporter.R                    68       6  91.18%   69, 77, 125-126, 129, 146
R/teal_slices-store.R                29       0  100.00%
R/teal_slices.R                      59      12  79.66%   137-150
R/utils.R                           173       1  99.42%   255
R/validate_inputs.R                  32       0  100.00%
R/validations.R                      58      37  36.21%   110-377
R/zzz.R                              12       8  33.33%   3-15
TOTAL                              2243    1093  51.27%

Diff against main

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

Results for commit: 718977a

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented May 6, 2024

Unit Tests Summary

  1 files   30 suites   2m 49s ⏱️
240 tests 240 ✅ 0 💤 0 ❌
505 runs  505 ✅ 0 💤 0 ❌

Results for commit 718977a.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 6, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
shinytest2-filter_panel 💔 $11.10$ $+5.65$ $+2$ $0$ $0$ $-3$
shinytest2-init 💔 $8.05$ $+2.36$ $+14$ $0$ $0$ $-3$
shinytest2-landing_popup 💔 $14.73$ $+3.30$ $+6$ $0$ $0$ $-5$
shinytest2-module_bookmark_manager 💔 $20.06$ $+3.26$ $0$ $0$ $0$ $-4$
shinytest2-modules 💔 $13.42$ $+3.90$ $+1$ $0$ $0$ $-5$
shinytest2-reporter 💔 $8.38$ $+24.37$ $+1$ $0$ $0$ $-3$
shinytest2-show-rcode 💔 $2.79$ $+1.02$ $+8$ $0$ $0$ $-1$
shinytest2-teal_data_module 💔 $5.40$ $+5.51$ $+1$ $0$ $0$ $-3$
shinytest2-teal_slices 💔 $7.35$ $+5.72$ $+16$ $0$ $0$ $-2$
shinytest2-utils 💔 $2.71$ $+1.10$ $+3$ $0$ $0$ $-1$
shinytest2-wunder_bar 💔 $5.47$ $+3.11$ $+2$ $0$ $0$ $-2$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
shinytest2-filter_panel 💔 $3.33$ $+2.46$ e2e_filtering_a_module_specific_filter_is_not_refected_in_other_unshared_modules
shinytest2-filter_panel 💔 $3.36$ $+2.49$ e2e_filtering_a_module_specific_filter_is_refected_in_other_shared_module
shinytest2-init 💔 $2.68$ $+1.19$ e2e_teal_app_initializes_with_sessionInfo_modal
shinytest2-module_bookmark_manager 💔 $5.10$ $+1.05$ bookmark_manager_button_shows_modal_with_url_containing_state_id_when_clicked
shinytest2-modules 💔 $2.66$ $+1.36$ e2e_the_module_server_logic_is_only_triggered_when_the_teal_module_becomes_active
shinytest2-reporter 💔 $2.83$ $+23.10$ e2e_adding_a_report_card_in_a_module_adds_it_in_the_report_previewer_tab
shinytest2-show-rcode 💔 $2.79$ $+1.01$ e2e_teal_app_initializes_with_Show_R_Code_modal
shinytest2-teal_data_module 💔 $2.01$ $+2.04$ e2e_teal_data_module_inputs_change_teal_data_object_that_is_passed_to_teal_main_UI
shinytest2-teal_data_module 💔 $1.68$ $+1.36$ e2e_teal_data_module_shows_validation_errors
shinytest2-teal_data_module 💔 $1.70$ $+2.11$ e2e_teal_data_module_will_have_a_delayed_load_of_datasets
shinytest2-teal_slices 💔 $3.83$ $+1.97$ e2e_teal_slices_filters_are_initialized_when_global_filters_are_created
shinytest2-teal_slices 💔 $3.52$ $+3.75$ e2e_teal_slices_filters_are_initialized_when_module_specific_filters_are_created
shinytest2-utils 💔 $2.71$ $+1.10$ e2e_show_hide_hamburger_works_as_expected
shinytest2-wunder_bar 💔 $2.76$ $+1.53$ wunder_bar_srv_clicking_filter_icon_opens_filter_manager_modal
shinytest2-wunder_bar 💔 $2.71$ $+1.58$ wunder_bar_srv_clicking_snapshot_icon_opens_snapshot_manager_modal

Results for commit 5dc2b9c

♻️ This comment has been updated with latest results.

Copy link
Contributor

@kartikeyakirar kartikeyakirar left a comment

Choose a reason for hiding this comment

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

LGTM

@vedhav vedhav merged commit e475c90 into main May 6, 2024
24 checks passed
@vedhav vedhav deleted the fix-shinytest2@main branch May 6, 2024 09:46
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants