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

Refactor #992

Merged
merged 43 commits into from
Dec 8, 2023
Merged

Refactor #992

merged 43 commits into from
Dec 8, 2023

Conversation

gogonzo
Copy link
Contributor

@gogonzo gogonzo commented Nov 30, 2023

part of #937

chlebowa and others added 10 commits November 22, 2023 09:19
Closes #904 

Added `as_tdata` function to convert the data object received by modules
from `teal_data` to `tdata` class.
Modified `srv_nested_tabs.teal_module` now returns a `teal_data`.

To make a module handle a `teal_data` object without (much)
modification, the incoming `data` argument should be downgraded to the
old class.
```
      data <- as_tdata(data)
```

Also modified `example_module` to handle `teal_data` objects.

---------

Co-authored-by: go_gonzo <dawid.kaledkowski@gmail.com>
Co-authored-by: Dony Unardi <donyunardi@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
adapted to `teal_data` class
adapted to `teal_data` class
Copy link
Contributor

github-actions bot commented Nov 30, 2023

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------
R/dummy_functions.R                  97      88  9.28%    9-71, 93-106, 109-116, 131-146
R/get_rcode_utils.R                  31       1  96.77%   51
R/include_css_js.R                   24       0  100.00%
R/init.R                             80      31  61.25%   110-117, 141, 160-181, 213-215, 217-218
R/landing_popup_module.R             25      25  0.00%    61-87
R/module_filter_manager.R           107      36  66.36%   49-55, 62-70, 79-84, 228, 233-246
R/module_nested_tabs.R              151      59  60.93%   64-138, 154, 207, 229, 255
R/module_snapshot_manager.R         209     157  24.88%   87-99, 127-136, 140-152, 154-161, 168-182, 186-188, 190-195, 198-208, 211-227, 236-251, 265-288, 291-302, 305-311, 325, 346-369
R/module_tabs_with_filters.R         73      33  54.79%   60-95, 127, 140
R/module_teal_with_splash.R          89       4  95.51%   67, 88, 149-150
R/module_teal.R                     141      32  77.30%   68, 71, 158-159, 165, 196, 204-205, 227-259
R/modules_debugging.R                19      19  0.00%    25-45
R/modules.R                         155      26  83.23%   119, 132, 224-227, 241-246, 257-261, 391-434
R/reporter_previewer_module.R        18       2  88.89%   26, 30
R/show_rcode_modal.R                 20      20  0.00%    16-37
R/tdata.R                            59       1  98.31%   160
R/teal_data_module-eval_code.R       34       0  100.00%
R/teal_data_module.R                  6       0  100.00%
R/teal_reporter.R                    60       5  91.67%   65, 116-117, 120, 137
R/teal_slices-store.R                25       0  100.00%
R/teal_slices.R                      59      12  79.66%   135-148
R/utils.R                           108      27  75.00%   113-140
R/validate_inputs.R                  32       0  100.00%
R/validations.R                      58      37  36.21%   109-371
R/zzz.R                              11       7  36.36%   3-14
TOTAL                              1691     622  63.22%

Diff against main

Filename                        Stmts    Miss  Cover
----------------------------  -------  ------  --------
R/dummy_functions.R                +5     +38  -36.37%
R/get_rcode_utils.R                -7       0  -0.59%
R/init.R                           +1      +6  -7.10%
R/module_filter_manager.R           0      +7  -6.54%
R/module_nested_tabs.R            -23     +45  -31.03%
R/module_tabs_with_filters.R        0     +31  -42.47%
R/module_teal_with_splash.R       -31      -7  +4.67%
R/module_teal.R                     0     +24  -17.02%
R/modules_debugging.R              +1      +1  +100.00%
R/modules.R                       +12       0  +1.41%
R/tdata.R                         +20       0  +0.87%
TOTAL                             -22    +145  -8.94%

Results for commit: 58282cb

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

chlebowa and others added 13 commits November 30, 2023 10:51
Modified `example_module` to remove `data` argument from UI function.
Data set selection is moved to a `renderUI` element on the server side.
- hard deprecated data in the ui
- soft deprecated datasets in the server
* adapted to `teal_data` class
* mentioned and linked `teal_data_module`
* replaced outdated image
* added color legend to image

---------

Signed-off-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com>
Co-authored-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com>
* adapted to `teal_data` class
* removed vignettes `including-general-data-in-teal`,
`including-adam-data-in-teal`, `including-mae-data-in-teal`, and
`preprocessing-data`
* added vignette `data-in-teal`
* adapted to `teal_data` class
* generalized example module
* dropped mentions of `teal.transform`
adapted example modules to follow `example_module`
Copy link
Contributor

github-actions bot commented Nov 30, 2023

Unit Tests Summary

    1 files    19 suites   11s ⏱️
198 tests 196 ✔️ 2 💤 0
395 runs  392 ✔️ 3 💤 0

Results for commit 58282cb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 30, 2023

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
init 💀 $0.30$ $-0.30$ init_data_accepts_TealData_object
init 💀 $0.06$ $-0.06$ init_data_accepts_TealDatasetConnector_object
init 💀 $0.05$ $-0.05$ init_data_accepts_a_list_of_TealDatasetConnector_object
init 💀 $0.12$ $-0.12$ init_data_accepts_a_list_of_a_TealDataset_and_a_dataframe_with_renaming
init 💀 $0.04$ $-0.04$ init_data_accepts_a_list_of_a_TealDataset_and_a_dataframe_without_renaming
init 💀 $0.09$ $-0.09$ init_data_accepts_a_list_of_a_single_MultiAssayExperiment_object_without_renaming
init 💀 $0.05$ $-0.05$ init_data_accepts_a_list_of_mixed_TealDataset_and_dataframe_with_mixed_renaming
init 💀 $0.05$ $-0.05$ init_data_accepts_a_list_of_single_TealDataset_without_renaming
init 💀 $0.05$ $-0.05$ init_data_accepts_a_single_TealDataset
init 💀 $0.03$ $-0.03$ init_data_throws_an_error_with_input_other_than_TealData_teal_data_and_list_ui_server_
module_nested_tabs 💀 $0.31$ $-0.31$ .datasets_to_data_accepts_a_reactiveVal_as_trigger_data_input
module_nested_tabs 💀 $0.06$ $-0.06$ .datasets_to_data_returns_tdata_object
module_nested_tabs 👶 $+0.05$ .datasets_to_data_returns_teal_data_object
module_nested_tabs 💀 $0.06$ $-0.06$ .datasets_to_data_throws_error_if_trigger_data_is_not_a_reactiveVal_function
module_nested_tabs 💀 $0.02$ $-0.02$ srv_nested_tabs.teal_module_passes_datasets_to_the_server_module
module_nested_tabs 👶 $+0.02$ srv_nested_tabs.teal_module_passes_deprecated_datasets_to_the_server_module
module_nested_tabs 💀 $0.04$ $-0.04$ srv_nested_tabs.teal_module_warns_if_both_data_and_datasets_are_passed
module_teal_with_splash 💀 $0.03$ $-0.03$ srv_teal_with_splash_creates_raw_data_based_on_DDL_returns_NULL_before_loading
module_teal_with_splash 💀 $0.33$ $-0.33$ srv_teal_with_splash_creates_raw_data_based_on_DDL_returns_pulled_data_when_loaded
modules 👶 $+0.01$ module_throws_when_ui_has_data_or_datasets_argument
modules 👶 $+0.00$ module_warns_when_server_contains_datasets_argument
tdata 👶 $+0.02$ as_tdata_accepts_all_possible_inputs
tdata 👶 $+0.02$ as_tdata_always_returns_tdata_object
tdata 👶 $+0.01$ code_is_maintained_during_conversion
tdata 👶 $+0.01$ datasets_are_maintained_during_conversion

Results for commit 8c48ed7

♻️ This comment has been updated with latest results.

Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
R/dummy_functions.R Outdated Show resolved Hide resolved
R/modules.R Outdated Show resolved Hide resolved
chlebowa and others added 2 commits November 30, 2023 15:10
Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
this fixes
insightsengineering/teal.gallery#113

---------

Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
R/modules.R Outdated Show resolved Hide resolved
averissimo and others added 6 commits December 1, 2023 10:55
Co-authored-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com>
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Changes `tdata` to `teal_data` in a few places we missed.
@gogonzo gogonzo added the core label Dec 6, 2023
@gogonzo gogonzo removed the blocked label Dec 7, 2023
- teal.transform bump not needed
@vedhav vedhav self-requested a review December 8, 2023 12:40
DESCRIPTION Outdated Show resolved Hide resolved
@vedhav vedhav enabled auto-merge (squash) December 8, 2023 12:47
@vedhav vedhav disabled auto-merge December 8, 2023 12:51
@vedhav vedhav enabled auto-merge (squash) December 8, 2023 12:53
@vedhav vedhav merged commit f69e634 into main Dec 8, 2023
23 checks passed
@vedhav vedhav deleted the refactor branch December 8, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants