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

Decouple scda #858

Merged
merged 10 commits into from
Jul 6, 2023
Merged

Decouple scda #858

merged 10 commits into from
Jul 6, 2023

Conversation

gogonzo
Copy link
Contributor

@gogonzo gogonzo commented Jun 29, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2023

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ------------------------------
R/dummy_functions.R                 88      75  14.77%   12-110
R/example_module.R                  18       9  50.00%   23-26, 29-33
R/get_rcode_utils.R                 53       2  96.23%   95, 100
R/get_rcode.R                      137      54  60.58%   74, 81, 86, 211-277
R/include_css_js.R                  24       0  100.00%
R/init.R                            24       2  91.67%   190-191
R/module_nested_tabs.R             161       7  95.65%   57, 97, 101-102, 137, 188, 240
R/module_tabs_with_filters.R        68       1  98.53%   162
R/module_teal_with_splash.R         33       2  93.94%   65, 77
R/module_teal.R                    111       5  95.50%   49, 52, 155-156, 180
R/modules_debugging.R               18      18  0.00%    25-44
R/modules.R                        101       8  92.08%   341-366
R/reporter_previewer_module.R       12       2  83.33%   18, 22
R/show_rcode_modal.R                20      20  0.00%    17-38
R/tdata.R                           41       2  95.12%   146, 172
R/utils.R                           13       0  100.00%
R/validate_inputs.R                 32       0  100.00%
R/validations.R                     62      39  37.10%   111-375
R/zzz.R                             11       7  36.36%   3-14
TOTAL                             1027     253  75.37%

Diff against main

Filename               Stmts    Miss  Cover
-------------------  -------  ------  -------
R/dummy_functions.R      +14     +14  -2.79%
TOTAL                    +14     +14  -1.04%

Results for commit: 25c8435

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@gogonzo gogonzo added the core label Jun 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2023

Unit Tests Summary

    1 files    13 suites   19s ⏱️
147 tests 147 ✔️ 0 💤 0
289 runs  289 ✔️ 0 💤 0

Results for commit 161c038.

♻️ This comment has been updated with latest results.

ADSL$SEX[1:150] <- NA # nolint
ADSL$SEX[c(2, 5)] <- NA # nolint

cdisc_data_obj <- cdisc_data(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cdisc_data_obj <- cdisc_data(
cdisc_data_obj <- teal.data::cdisc_data(

Copy link
Contributor

Choose a reason for hiding this comment

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

Even though teal.data is in Depends?

Copy link
Contributor

Choose a reason for hiding this comment

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

just to stay consistent with the code nearby

@@ -111,41 +111,41 @@
#' @include modules.R
#'
#' @examples
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm still thinking about the example for this init() function...
To me, most of the people looking at this example would came from clinical trials domain so it would be good to speak in the same language - i.e. use ADAM model. WDYT @lcd2yyz ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can copy paste data created in get_dummy_data so we can have an ADaM alike data here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is also vignette including-adam-data-in-teal.Rmd for people who want to use teal in clinical trials domain. I'd prefer to keep teal::init documentation generic.

Comment on lines +56 to +61
ADSL <- data.frame( # nolint
STUDYID = "study",
USUBJID = 1:10,
SEX = sample(c("F", "M"), 10, replace = TRUE),
AGE = stats::rpois(10, 40)
)
Copy link
Contributor

@pawelru pawelru Jun 30, 2023

Choose a reason for hiding this comment

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

if it happens to repeat multiple times across the codebase (see my other comment about example in init() and also looking at the vignette) - please consider yet another (not so sure if private) object in the package namespace but please don't name it a "dummy" :P - make it "ex_adsl" or something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pawelru it's a private function, used only in tests and documentation of other internal functions. Do you want this to still change it to ex_cdisc_data or something else?

Copy link
Contributor

Choose a reason for hiding this comment

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

only if it happens that this is being defined multiple times

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pawelru I don't want to export example data function just for a sake of one publicly available examples. I think it make sense to show also cdisc_data() call when calling teal::init.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed dummy_* to example_* and kept them as unexported

@kartikeyakirar kartikeyakirar self-assigned this Jul 4, 2023
Copy link
Contributor

@kartikeyakirar kartikeyakirar 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!

@gogonzo gogonzo merged commit fd79164 into main Jul 6, 2023
@gogonzo gogonzo deleted the decouple_scda@main branch July 6, 2023 08:05
gogonzo added a commit to insightsengineering/scda that referenced this pull request Jul 6, 2023
- [ ] teal insightsengineering/teal#858
- [ ] teal.widgets
- [ ] osprey insightsengineering/osprey#121
- [ ] teal.osprey
insightsengineering/teal.osprey#214
- [ ] teal.transform
insightsengineering/teal.transform#139

---------

Signed-off-by: Dawid Kałędkowski <[email protected]>
Co-authored-by: kartikeya kirar <[email protected]>
gogonzo added a commit to insightsengineering/scda.2022 that referenced this pull request Jul 6, 2023
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.

Decouple scda from teal
4 participants