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

add cdisc information into JoinKeys #132

Merged
merged 44 commits into from
Feb 8, 2023
Merged

add cdisc information into JoinKeys #132

merged 44 commits into from
Feb 8, 2023

Conversation

mhallal1
Copy link
Contributor

@mhallal1 mhallal1 commented Jan 23, 2023

closes #120

  • removed CDISCTealData and replaced its functionality with TealData.
  • removed join_keys mentions in TealDataset and TealDatasetConnector.
  • updated wrappers cdisc_data and teal_data to set up join_keys by calling JoinKeys functionalities. They check if
    join_keys are passed otherwise they create them according to primary keys.
  • deprecated cdisc_data_file
  • Added tests to test-joinKeys.R
  • Updated and added tests of test-TealData, test-TealDataAbstract, test-cdisc_data and test-teal_data.
  • updated teal.slice::init_filtered_data to remove CDISCTealData S3 method and to account for cdisc status in the TealData S3 method: update init_filtered_data teal.slice#169

@mhallal1 mhallal1 added the core label Jan 23, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2023

Unit Tests Summary

       1 files       27 suites   34s ⏱️
   366 tests    366 ✔️ 0 💤 0
1 020 runs  1 020 ✔️ 0 💤 0

Results for commit 2fa79ad.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2023

badge

Code Coverage Summary

Filename                                 Stmts    Miss  Cover    Missing
-------------------------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/as_cdisc.R                                39       4  89.74%   107-110
R/Callable.R                                45       0  100.00%
R/CallableCode.R                            36       2  94.44%   26, 63
R/CallableFunction.R                        88       3  96.59%   160-162
R/CallablePythonCode.R                      58      58  0.00%    21-223
R/cdisc_data.R                              45       1  97.78%   79
R/CDISCTealDataConnector.R                  20       3  85.00%   31, 36, 49
R/CDISCTealDataset.R                        46      11  76.09%   108-115, 208-210
R/CDISCTealDatasetConnector.R               26       1  96.15%   116
R/CodeClass.R                              111       1  99.10%   157
R/data_label.R                              36      13  63.89%   35-39, 58-65, 105
R/deep_clone_r6.R                            9       0  100.00%
R/get_attrs.R                                2       2  0.00%    12-47
R/get_code.R                               173      19  89.02%   87, 140-143, 196-197, 207-208, 266, 297, 333, 337, 372, 381-385
R/get_dataname.R                             4       0  100.00%
R/get_dataset_label.R                        3       0  100.00%
R/get_dataset.R                             13       8  38.46%   41, 58, 85-91
R/get_datasets.R                            10       2  80.00%   86, 110
R/get_key_duplicates.R                      37       7  81.08%   42-48, 55-56
R/get_keys.R                                15       7  53.33%   72-73, 130-150
R/get_raw_data.R                            24      11  54.17%   161-174
R/include_css_js.R                           9       1  88.89%   20
R/is_pulled.R                                4       0  100.00%
R/JoinKeys.R                               181       7  96.13%   134, 230, 324, 327, 385-424
R/load_dataset.R                            25      18  28.00%   60-65, 89-222
R/MAETealDataset.R                         138      57  58.70%   53, 115, 153-208, 224-229, 236-245, 282, 323-339
R/mutate_dataset.R                          18       0  100.00%
R/set_args.R                                10       5  50.00%   42-46
R/teal_data.R                               31       2  93.55%   44, 52
R/TealData.R                               228     113  50.44%   207, 219-288, 331-338, 371-376, 378, 380-385, 387, 404-449
R/TealDataAbstract.R                       232      24  89.66%   72, 85-88, 97-106, 215-218, 429, 454-458, 480, 486
R/TealDataConnection.R                     297     180  39.39%   58-59, 64, 67, 70, 106-163, 183, 186-188, 194-200, 205-207, 233, 238, 254-277, 287, 300, 321, 325-330, 333-336, 358-360, 364-371, 374-377, 392-406, 425-426, 446-517, 535-543, 545, 549-564, 567-570, 602, 608-612, 626, 661-663, 672-674
R/TealDataConnector.R                      196     102  47.96%   167, 179, 183, 196, 199-208, 210, 218-227, 310-314, 372-477
R/TealDataset.R                            367      23  93.73%   141-151, 383-387, 443-452, 504
R/TealDatasetConnector_constructors.R      300      53  82.33%   176-212, 262, 830-835, 1033-1109
R/TealDatasetConnector.R                   326      90  72.39%   169, 237, 251, 256, 270, 433, 456-495, 525, 540-570, 660, 670, 679-686, 699, 714-741
R/to_relational_data.R                      54       7  87.04%   35-36, 40, 99, 106, 112, 127
R/topological_sort.R                        32       0  100.00%
R/utils.R                                   56       9  83.93%   22-23, 27, 76-83
R/validate_data_args.R                      32       0  100.00%
R/zzz.R                                      6       6  0.00%    4-12
TOTAL                                     3382     850  74.87%

Diff against main

Filename                    Stmts    Miss  Cover
------------------------  -------  ------  -------
R/cdisc_data.R                +45      +1  +97.78%
R/get_code.R                    0      -2  +1.16%
R/get_datasets.R                0      -3  +30.00%
R/JoinKeys.R                  +53      +3  -0.74%
R/teal_data.R                 +10      -1  +7.83%
R/TealData.R                  -45      -4  -6.70%
R/TealDataAbstract.R           +1     +11  -4.72%
R/TealDataset.R               -17       0  -0.28%
R/TealDatasetConnector.R      -16      -1  -1.00%
R/topological_sort.R            0      -4  +12.50%
TOTAL                         +31       0  -0.00%

Results for commit: 3cbb1d7

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

@nikolas-burkoff nikolas-burkoff left a comment

Choose a reason for hiding this comment

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

Looking good a few comments to address then we'll take another look

R/CDISCTealData.R Show resolved Hide resolved
R/CDISCTealData.R Show resolved Hide resolved
tests/testthat/test-CDISCTealData.R Show resolved Hide resolved
R/JoinKeys.R Outdated Show resolved Hide resolved
R/JoinKeys.R Outdated Show resolved Hide resolved
R/cdisc_data.R Outdated Show resolved Hide resolved
R/cdisc_data.R Outdated Show resolved Hide resolved
R/cdisc_data.R Outdated
recursive = FALSE
)

names(new_parents) <- unlist(lapply(data_objects, function(x) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to create a named list without having to do it separately for new_parents and parents?

R/cdisc_data.R Outdated Show resolved Hide resolved
R/cdisc_data.R Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

JUnit report for branch main doesn't exist on _junit_xml_reports branch yet.
Once this workflow runs on main branch, you'll see comparison of tests performance between main and join_keys@main as a PR comment.

Copy link
Contributor

@nikolas-burkoff nikolas-burkoff left a comment

Choose a reason for hiding this comment

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

All looks good, a few minor comments and one in teal.slice then I suggest the team run some example apps (might be worth adding ones you've been using to the PR description if you haven't already) and then this can be merged

R/cdisc_data.R Outdated Show resolved Hide resolved
tests/testthat/test-TealDataAbstract.R Outdated Show resolved Hide resolved
tests/testthat/test-data_label.R Outdated Show resolved Hide resolved
tests/testthat/test-cdisc_data.R Outdated Show resolved Hide resolved
tests/testthat/test-cdisc_data.R Show resolved Hide resolved
tests/testthat/test-TealData.R Outdated Show resolved Hide resolved
tests/testthat/test-TealData.R Outdated Show resolved Hide resolved
tests/testthat/test-TealData.R Outdated Show resolved Hide resolved
tests/testthat/test-TealData.R Outdated Show resolved Hide resolved
mhallal1 and others added 5 commits February 3, 2023 16:52
Adds a few tests for TealData class. I didn't really see anything else
to change.

Should be final step for #133

---------

Co-authored-by: Dawid Kałędkowski <[email protected]>
R/JoinKeys.R Show resolved Hide resolved
R/cdisc_data.R Show resolved Hide resolved
NAMESPACE Outdated Show resolved Hide resolved
Copy link
Contributor

@gogonzo gogonzo left a comment

Choose a reason for hiding this comment

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

👍 Thanks for a huge simplification here

@mhallal1 mhallal1 merged commit 36090d2 into main Feb 8, 2023
@mhallal1 mhallal1 deleted the join_keys@main branch February 8, 2023 13:22
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.

Add cdisc_data information into join_keys
6 participants