insightsengineering / teal.modules.clinical

Provides teal modules for the standard clinical trials outputs
https://insightsengineering.github.io/teal.modules.clinical/
Other
29 stars 13 forks source link

553 change level in `log_shiny_input_changes` and exclude plot sizes in logging #1191

Closed m7pr closed 2 weeks ago

m7pr commented 3 weeks ago

Part of https://github.com/insightsengineering/coredev-tasks/issues/553 and https://github.com/insightsengineering/coredev-tasks/issues/568

github-actions[bot] commented 3 weeks ago

Unit Tests Summary

    1 files     70 suites   1h 5m 38s :stopwatch:   720 tests   610 :white_check_mark: 110 :zzz: 0 :x: 1 983 runs  1 761 :white_check_mark: 222 :zzz: 0 :x:

Results for commit e9c52aac.

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

github-actions[bot] commented 3 weeks ago

Unit Test Performance Difference

Test suite performance difference | Test Suite | $Status$ | Time on `main` | $±Time$ | $±Tests$ | $±Skipped$ | $±Failures$ | $±Errors$ | |:-----|:----:|:----:|:-----:|:-------:|:--------:|:------:|:------:| | shinytest2-tm_a_gee | 💚 | $128.51$ | $-1.68$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_a_mmrm | 💚 | $857.60$ | $-158.84$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_barchart_simple | 💚 | $225.99$ | $-10.05$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_ci | 💚 | $101.81$ | $-3.34$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_forest_rsp | 💚 | $170.30$ | $-2.73$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_forest_tte | 💚 | $64.64$ | $-1.70$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_ipp | 💚 | $101.62$ | $-2.89$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_km | 💚 | $259.47$ | $-16.38$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_lineplot | 💚 | $87.56$ | $-3.04$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_pp_adverse_events | 💚 | $129.07$ | $-9.57$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_pp_patient_timeline | 💚 | $234.07$ | $-11.30$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_g_pp_therapy | 💚 | $191.33$ | $-16.83$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_abnormality_by_worst_grade | 💚 | $73.89$ | $-9.16$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_ancova | 💚 | $90.34$ | $-1.35$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_binary_outcome | 💚 | $75.61$ | $-2.84$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_coxreg | 💚 | $71.68$ | $-1.95$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_events | 💚 | $58.48$ | $-1.16$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_events_patyear | 💚 | $42.05$ | $-1.13$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_exposure | 💚 | $79.81$ | $-6.74$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_pp_laboratory | 💚 | $129.57$ | $-7.17$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_pp_prior_medication | 💚 | $79.96$ | $-4.12$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_shift_by_arm_by_worst | 💚 | $87.40$ | $-1.18$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_shift_by_grade | 💚 | $79.30$ | $-3.57$ | $0$ | $0$ | $0$ | $0$ | | shinytest2-tm_t_tte | 💚 | $64.11$ | $-2.06$ | $0$ | $0$ | $0$ | $0$ |
Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | shinytest2-tm_a_mmrm | 💚 | $11.74$ | $-2.69$ | e2e_tm_a_mmrm_Click_on_fit_model_shows_table_for_default_selection. | | shinytest2-tm_a_mmrm | 💚 | $13.97$ | $-3.06$ | e2e_tm_a_mmrm_Deselection_of_arm_var_throws_validation_error_in_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.99$ | $-3.12$ | e2e_tm_a_mmrm_Deselection_of_arm_var_throws_validation_error_in_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.17$ | $-2.90$ | e2e_tm_a_mmrm_Deselection_of_arm_var_throws_validation_error_in_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $13.33$ | $-3.08$ | e2e_tm_a_mmrm_Deselection_of_arm_var_throws_validation_error_in_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.68$ | $-3.19$ | e2e_tm_a_mmrm_Deselection_of_arm_var_throws_validation_error_in_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $12.99$ | $-2.81$ | e2e_tm_a_mmrm_Deselection_of_arm_var_throws_validation_error_in_method_t_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.91$ | $-3.07$ | e2e_tm_a_mmrm_Deselection_of_aval_var_throws_validation_error_in_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.96$ | $-3.15$ | e2e_tm_a_mmrm_Deselection_of_aval_var_throws_validation_error_in_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.28$ | $-3.12$ | e2e_tm_a_mmrm_Deselection_of_aval_var_throws_validation_error_in_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $13.43$ | $-3.26$ | e2e_tm_a_mmrm_Deselection_of_aval_var_throws_validation_error_in_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.60$ | $-3.32$ | e2e_tm_a_mmrm_Deselection_of_aval_var_throws_validation_error_in_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $12.89$ | $-2.95$ | e2e_tm_a_mmrm_Deselection_of_aval_var_throws_validation_error_in_method_t_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.82$ | $-2.91$ | e2e_tm_a_mmrm_Deselection_of_conf_level_throws_validation_error_in_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $14.03$ | $-3.20$ | e2e_tm_a_mmrm_Deselection_of_conf_level_throws_validation_error_in_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.09$ | $-3.01$ | e2e_tm_a_mmrm_Deselection_of_conf_level_throws_validation_error_in_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $13.08$ | $-2.93$ | e2e_tm_a_mmrm_Deselection_of_conf_level_throws_validation_error_in_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.32$ | $-3.07$ | e2e_tm_a_mmrm_Deselection_of_conf_level_throws_validation_error_in_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $12.92$ | $-2.88$ | e2e_tm_a_mmrm_Deselection_of_conf_level_throws_validation_error_in_method_t_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.90$ | $-3.05$ | e2e_tm_a_mmrm_Deselection_of_id_var_throws_validation_error_in_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.88$ | $-3.09$ | e2e_tm_a_mmrm_Deselection_of_id_var_throws_validation_error_in_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.26$ | $-3.05$ | e2e_tm_a_mmrm_Deselection_of_id_var_throws_validation_error_in_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $13.25$ | $-3.07$ | e2e_tm_a_mmrm_Deselection_of_id_var_throws_validation_error_in_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.48$ | $-3.13$ | e2e_tm_a_mmrm_Deselection_of_id_var_throws_validation_error_in_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $12.90$ | $-2.88$ | e2e_tm_a_mmrm_Deselection_of_id_var_throws_validation_error_in_method_t_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.99$ | $-3.11$ | e2e_tm_a_mmrm_Deselection_of_visit_var_throws_validation_error_in_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $14.02$ | $-3.19$ | e2e_tm_a_mmrm_Deselection_of_visit_var_throws_validation_error_in_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.35$ | $-3.12$ | e2e_tm_a_mmrm_Deselection_of_visit_var_throws_validation_error_in_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $13.22$ | $-2.94$ | e2e_tm_a_mmrm_Deselection_of_visit_var_throws_validation_error_in_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.67$ | $-3.41$ | e2e_tm_a_mmrm_Deselection_of_visit_var_throws_validation_error_in_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $13.01$ | $-2.85$ | e2e_tm_a_mmrm_Deselection_of_visit_var_throws_validation_error_in_method_t_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.90$ | $-3.05$ | e2e_tm_a_mmrm_Deselection_paramcd_throws_validation_error_in_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.92$ | $-3.04$ | e2e_tm_a_mmrm_Deselection_paramcd_throws_validation_error_in_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $13.22$ | $-3.02$ | e2e_tm_a_mmrm_Deselection_paramcd_throws_validation_error_in_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $13.28$ | $-3.11$ | e2e_tm_a_mmrm_Deselection_paramcd_throws_validation_error_in_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $13.50$ | $-3.11$ | e2e_tm_a_mmrm_Deselection_paramcd_throws_validation_error_in_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $12.94$ | $-2.82$ | e2e_tm_a_mmrm_Deselection_paramcd_throws_validation_error_in_method_t_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $16.11$ | $-2.37$ | e2e_tm_a_mmrm_Function_g_mmrm_diagnostic_selection_shows_output_settings_changing_settings_throws_no_validation_errors_and_verify_visibility_of_generated_plots. | | shinytest2-tm_a_mmrm | 💚 | $20.11$ | $-3.12$ | e2e_tm_a_mmrm_Function_g_mmrm_lsmeans_selection_shows_output_settings_changing_settings_throws_no_validation_errors_and_verify_visibility_of_generated_plots. | | shinytest2-tm_a_mmrm | 💚 | $15.44$ | $-2.26$ | e2e_tm_a_mmrm_Function_t_mmrm_lsmeans_selection_shows_output_settings_changing_settings_throws_no_validation_errors_and_verify_visibility_of_generated_tables. | | shinytest2-tm_a_mmrm | 💚 | $32.25$ | $-4.16$ | e2e_tm_a_mmrm_Validate_output_on_different_selection_on_method_g_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $52.43$ | $-6.67$ | e2e_tm_a_mmrm_Validate_output_on_different_selection_on_method_g_mmrm_lsmeans. | | shinytest2-tm_a_mmrm | 💚 | $52.46$ | $-6.85$ | e2e_tm_a_mmrm_Validate_output_on_different_selection_on_method_t_mmrm_cov. | | shinytest2-tm_a_mmrm | 💚 | $52.54$ | $-7.21$ | e2e_tm_a_mmrm_Validate_output_on_different_selection_on_method_t_mmrm_diagnostic. | | shinytest2-tm_a_mmrm | 💚 | $52.63$ | $-7.10$ | e2e_tm_a_mmrm_Validate_output_on_different_selection_on_method_t_mmrm_fixed. | | shinytest2-tm_a_mmrm | 💚 | $53.30$ | $-5.54$ | e2e_tm_a_mmrm_Validate_output_on_different_selection_on_method_t_mmrm_lsmeans. | | shinytest2-tm_g_km | 💚 | $26.77$ | $-1.64$ | e2e_tm_g_km_Starts_with_specified_collapsed_additional_plot_settings. | | shinytest2-tm_g_km | 💚 | $13.70$ | $-2.06$ | e2e_tm_g_km_Starts_with_specified_collapsed_comparison_settings. | | shinytest2-tm_g_pp_therapy | 💚 | $8.64$ | $-1.09$ | e2e_tm_g_pp_therapy_Selection_of_cmroute_changes_the_plot_and_table_without_any_validation_errors. | | shinytest2-tm_t_abnormality_by_worst_grade | 💚 | $9.30$ | $-1.23$ | e2e_tm_t_abnormality_by_worst_grade_Changing_drop_arm_levels_does_not_change_the_table_and_does_not_throw_validation_errors. | | shinytest2-tm_t_abnormality_by_worst_grade | 💚 | $8.60$ | $-1.01$ | e2e_tm_t_abnormality_by_worst_grade_Deselection_of_arm_var_throws_validation_error. | | shinytest2-tm_t_abnormality_by_worst_grade | 💚 | $11.66$ | $-2.49$ | e2e_tm_t_abnormality_by_worst_grade_Module_initializes_in_teal_without_errors_and_produces_table_output. | | shinytest2-tm_t_abnormality_by_worst_grade | 💚 | $9.06$ | $-1.10$ | e2e_tm_t_abnormality_by_worst_grade_Selecting_paramcd_changes_the_table_and_does_not_throw_validation_errors. | | shinytest2-tm_t_exposure | 💚 | $8.32$ | $-1.12$ | e2e_tm_t_exposure_Selecting_parcat_changes_the_table_and_does_not_throw_validation_errors. |

Results for commit f67d6885795b70ca9b46c417189893ed91a8fb8c

♻️ This comment has been updated with latest results.

m7pr commented 2 weeks ago

@pawelru if logger is able to guess the namespace inside a package, maybe we do not need to specify namespace = "teal.modules.clinical" in every call of log_shiny_input_changes

namespace   
string referring to the logger environment / config to be used to override the target of the message record to be used instead of the default namespace, which is defined by the R package name from which the logger was called, and falls back to a common, global namespace.
m7pr commented 2 weeks ago

In this case namespace = "teal.modules.clinical" is needed, becuase if we omit it, it falls back to namespace = "teal.logger" : )

pawelru commented 2 weeks ago

This I don't know. Definitely worth to check

m7pr commented 2 weeks ago

I'm experiencing very funny issue in R CMD CHECK failures

* checking dependencies in R code ... WARNING
'::' or ':::' import not declared from: ‘jsonlite’

It's the jsonlite package that is not included in tmc but is used in

log_shiny_input_changes <- getFromNamespace("log_shiny_input_changes", "teal.logger")

Maybe we just need to export log_shiny_input_changes in teal.logger and regularly call teal.logger::log_shiny_input_changes