insightsengineering / teal.modules.general

General Purpose Teal Modules
https://insightsengineering.github.io/teal.modules.general/
Other
9 stars 13 forks source link

Unifying shinytest2 #739

Closed kartikeyakirar closed 7 months ago

kartikeyakirar commented 7 months ago

Few improvements to unify the shinytest2

github-actions[bot] commented 7 months ago

badge

Code Coverage Summary

Filename                      Stmts    Miss  Cover    Missing
--------------------------  -------  ------  -------  ------------------------------------
R/tm_a_pca.R                    833     833  0.00%    108-1074
R/tm_a_regression.R             779     779  0.00%    153-1037
R/tm_data_table.R               184     184  0.00%    93-330
R/tm_file_viewer.R              172     172  0.00%    44-250
R/tm_front_page.R               132     121  8.33%    70-226
R/tm_g_association.R            336     336  0.00%    135-543
R/tm_g_bivariate.R              678     416  38.64%   303-775, 816, 927, 944, 962, 973-995
R/tm_g_distribution.R          1056    1056  0.00%    122-1317
R/tm_g_response.R               357     357  0.00%    154-584
R/tm_g_scatterplot.R            728     728  0.00%    230-1059
R/tm_g_scatterplotmatrix.R      284     265  6.69%    165-478, 539, 553
R/tm_missing_data.R            1075    1075  0.00%    92-1323
R/tm_outliers.R                 991     991  0.00%    134-1269
R/tm_t_crosstable.R             257     257  0.00%    141-446
R/tm_variable_browser.R         829     824  0.60%    79-1069, 1107-1291
R/utils.R                        99      96  3.03%    82-267
R/zzz.R                           2       2  0.00%    2-3
TOTAL                          8792    8492  3.41%

Diff against main

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

Results for commit: dfb495575446ecbc260e012d353ea01e9e26a7e4

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 7 months ago

Unit Tests Summary

  1 files   22 suites   10m 27s :stopwatch: 147 tests 147 :white_check_mark: 0 :zzz: 0 :x: 478 runs  478 :white_check_mark: 0 :zzz: 0 :x:

Results for commit ab9bff66.

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

github-actions[bot] commented 7 months ago

Unit Test Performance Difference

Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | shinytest2-tm_a_pca | 💀 | $8.75$ | $-8.75$ | e2e_tm_a_pca_Changing_output_encodings_for_plot_type_does_not_generate_errors | | shinytest2-tm_a_pca | 👶 | | $+8.66$ | e2e_tm_a_pca_Changing_output_encodings_for_plot_type_does_not_generate_errors. | | shinytest2-tm_a_pca | 💀 | $8.00$ | $-8.00$ | e2e_tm_a_pca_Changing_output_encodings_of_NA_action_does_not_generate_errors | | shinytest2-tm_a_pca | 👶 | | $+5.17$ | e2e_tm_a_pca_Changing_output_encodings_of_NA_action_does_not_generate_errors. | | shinytest2-tm_a_pca | 💀 | $27.53$ | $-27.53$ | e2e_tm_a_pca_Changing_output_encodings_of_font_size_does_not_generate_errors | | shinytest2-tm_a_pca | 👶 | | $+27.61$ | e2e_tm_a_pca_Changing_output_encodings_of_font_size_does_not_generate_errors. | | shinytest2-tm_a_pca | 💀 | $7.19$ | $-7.19$ | e2e_tm_a_pca_Changing_output_encodings_of_plot_type_hides_and_shows_options | | shinytest2-tm_a_pca | 👶 | | $+7.24$ | e2e_tm_a_pca_Changing_output_encodings_of_plot_type_hides_and_shows_options. | | shinytest2-tm_a_pca | 💀 | $5.20$ | $-5.20$ | e2e_tm_a_pca_Changing_output_encodings_of_standardization_does_not_generate_errors | | shinytest2-tm_a_pca | 👶 | | $+8.04$ | e2e_tm_a_pca_Changing_output_encodings_of_standardization_does_not_generate_errors. | | shinytest2-tm_a_pca | 💀 | $6.12$ | $-6.12$ | e2e_tm_a_pca_Changing_output_encodings_of_tables_display_does_not_generate_errors | | shinytest2-tm_a_pca | 👶 | | $+6.06$ | e2e_tm_a_pca_Changing_output_encodings_of_tables_display_does_not_generate_errors. | | shinytest2-tm_a_pca | 💀 | $6.90$ | $-6.90$ | e2e_tm_a_pca_Changing_output_encodings_of_theme_does_not_generate_errors | | shinytest2-tm_a_pca | 👶 | | $+6.78$ | e2e_tm_a_pca_Changing_output_encodings_of_theme_does_not_generate_errors. | | shinytest2-tm_a_pca | 💀 | $7.63$ | $-7.63$ | e2e_tm_a_pca_Color_by_columns_data_extract_must_be_from_non_selected_variable_set | | shinytest2-tm_a_pca | 👶 | | $+7.89$ | e2e_tm_a_pca_Color_by_columns_data_extract_must_be_from_non_selected_variable_set. | | shinytest2-tm_a_pca | 💀 | $5.64$ | $-5.64$ | e2e_tm_a_pca_Eigenvector_table_should_have_data_extract_selection_Murder_Assault_on_header | | shinytest2-tm_a_pca | 👶 | | $+5.65$ | e2e_tm_a_pca_Eigenvector_table_should_have_data_extract_selection_Murder_Assault_on_header. | | shinytest2-tm_a_pca | 💀 | $7.77$ | $-7.77$ | e2e_tm_a_pca_Eigenvector_table_should_have_data_extract_selection_Murder_UrbanPop_on_header | | shinytest2-tm_a_pca | 👶 | | $+7.64$ | e2e_tm_a_pca_Eigenvector_table_should_have_data_extract_selection_Murder_UrbanPop_on_header. | | shinytest2-tm_a_pca | 👶 | | $+6.65$ | e2e_tm_a_pca_Module_is_initialised_with_the_specified_defaults_in_function_call. | | shinytest2-tm_a_pca | 💀 | $6.73$ | $-6.73$ | e2e_tm_a_pca_module_is_initialised_with_the_specified_defaults_in_function_call | | shinytest2-tm_a_regression | 👶 | | $+4.88$ | e2e_tm_a_regression_Data_extract_spec_elements_are_initialized_with_the_default_values_specified_by_response_and_regressor_arg. | | shinytest2-tm_a_regression | 👶 | | $+4.63$ | e2e_tm_a_regression_Data_parameter_and_module_label_is_passed_properly. | | shinytest2-tm_a_regression | 👶 | | $+4.69$ | e2e_tm_a_regression_Outlier_definition_and_label_are_visible_by_default. | | shinytest2-tm_a_regression | 👶 | | $+4.79$ | e2e_tm_a_regression_Outlier_definition_and_label_have_default_values_and_label_text. | | shinytest2-tm_a_regression | 👶 | | $+11.38$ | e2e_tm_a_regression_Plot_type_has_7_specific_choices_changing_choices_does_not_throw_errors. | | shinytest2-tm_a_regression | 👶 | | $+5.82$ | e2e_tm_a_regression_Plot_type_is_set_properly. | | shinytest2-tm_a_regression | 👶 | | $+5.76$ | e2e_tm_a_regression_Unchecking_display_outlier_hides_outlier_label_and_definition. | | shinytest2-tm_a_regression | 💀 | $4.85$ | $-4.85$ | e2e_tm_a_regression_data_extract_spec_elements_are_initialized_with_the_default_values_specified_by_response_and_regressor_arg | | shinytest2-tm_a_regression | 💀 | $4.74$ | $-4.74$ | e2e_tm_a_regression_data_parameter_and_module_label_is_passed_properly | | shinytest2-tm_a_regression | 💀 | $4.66$ | $-4.66$ | e2e_tm_a_regression_outlier_definition_and_label_are_visible_by_default | | shinytest2-tm_a_regression | 💀 | $4.82$ | $-4.82$ | e2e_tm_a_regression_outlier_definition_and_label_have_default_values_and_label_text | | shinytest2-tm_a_regression | 💀 | $11.41$ | $-11.41$ | e2e_tm_a_regression_plot_type_has_7_specific_choices_changing_choices_does_not_throw_errors | | shinytest2-tm_a_regression | 💀 | $5.88$ | $-5.88$ | e2e_tm_a_regression_plot_type_is_set_properly | | shinytest2-tm_a_regression | 💀 | $5.75$ | $-5.75$ | e2e_tm_a_regression_unchecking_display_outlier_hides_outlier_label_and_definition | | shinytest2-tm_g_association | 👶 | | $+8.45$ | e2e_tm_g_association_Check_and_set_default_values_for_radio_buttons. | | shinytest2-tm_g_association | 👶 | | $+8.00$ | e2e_tm_g_association_Data_extract_spec_elements_are_initialized_with_the_default_values_specified_by_ref_and_vars_arguments. | | shinytest2-tm_g_association | 👶 | | $+5.72$ | e2e_tm_g_association_Data_parameter_and_module_label_is_passed_properly. | | shinytest2-tm_g_association | 👶 | | $+5.76$ | e2e_tm_g_association_Module_plot_is_visible. | | shinytest2-tm_g_association | 💀 | $8.20$ | $-8.20$ | e2e_tm_g_association_data_extract_spec_elements_are_initialized_with_the_default_values_specified_by_ref_and_vars_arguments | | shinytest2-tm_g_association | 💀 | $5.78$ | $-5.78$ | e2e_tm_g_association_data_parameter_and_module_label_is_passed_properly | | shinytest2-tm_g_association | 💀 | $5.93$ | $-5.93$ | e2e_tm_g_association_module_plot_is_visible | | shinytest2-tm_g_association | 💀 | $8.44$ | $-8.44$ | e2e_tm_g_association_test_if_default_radio_buttons_are_checked | | shinytest2-tm_g_bivariate | 👶 | | $+6.20$ | e2e_tm_g_bivariate_Coloring_options_are_hidden_when_coloring_is_toggled_off. | | shinytest2-tm_g_bivariate | 👶 | | $+6.22$ | e2e_tm_g_bivariate_Facetting_options_are_hidden_when_facet_is_toggled_off. | | shinytest2-tm_g_bivariate | 👶 | | $+5.98$ | e2e_tm_g_bivariate_Module_is_initialised_with_the_specified_defaults. | | shinytest2-tm_g_bivariate | 👶 | | $+23.93$ | e2e_tm_g_bivariate_Setting_encoding_inputs_produces_outputs_without_validation_errors. | | shinytest2-tm_g_bivariate | 💀 | $6.35$ | $-6.35$ | e2e_tm_g_bivariate_coloring_options_are_hidden_when_coloring_is_toggled_off | | shinytest2-tm_g_bivariate | 💀 | $6.30$ | $-6.30$ | e2e_tm_g_bivariate_facetting_options_are_hidden_when_facet_is_toggled_off | | shinytest2-tm_g_bivariate | 💀 | $6.36$ | $-6.36$ | e2e_tm_g_bivariate_module_is_initialised_with_the_specified_defaults | | shinytest2-tm_g_bivariate | 💀 | $24.25$ | $-24.25$ | e2e_tm_g_bivariate_setting_encoding_inputs_produces_outputs_without_validation_errors | | shinytest2-tm_g_distribution | 👶 | | $+14.31$ | e2e_tm_g_distribution_Histogram_encoding_inputs_produce_output_without_validation_errors. | | shinytest2-tm_g_distribution | 👶 | | $+31.07$ | e2e_tm_g_distribution_Module_is_initialised_with_the_specified_defaults. | | shinytest2-tm_g_distribution | 👶 | | $+9.14$ | e2e_tm_g_distribution_QQ_plot_encoding_inputs_produce_output_without_validation_errors. | | shinytest2-tm_g_distribution | 💀 | $14.59$ | $-14.59$ | e2e_tm_g_distribution_histogram_encoding_inputs_produce_output_without_validation_errors | | shinytest2-tm_g_distribution | 💀 | $31.15$ | $-31.15$ | e2e_tm_g_distribution_module_is_initialised_with_the_specified_defaults | | shinytest2-tm_g_distribution | 💀 | $9.09$ | $-9.09$ | e2e_tm_g_distribution_qqplot_encoding_inputs_produce_output_without_validation_errors | | shinytest2-tm_g_response | 💀 | $5.42$ | $-5.42$ | e2e_tm_g_response_deselecting_response_produces_validation_error | | shinytest2-tm_g_response | 👶 | | $+5.23$ | e2e_tm_g_response_deselecting_response_produces_validation_error. | | shinytest2-tm_g_response | 💀 | $5.43$ | $-5.43$ | e2e_tm_g_response_deselecting_x_produces_validation_error | | shinytest2-tm_g_response | 👶 | | $+5.38$ | e2e_tm_g_response_deselecting_x_produces_validation_error. | | shinytest2-tm_g_response | 💀 | $11.12$ | $-11.12$ | e2e_tm_g_response_encoding_inputs_produce_output_without_validation_errors | | shinytest2-tm_g_response | 👶 | | $+11.09$ | e2e_tm_g_response_encoding_inputs_produce_output_without_validation_errors. | | shinytest2-tm_g_response | 💀 | $5.79$ | $-5.79$ | e2e_tm_g_response_module_is_initialised_with_the_specified_defaults | | shinytest2-tm_g_response | 👶 | | $+5.22$ | e2e_tm_g_response_module_is_initialised_with_the_specified_defaults. | | shinytest2-tm_g_scatterplot | 👶 | | $+8.25$ | e2e_tm_g_scatterplot_Base_for_the_log_transformation_can_be_applied. | | shinytest2-tm_g_scatterplot | 👶 | | $+6.87$ | e2e_tm_g_scatterplot_Get_validation_error_when_facetting_with_the_same_row_col_variable. | | shinytest2-tm_g_scatterplot | 👶 | | $+5.92$ | e2e_tm_g_scatterplot_Module_is_initialised_with_the_specified_defaults. | | shinytest2-tm_g_scatterplot | 👶 | | $+42.01$ | e2e_tm_g_scatterplot_The_encoding_inputs_produce_output_without_validation_errors. | | shinytest2-tm_g_scatterplot | 👶 | | $+8.71$ | e2e_tm_g_scatterplot_The_log_transform_is_only_possible_for_positive_numeric_vars. | | shinytest2-tm_g_scatterplot | 💀 | $8.32$ | $-8.32$ | e2e_tm_g_scatterplot_base_for_the_log_transformation_can_be_applied | | shinytest2-tm_g_scatterplot | 💀 | $42.30$ | $-42.30$ | e2e_tm_g_scatterplot_encoding_inputs_produce_output_without_validation_errors | | shinytest2-tm_g_scatterplot | 💀 | $6.97$ | $-6.97$ | e2e_tm_g_scatterplot_get_validation_error_when_facetting_with_the_same_row_col_variable | | shinytest2-tm_g_scatterplot | 💀 | $8.71$ | $-8.71$ | e2e_tm_g_scatterplot_log_transform_is_only_possible_for_positive_numeric_vars | | shinytest2-tm_g_scatterplot | 💀 | $6.20$ | $-6.20$ | e2e_tm_g_scatterplot_module_is_initialised_with_the_specified_defaults | | shinytest2-tm_outliers | 👶 | | $+9.05$ | e2e_tm_outliers_Data_extract_spec_elements_are_initialized_with_the_default_values_specified_by_outlier_var_and_categorical_var_argument. | | shinytest2-tm_outliers | 👶 | | $+5.77$ | e2e_tm_outliers_Data_parameter_and_module_label_is_passed_properly. | | shinytest2-tm_outliers | 👶 | | $+8.53$ | e2e_tm_outliers_Default_radio_buttons_are_set_properly. | | shinytest2-tm_outliers | 👶 | | $+5.96$ | e2e_tm_outliers_Method_parameters_are_set_properly. | | shinytest2-tm_outliers | 👶 | | $+5.85$ | e2e_tm_outliers_Module_is_divided_into_3_tabs. | | shinytest2-tm_outliers | 👶 | | $+12.25$ | e2e_tm_outliers_Outlier_definition_text_and_range_are_displayed_properly_depending_on_method. | | shinytest2-tm_outliers | 👶 | | $+8.40$ | e2e_tm_outliers_Outlier_table_is_displayed_with_proper_content. | | shinytest2-tm_outliers | 👶 | | $+9.63$ | e2e_tm_outliers_Outliers_summary_table_is_displayed_with_proper_content. | | shinytest2-tm_outliers | 👶 | | $+7.71$ | e2e_tm_outliers_Plot_type_is_correctly_set_by_default_and_has_appropriate_possible_options. | | shinytest2-tm_outliers | 👶 | | $+9.43$ | e2e_tm_outliers_Plot_type_is_hidden_when_Boxplot_tab_is_not_selected. | | shinytest2-tm_outliers | 💀 | $9.04$ | $-9.04$ | e2e_tm_outliers_data_extract_spec_elements_are_initialized_with_the_default_values_specified_by_outlier_var_and_categorical_var_argument | | shinytest2-tm_outliers | 💀 | $5.98$ | $-5.98$ | e2e_tm_outliers_data_parameter_and_module_label_is_passed_properly | | shinytest2-tm_outliers | 💀 | $7.42$ | $-7.42$ | e2e_tm_outliers_default_plot_type_is_set_properly_and_has_proper_possible_choices | | shinytest2-tm_outliers | 💀 | $8.76$ | $-8.76$ | e2e_tm_outliers_default_radio_buttons_are_set_properly | | shinytest2-tm_outliers | 💀 | $6.05$ | $-6.05$ | e2e_tm_outliers_method_parameters_are_set_properly | | shinytest2-tm_outliers | 💀 | $5.88$ | $-5.88$ | e2e_tm_outliers_module_is_divided_into_3_tabs | | shinytest2-tm_outliers | 💀 | $11.88$ | $-11.88$ | e2e_tm_outliers_outlier_definition_text_and_range_are_displayed_properly_depending_on_method | | shinytest2-tm_outliers | 💀 | $8.61$ | $-8.61$ | e2e_tm_outliers_outlier_table_is_displayed_with_proper_content | | shinytest2-tm_outliers | 💀 | $9.60$ | $-9.60$ | e2e_tm_outliers_outliers_summary_table_is_displayed_with_proper_content | | shinytest2-tm_outliers | 💀 | $9.60$ | $-9.60$ | e2e_tm_outliers_plot_type_is_hidden_when_Boxplot_tab_is_not_selected | | shinytest2-tm_variable_browser | 💀 | $8.60$ | $-8.60$ | e2e_tm_variable_browser_Selecting_treat_variable_as_factor_changes_the_table_headers | | shinytest2-tm_variable_browser | 👶 | | $+8.61$ | e2e_tm_variable_browser_Selecting_treat_variable_as_factor_changes_the_table_headers. | | shinytest2-tm_variable_browser | 💀 | $7.03$ | $-7.03$ | e2e_tm_variable_browser_changing_display_density_encoding_doesn_t_show_errors | | shinytest2-tm_variable_browser | 👶 | | $+6.94$ | e2e_tm_variable_browser_changing_display_density_encoding_doesn_t_show_errors. | | shinytest2-tm_variable_browser | 💀 | $8.01$ | $-8.01$ | e2e_tm_variable_browser_changing_outlier_definition_encoding_doesn_t_show_errors | | shinytest2-tm_variable_browser | 👶 | | $+7.74$ | e2e_tm_variable_browser_changing_outlier_definition_encoding_doesn_t_show_errors. | | shinytest2-tm_variable_browser | 💀 | $11.97$ | $-11.97$ | e2e_tm_variable_browser_changing_plot_setting_encodings_doesn_t_show_errors | | shinytest2-tm_variable_browser | 👶 | | $+11.96$ | e2e_tm_variable_browser_changing_plot_setting_encodings_doesn_t_show_errors. | | shinytest2-tm_variable_browser | 💀 | $5.67$ | $-5.67$ | e2e_tm_variable_browser_content_is_displayed_correctly | | shinytest2-tm_variable_browser | 👶 | | $+5.52$ | e2e_tm_variable_browser_content_is_displayed_correctly. | | shinytest2-tm_variable_browser | 💀 | $6.89$ | $-6.89$ | e2e_tm_variable_browser_selection_of_categorical_variable_has_a_table_with_level_header | | shinytest2-tm_variable_browser | 👶 | | $+7.03$ | e2e_tm_variable_browser_selection_of_categorical_variable_has_a_table_with_level_header. |

Results for commit 680d04b17d22dc6f4a16aef1ce926d9877a43119

♻️ This comment has been updated with latest results.

m7pr commented 7 months ago

@kartikeyakirar should we end up description with a comma if we start with a title case :P?

kartikeyakirar commented 7 months ago

Are you referring to the comma after the double quote? test_that(desc, code)

m7pr commented 7 months ago

Oh sorry. I meant . (dot) : ) dot at the end of the sentence

"e2e - tm_a_pca: Module is initialised with the specified defaults in function call"
->
"e2e - tm_a_pca: Module is initialised with the specified defaults in function call."
kartikeyakirar commented 7 months ago

Got it. testthat doesn’t strictly enforce ending descriptions with a period. it's more about maintaining consistency and Lets do this. I will update it. 👍

m7pr commented 7 months ago

you have failed tests, try to rerun with an empty commit