picks
Closes https://github.com/insightsengineering/NEST-roadmap/issues/36
Check also with:
- https://github.com/insightsengineering/teal.transform/pull/270
- https://github.com/insightsengineering/teal.modules.general/pull/942
Introduces validate_input as an alternative to shinyvalidate package. Function is easier to handle than shinyvalidate, as one can use validate_input() in reactive and display-validation-error on the input and throw shiny-validate-error in the same time. See tmg PR to see how it works
Code Coverage Summary
Filename Stmts Miss Cover Missing
------------------------------ ------- ------ ------- --------------------------------------------------------------------------------------------------------------------------------------
R/after.R 59 21 64.41% 42-52, 64, 69, 77-79, 81-89, 100, 104-105
R/checkmate.R 24 0 100.00%
R/dummy_functions.R 61 2 96.72% 44, 46
R/include_css_js.R 11 0 100.00%
R/init.R 152 1 99.34% 299
R/landing_popup_module.R 34 10 70.59% 44-53
R/module_bookmark_manager.R 153 117 23.53% 54-58, 78-133, 138-139, 151, 198, 233-310
R/module_data_summary.R 177 8 95.48% 40, 50, 205, 236-240
R/module_filter_data.R 64 0 100.00%
R/module_filter_manager.R 229 50 78.17% 72-81, 89-94, 107-111, 116-117, 290-313, 339, 366, 378, 385-386
R/module_init_data.R 84 6 92.86% 38-43
R/module_nested_tabs.R 371 37 90.03% 163, 267-282, 302-306, 324, 361, 479-482, 486-489, 493-496, 541
R/module_session_info.R 18 0 100.00%
R/module_snapshot_manager.R 271 194 28.41% 103-112, 120-144, 163-164, 181-210, 214-229, 231-238, 245-275, 279, 283-287, 289-295, 298-311, 314-322, 352-366, 369-380, 383-397, 410
R/module_source_code.R 69 0 100.00%
R/module_teal_data.R 149 76 48.99% 43-149
R/module_teal_lockfile.R 131 53 59.54% 45-57, 60-62, 76, 86-88, 100-102, 110-119, 122, 124, 126-127, 142-146, 161-162, 177-186
R/module_teal_reporter.R 122 9 92.62% 60, 77-78, 81, 98, 128, 142, 144, 158
R/module_teal_with_splash.R 33 33 0.00% 24-61
R/module_teal.R 214 28 86.92% 131, 135-136, 146-147, 187, 205-221, 223, 256-257, 264-265
R/module_transform_data.R 116 6 94.83% 46, 130-134
R/modules.R 291 51 82.47% 170-174, 229-232, 356-376, 384, 390, 567-573, 586-594, 609-624
R/reporter_previewer_module.R 41 41 0.00% 22-85
R/show_rcode_modal.R 31 31 0.00% 17-49
R/tdata.R 14 14 0.00% 19-61
R/teal_data_module-eval_code.R 23 0 100.00%
R/teal_data_module-within.R 7 0 100.00%
R/teal_data_module.R 20 0 100.00%
R/teal_data_utils.R 49 0 100.00%
R/teal_modifiers.R 57 0 100.00%
R/teal_slices-store.R 29 0 100.00%
R/teal_slices.R 63 0 100.00%
R/teal_transform_module.R 45 0 100.00%
R/TealAppDriver.R 297 297 0.00% 50-620
R/utils.R 291 48 83.51% 402-451, 539-548
R/validate_inputs.R 52 20 61.54% 212-236
R/validations.R 58 37 36.21% 114-392
R/zzz.R 19 15 21.05% 4-22
TOTAL 3929 1205 69.33%
Diff against main
Filename Stmts Miss Cover
------------------- ------- ------ -------
R/module_teal.R +1 0 +0.06%
R/validate_inputs.R +20 +20 -38.46%
TOTAL +21 +20 -0.35%
Results for commit: 1bed0b1ac43a6d7764f34bf743f3c766c178d937
Minimum allowed coverage is 80%
:recycle: This comment has been updated with latest results
Unit Tests Summary
1 files 31 suites 2m 33s ⏱️ 350 tests 274 ✅ 68 💤 0 ❌ 8 🔥 561 runs 485 ✅ 68 💤 0 ❌ 8 🔥
For more details on these errors, see this check.
Results for commit b9c29b00.
:recycle: This comment has been updated with latest results.
Unit Test Performance Difference
| Test Suite | $Status$ | Time on main |
$±Time$ | $±Tests$ | $±Skipped$ | $±Failures$ | $±Errors$ |
|---|---|---|---|---|---|---|---|
| module_session_info | 💚 | $18.05$ | $-1.06$ | $0$ | $0$ | $0$ | $0$ |
| shinytest2-validate_input | 👶 | $+0.43$ | $+10$ | $+2$ | $0$ | $+8$ | |
| validate_input | 👶 | $+0.15$ | $+15$ | $0$ | $0$ | $0$ |
Additional test case details
| Test Suite | $Status$ | Time on main |
$±Time$ | Test Case |
|---|---|---|---|---|
| module_session_info | 💚 | $18.03$ | $-1.06$ | creation_process_is_invoked_for_teal.lockfile.mode_enabled_and_snapshot_is_copied_to_teal_app.lock_and_removed_after_session_ended |
| shinytest2-validate_input | 👶 | $+0.10$ | e2e_validate_input_displays_validation_message_when_input_is_invalid_no_message_when_valid | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_checkboxGroupInput | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_checkboxInput | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_dateInput | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_dateRangeInput | |
| shinytest2-validate_input | 👶 | $+0.09$ | e2e_validate_input_validates_many_inputs_and_linked_output_when_they_return_invalid_value | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_radioButtons | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_selectInput | |
| shinytest2-validate_input | 👶 | $+0.03$ | e2e_validate_input_validates_selectizeInput | |
| shinytest2-validate_input | 👶 | $+0.02$ | e2e_validate_input_validates_sliderInput | |
| validate_input | 👶 | $+0.02$ | validate_input_condition_has_to_be_a_logical_1_or_function_with_nargs_length_inputId_ | |
| validate_input | 👶 | $+0.02$ | validate_input_inputId_has_to_be_a_character_1_ | |
| validate_input | 👶 | $+0.01$ | validate_input_message_has_to_be_a_character_1_ | |
| validate_input | 👶 | $+0.01$ | validate_input_returns_NULL_when_condition_is_TRUE | |
| validate_input | 👶 | $+0.02$ | validate_input_throws_message_as_shiny.silent.error_when_condition_FALSE_ | |
| validate_input | 👶 | $+0.01$ | validate_input_with_multiple_inputIds_doesn_t_throw_shiny.silent.error_if_all_inputs_are_valid | |
| validate_input | 👶 | $+0.02$ | validate_input_with_multiple_inputIds_throws_shiny.silent.error_when_any_input_is_invalid | |
| validate_input | 👶 | $+0.02$ | validate_input_works_with_function_condition_that_returns_FALSE_for_input_with_inputId_ | |
| validate_input | 👶 | $+0.01$ | validate_input_works_with_function_condition_that_returns_TRUE_for_input_with_inputId_ |
Results for commit 502ae0e8edf4710ab85317b36365fb55348e171a
♻️ This comment has been updated with latest results.
8 failed tests in R CMD CHECK
[ FAIL 8 | WARN 3 | SKIP 56 | PASS 482 ]
Error in `testthat::test_that("e2e: validate_input validates dateRangeInput")`: argument "code" is missing, with no default
does validate_input needs some default value?
https://github.com/insightsengineering/teal/actions/runs/19031248490/job/54345566087?pr=1642#step:44:618
Ah ok, those are those 8 tests that do not have any body yet
https://github.com/insightsengineering/teal/pull/1642/files#diff-1701b89782ded4509f0394359d889ddd3b2ffdf2a3532c898cf75ed77dfe3201R117-R124
Ah ok, those are those 8 tests that do not have any body yet
https://github.com/insightsengineering/teal/pull/1642/files#diff-1701b89782ded4509f0394359d889ddd3b2ffdf2a3532c898cf75ed77dfe3201R117-R124
Yup, this is for the first volunteer