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

87 remove datasets - decrease package size #228

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Conversation

m7pr
Copy link
Contributor

@m7pr m7pr commented Dec 13, 2024

In the spirit of package size reduction insightsengineering/nestdevs-tasks#87
I replaced all the calls for tmg datasets with their respective datasets from teal.data.
This way we no longer need to have datasets copies in tmg.

Copy link
Contributor

github-actions bot commented Dec 13, 2024

Unit Tests Summary

  1 files   24 suites   6s ⏱️
189 tests 172 ✅ 17 💤 0 ❌
651 runs  634 ✅ 17 💤 0 ❌

Results for commit 20bef3d.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 13, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
data_extract_module 💀 $0.19$ $-0.19$ $-11$ $0$ $0$ $0$
data_extract_multiple_srv 💀 $0.38$ $-0.38$ $-14$ $-5$ $0$ $0$
data_extract_spec 💀 $0.35$ $-0.35$ $-68$ $-1$ $0$ $0$
data_extract_srv 💀 $1.32$ $-1.32$ $-47$ $-4$ $0$ $0$
delayed_data_extract 💀 $0.08$ $-0.08$ $-5$ $0$ $0$ $0$
filter_spec 💀 $0.39$ $-0.39$ $-81$ $-2$ $0$ $0$
resolve 💀 $0.16$ $-0.16$ $-16$ $0$ $0$ $0$
resolve_delayed 💀 $0.28$ $-0.28$ $-14$ $0$ $0$ $0$
select_spec 💀 $0.18$ $-0.18$ $-59$ $0$ $0$ $0$
value_choices 💀 $0.14$ $-0.14$ $-19$ $0$ $0$ $0$
variable_choices 💀 $0.05$ $-0.05$ $-15$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
data_extract_datanames 👶 $+0.07$ unnamed
data_extract_module 💀 $0.07$ $-0.07$ Multiple_datasets
data_extract_module 💀 $0.03$ $-0.03$ Multiple_filters
data_extract_module 💀 $0.10$ $-0.10$ Single_filter
data_extract_multiple_srv 💀 $0.03$ $-0.03$ data_extract_multiple_srv_accepts_a_named_list_of_data_extract_spec_
data_extract_multiple_srv 💀 $0.01$ $-0.01$ data_extract_multiple_srv_accepts_an_empty_list
data_extract_multiple_srv 💀 $0.01$ $-0.01$ data_extract_multiple_srv_accepts_datasets_as_FilteredData
data_extract_multiple_srv 💀 $0.02$ $-0.02$ data_extract_multiple_srv_accepts_datasets_as_list_of_data.frame
data_extract_multiple_srv 💀 $0.02$ $-0.02$ data_extract_multiple_srv_accepts_datasets_list_of_reactive_data.frame
data_extract_multiple_srv 💀 $0.01$ $-0.01$ data_extract_multiple_srv_accepts_throws_error_when_join_keys_argument_is_not_join_keys_object
data_extract_multiple_srv 💀 $0.01$ $-0.01$ data_extract_multiple_srv_prunes_NULL_from_the_passed_list
data_extract_multiple_srv 💀 $0.18$ $-0.18$ data_extract_multiple_srv_returns_a_named_reactive_list_with_reactives
data_extract_multiple_srv 💀 $0.03$ $-0.03$ data_extract_multiple_srv_returns_an_empty_list_if_passed_an_empty_list
data_extract_multiple_srv 💀 $0.02$ $-0.02$ data_extract_multiple_srv_throws_error_if_datasets_is_not_FilteredData_or_list_of_reactive_data.frame
data_extract_multiple_srv 💀 $0.01$ $-0.01$ data_extract_multiple_srv_throws_if_data_extract_is_not_a_named_list
data_extract_multiple_srv 💀 $0.01$ $-0.01$ data_extract_multiple_srv_works_with_join_keys_NULL_default_
data_extract_spec 💀 $0.01$ $-0.01$ data_extract_spec_allows_both_select_and_filter_parameters_to_be_NULL
data_extract_spec 💀 $0.02$ $-0.02$ data_extract_spec_returns_filter_spec_with_multiple_set_to_TRUE
data_extract_spec 💀 $0.02$ $-0.02$ data_extract_spec_returns_select_spec_with_multiple_set_to_TRUE
data_extract_spec 💀 $0.01$ $-0.01$ data_extract_spec_throws_when_select_is_not_select_spec_or_NULL
data_extract_spec 💀 $0.03$ $-0.03$ data_extract_spec_works_with_valid_input
data_extract_spec 💀 $0.05$ $-0.05$ delayed_data_extract_spec_works
data_extract_spec 💀 $0.04$ $-0.04$ delayed_data_extract_spec_works_resolve_delayed
data_extract_spec 💀 $0.08$ $-0.08$ delayed_version_of_data_extract_spec
data_extract_spec 💀 $0.08$ $-0.08$ delayed_version_of_data_extract_spec_resolve_delayed
data_extract_srv 💀 $0.25$ $-0.25$ data_extract_multiple_srv_input_validation
data_extract_srv 💀 $0.01$ $-0.01$ data_extract_srv_accepts_throws_error_when_join_keys_argument_is_not_a_join_keys_object
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_datasets_accepts_a_FilteredData
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_datasets_accepts_a_list_of_data_frames
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_datasets_accepts_a_mixed_list_of_reactive_and_not_reactive_data_frames
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_datasets_accepts_list_of_reactive_data_frames
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_returns_a_list_of_elements
data_extract_srv 💀 $0.05$ $-0.05$ data_extract_srv_returns_select_ordered_according_to_choices
data_extract_srv 💀 $0.09$ $-0.09$ data_extract_srv_returns_select_ordered_according_to_selection
data_extract_srv 💀 $0.03$ $-0.03$ data_extract_srv_throws_error_when_data_extract_spec_is_missing
data_extract_srv 💀 $0.12$ $-0.12$ data_extract_srv_throws_when_data_extract_spec_don_t_get_data_extract_spec_object
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_uses_the_current_session_id_when_id_is_missing
data_extract_srv 💀 $0.05$ $-0.05$ data_extract_srv_with_a_list_of_multiple_data_extract_spec
data_extract_srv 💀 $0.04$ $-0.04$ data_extract_srv_works_with_join_keys_NULL_default_
data_extract_srv 💀 $0.08$ $-0.08$ filter_validation
data_extract_srv 💀 $0.14$ $-0.14$ select_validation
data_extract_srv 💀 $0.08$ $-0.08$ select_validation_accepts_function_as_validator
data_extract_srv 💀 $0.14$ $-0.14$ validation_only_runs_on_currently_selected_dataset_s_data_extract_spec
delayed_data_extract 💀 $0.01$ $-0.01$ Delayed_choices_selected_single_data_connector_with_two_scda_dataset_connectors
delayed_data_extract 💀 $0.03$ $-0.03$ Delayed_data_extract_filtered
delayed_data_extract 💀 $0.04$ $-0.04$ Delayed_data_extract_single_data_connector_with_two_scda_dataset_connectors
dplyr_call_examples 👶 $+0.01$ unnamed
filter_spec 💀 $0.01$ $-0.01$ Dropping_keys_attribute
filter_spec 💀 $0.02$ $-0.02$ Multiple_choices
filter_spec 💀 $0.05$ $-0.05$ Multiple_vars
filter_spec 💀 $0.07$ $-0.07$ Proper_argument_types
filter_spec 💀 $0.01$ $-0.01$ Single_choice
filter_spec 💀 $0.00$ $-0.00$ all_choices_passed_to_selected_identical_to_all_choices
filter_spec 💀 $0.02$ $-0.02$ delayed_filter_spec
filter_spec 💀 $0.02$ $-0.02$ delayed_filter_spec_resolve_delayed
filter_spec 💀 $0.01$ $-0.01$ delayed_filter_spec_works
filter_spec 💀 $0.02$ $-0.02$ delayed_filter_spec_works_resolve_delayed
filter_spec 💀 $0.06$ $-0.06$ delayed_version_of_filter_spec
filter_spec 💀 $0.06$ $-0.06$ delayed_version_of_filter_spec_resolve_delayed
filter_spec 💀 $0.02$ $-0.02$ filter_spec_internal
filter_spec 💀 $0.01$ $-0.01$ filter_spec_internal_contains_dataname
filter_spec 💀 $0.00$ $-0.00$ filter_spec_with_choices_selected_where_all_selected_in_choices_does_not_throw_an_error
filter_spec 💀 $0.00$ $-0.00$ filter_spec_with_choices_selected_where_all_selected_in_choices_does_not_throw_an_error_resolve_delayed
merge_utils 👶 $+0.06$ unnamed
resolve 💀 $0.04$ $-0.04$ resolve.list_works_correctly
resolve 💀 $0.07$ $-0.07$ resolve_delayed_expr_works_correctly
resolve 💀 $0.01$ $-0.01$ resolve_throws_error_with_missing_arguments
resolve 💀 $0.01$ $-0.01$ resolve_throws_error_with_non_reactive_data.frames_or_unnamed_list_as_input_to_datasets
resolve 💀 $0.01$ $-0.01$ resolve_throws_error_with_unnamed_list_or_wrong_names_as_input_to_keys
resolve_delayed 💀 $0.07$ $-0.07$ resolve_delayed.FilteredData_works_correctly
resolve_delayed 💀 $0.08$ $-0.08$ resolve_delayed.list_works_correctly_with_non_reactive_objects
resolve_delayed 💀 $0.08$ $-0.08$ resolve_delayed.list_works_correctly_with_reactive_objects
resolve_delayed 💀 $0.04$ $-0.04$ resolve_delayed_expr_works_correctly
resolve_delayed 💀 $0.01$ $-0.01$ resolving_delayed_choices_removes_selected_not_in_choices_and_give_a_log_output
select_spec 💀 $0.03$ $-0.03$ Multiple_choices
select_spec 💀 $0.04$ $-0.04$ Proper_argument_types
select_spec 💀 $0.03$ $-0.03$ Single_choice
select_spec 💀 $0.00$ $-0.00$ all_choices_passed_to_selected_is_the_same_as_passing_all_choices
select_spec 💀 $0.02$ $-0.02$ default_values
select_spec 💀 $0.02$ $-0.02$ delayed_version_of_select_spec
select_spec 💀 $0.02$ $-0.02$ delayed_version_of_select_spec_resolve_delayed
select_spec 💀 $0.01$ $-0.01$ multiple_is_set_to_TRUE_if_all_choices_is_passed_to_selected
select_spec 💀 $0.01$ $-0.01$ resolve_delayed_select_spec_works_resolve_delayed
select_spec 💀 $0.01$ $-0.01$ resolve_select_spec_works
value_choices 💀 $0.04$ $-0.04$ Will_output_warnings_when_value_choices_applied_on_datasets_with_missing_values_and_or_labels
value_choices 💀 $0.05$ $-0.05$ delayed_version_of_value_choices
value_choices 💀 $0.05$ $-0.05$ delayed_version_of_value_choices_resolve_delayed
variable_choices 💀 $0.01$ $-0.01$ Can_create_variable_choices_with_datasets_with_no_or_missing_labels
variable_choices 💀 $0.02$ $-0.02$ delayed_version_of_variable_choices
variable_choices 💀 $0.02$ $-0.02$ delayed_version_of_variable_choices_resolve_delayed

Results for commit 8014d45

♻️ This comment has been updated with latest results.

Copy link

@llrs-roche llrs-roche left a comment

Choose a reason for hiding this comment

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

Looks good but I think you forgot to add teal.data:: on test-data_extract_srv.R and several other test files:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-data_extract_module.R:1:1'): (code run outside of `test_that()`) ──
Error in `eval(code, test_env)`: object 'rADLB' not found
── Error ('test-data_extract_multiple_srv.R:1:1'): (code run outside of `test_that()`) ──
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-data_extract_spec.R:1:1'): (code run outside of `test_that()`) ──
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-data_extract_srv.R:1:1'): (code run outside of `test_that()`) ──
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-delayed_data_extract.R:3:1'): (code run outside of `test_that()`) ──
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-filter_spec.R:1:1'): (code run outside of `test_that()`) ───────
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-resolve.R:1:1'): (code run outside of `test_that()`) ───────────
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-resolve_delayed.R:1:1'): (code run outside of `test_that()`) ───
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-select_spec.R:1:1'): (code run outside of `test_that()`) ───────
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-value_choices.R:1:1'): (code run outside of `test_that()`) ─────
Error in `eval(code, test_env)`: object 'rADSL' not found
── Error ('test-variable_choices.R:1:1'): (code run outside of `test_that()`) ──
Error in `eval(code, test_env)`: object 'rADSL' not found

@m7pr
Copy link
Contributor Author

m7pr commented Dec 13, 2024

Ah, sorry for that! Looks like my substitutitions were limited just to R folder

@m7pr m7pr requested a review from llrs-roche December 13, 2024 13:33
@m7pr
Copy link
Contributor Author

m7pr commented Dec 13, 2024

@llrs-roche would you revisit this PR?

Copy link
Contributor

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  ------------------------------------------------------------------------------
R/all_choices.R                       1       0  100.00%
R/call_utils.R                      156     124  20.51%   19-28, 65, 67, 69, 102-345
R/check_selector.R                   33       0  100.00%
R/choices_labeled.R                 153      27  82.35%   68, 74, 79, 86, 102, 220-224, 228-233, 353-354, 356, 362, 389-396
R/choices_selected.R                 81      11  86.42%   210-238, 275
R/column_functions.R                  3       3  0.00%    15-18
R/data_extract_datanames.R           30       8  73.33%   16-20, 83-85
R/data_extract_filter_module.R      102      47  53.92%   91-104, 106-107, 109-126, 142-161
R/data_extract_module.R             298      67  77.52%   128, 133, 150, 153-158, 160, 179-182, 212-258, 497, 502, 679, 690-691, 769-774
R/data_extract_read_module.R        137       7  94.89%   34, 39-41, 43, 138, 155
R/data_extract_select_module.R       32      18  43.75%   29-46
R/data_extract_single_module.R       60       2  96.67%   30, 43
R/data_extract_spec.R                32       0  100.00%
R/filter_spec.R                     186       1  99.46%   280
R/format_data_extract.R              16       1  93.75%   48
R/get_dplyr_call.R                  297       0  100.00%
R/get_merge_call.R                  278      29  89.57%   32-38, 49, 215-224, 391, 407-419
R/include_css_js.R                    5       0  100.00%
R/input_checks.R                     11       2  81.82%   17-18
R/merge_data_utils.R                  2       0  100.00%
R/merge_datasets.R                  134       6  95.52%   123, 249-253
R/merge_expression_module.R          60      11  81.67%   161-166, 184, 362-367
R/Queue.R                            23       0  100.00%
R/resolve_delayed.R                  16       4  75.00%   78-81
R/resolve.R                         113      44  61.06%   179-285
R/select_spec.R                      64       8  87.50%   99, 179-186
R/utils.R                            37      24  35.14%   33-46, 174-187
R/zzz.R                               3       3  0.00%    2-4
TOTAL                              2363     447  81.08%

Diff against main

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

Results for commit: 20bef3d

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@llrs-roche
Copy link

Now all test passed locally too. Feel free to merge

@m7pr m7pr merged commit f0b28e0 into main Dec 13, 2024
30 checks passed
@m7pr m7pr deleted the 87_remove_datasets@main branch December 13, 2024 14:12
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 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