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

26 new chunks@main #172

Merged
merged 21 commits into from
Sep 8, 2022
Merged

26 new chunks@main #172

merged 21 commits into from
Sep 8, 2022

Conversation

gogonzo
Copy link
Contributor

@gogonzo gogonzo commented Aug 16, 2022

closes #145 #141

  • tm_g_ae_oview @gogonzo
  • tm_g_ae_sub @gogonzo
  • tm_g_butterfly
  • tm_g_events_term_id
  • tm_g_heat_bygrade
  • tm_g_patient_profile
  • tm_g_spiderplot
  • tm_g_swimlane
  • tm_g_waterfall


teal.code::chunks_reset(envir = environment())

ANL <- data[[dataname]]() # nolint
validate(need(nlevels(ANL[[input$arm_var]]) > 1, "Arm needs to have at least 2 levels"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nlevels works only with factors, which means:

  1. if ANL[[arm_var]] is not a factor the validation message will be printed.
  2. (1) means that variable named arm_var have to be a factor. There is not other possibility
  3. This simplifies our problem with c(input$arm_trt, input$arm_ref) %in% ANL_UNFILTERED[[input$arm_var]]) because we can define choices in the line 252 as choices <- levels(ANL[[arm_var]])

@@ -242,14 +242,14 @@ srv_g_ae_oview <- function(id,
})

observeEvent(input$arm_var, {
ANL <- datasets$get_data(dataname, filtered = FALSE) # nolint
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to reviewer:

filtered = FALSE was used only to make "arm_ref" selectInput to have all variable choices (including filtered). We assume that variable is a factor - then levels are taken from the factor (

@gogonzo gogonzo marked this pull request as ready for review August 22, 2022 14:51
@github-actions
Copy link
Contributor

github-actions bot commented Aug 22, 2022

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  --------------
R/tm_g_ae_oview.R             228     228  0.00%    106-362
R/tm_g_ae_sub.R               294     294  0.00%    55-381
R/tm_g_butterfly.R            364     364  0.00%    122-523
R/tm_g_decorate.R              46      46  0.00%    15-89
R/tm_g_events_term_id.R       281     281  0.00%    60-379
R/tm_g_heat_bygrade.R         264     264  0.00%    159-461
R/tm_g_patient_profile.R      781     781  0.00%    232-1105
R/tm_g_spiderplot.R           296     296  0.00%    81-424
R/tm_g_swimlane.R             363     363  0.00%    117-543
R/tm_g_waterfall.R            398     398  0.00%    110-562
R/utils.R                      37      32  13.51%   33-91, 124-131
R/zzz.R                         1       1  0.00%    2
TOTAL                        3353    3348  0.15%

Results for commit: a52e172

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
DESCRIPTION Outdated Show resolved Hide resolved
@nikolas-burkoff nikolas-burkoff linked an issue Aug 25, 2022 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2022

Unit Tests Summary

  1 files    1 suites   0s ⏱️
  4 tests   4 ✔️ 0 💤 0
13 runs  13 ✔️ 0 💤 0

Results for commit e78f256.

♻️ This comment has been updated with latest results.

R/tm_g_ae_oview.R Outdated Show resolved Hide resolved
R/tm_g_ae_sub.R Outdated Show resolved Hide resolved
R/tm_g_butterfly.R Outdated Show resolved Hide resolved
R/tm_g_swimlane.R Outdated Show resolved Hide resolved
R/tm_g_waterfall.R Outdated Show resolved Hide resolved
Co-authored-by: Mahmoud Hallal <[email protected]>
NEWS.md Outdated Show resolved Hide resolved
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.

See comments inline but it's looking good.

R/argument_convention.R Outdated Show resolved Hide resolved
R/tm_g_ae_oview.R Show resolved Hide resolved
R/tm_g_ae_sub.R Outdated Show resolved Hide resolved
R/tm_g_ae_sub.R Outdated Show resolved Hide resolved
R/tm_g_butterfly.R Outdated Show resolved Hide resolved
R/tm_g_heat_bygrade.R Outdated Show resolved Hide resolved
R/tm_g_heat_bygrade.R Show resolved Hide resolved
R/tm_g_waterfall.R Show resolved Hide resolved
pre_output = a$pre_output,
post_output = a$post_output
)
}

srv_g_waterfall <- function(id,
datasets,
data,
Copy link
Contributor

Choose a reason for hiding this comment

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

In the roxygen example set the following 3 options and you get this:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same on main - i made an issue

#176

NEWS.md Outdated Show resolved Hide resolved
@gogonzo gogonzo changed the base branch from main to teal_refactor@main September 8, 2022 11:00
@mhallal1 mhallal1 self-assigned this Sep 8, 2022
@gogonzo gogonzo merged commit fff2ede into teal_refactor@main Sep 8, 2022
@gogonzo gogonzo deleted the 26_new_chunks@main branch September 8, 2022 16:13
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.

Change modules to use data argument instead of datasets Replace chunks with the quosure
6 participants