From 44e11472dff25934f146fca44491901cda60f028 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:48:54 +0200 Subject: [PATCH] Fix broken pipelines (#280) Fix https://github.com/insightsengineering/teal.osprey/issues/279 --------- Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> Signed-off-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Co-authored-by: Franciszek Walkowiak Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com> --- .github/workflows/scheduled.yaml | 1 + DESCRIPTION | 8 +++----- NEWS.md | 2 ++ R/tm_g_ae_oview.R | 3 +-- R/tm_g_ae_sub.R | 2 +- R/tm_g_butterfly.R | 3 +-- R/tm_g_events_term_id.R | 3 +-- R/tm_g_heat_bygrade.R | 3 +-- R/tm_g_patient_profile.R | 3 +-- R/tm_g_spiderplot.R | 3 +-- R/tm_g_swimlane.R | 23 ++++++++++++----------- R/tm_g_waterfall.R | 3 +-- man/tm_g_ae_oview.Rd | 3 +-- man/tm_g_ae_sub.Rd | 2 +- man/tm_g_butterfly.Rd | 3 +-- man/tm_g_events_term_id.Rd | 3 +-- man/tm_g_heat_bygrade.Rd | 3 +-- man/tm_g_patient_profile.Rd | 3 +-- man/tm_g_spiderplot.Rd | 3 +-- man/tm_g_swimlane.Rd | 23 ++++++++++++----------- man/tm_g_waterfall.Rd | 3 +-- staged_dependencies.yaml | 3 --- 22 files changed, 46 insertions(+), 60 deletions(-) diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index 7185ccac..8ef483a1 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -83,6 +83,7 @@ jobs: insightsengineering/teal.transform insightsengineering/formatters insightsengineering/teal.code + insightsengineering/teal.slice insightsengineering/teal.logger insightsengineering/teal.reporter insightsengineering/teal.widgets diff --git a/DESCRIPTION b/DESCRIPTION index 3a313744..824d04fd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,6 +34,7 @@ Imports: lifecycle (>= 0.2.0), shinyvalidate, teal.code (>= 0.4.1.9009), + teal.data (>= 0.3.0.9018), teal.logger (>= 0.2.0.9004), teal.reporter (>= 0.2.0), teal.widgets (>= 0.4.0), @@ -42,9 +43,7 @@ Imports: Suggests: knitr (>= 1.42), logger (>= 0.2.2), - nestcolor (>= 0.1.0), rmarkdown (>= 2.23), - teal.data (>= 0.3.0.9018), testthat (>= 3.1.5), withr (>= 2.0.0) Config/Needs/verdepcheck: insightsengineering/osprey, rstudio/shiny, @@ -54,9 +53,8 @@ Config/Needs/verdepcheck: insightsengineering/osprey, rstudio/shiny, rstudio/shinyvalidate, insightsengineering/teal.code, insightsengineering/teal.logger, insightsengineering/teal.reporter, insightsengineering/teal.widgets, insightsengineering/tern, - tidyverse/tidyr, yihui/knitr, insightsengineering/nestcolor, - rstudio/rmarkdown, insightsengineering/teal.data, r-lib/testthat, - r-lib/withr + tidyverse/tidyr, yihui/knitr, rstudio/rmarkdown, + insightsengineering/teal.data, r-lib/testthat, r-lib/withr Config/Needs/website: insightsengineering/nesttemplate Encoding: UTF-8 Language: en-US diff --git a/NEWS.md b/NEWS.md index f0afe4f8..4758b7b7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ # teal.osprey 0.1.16.9028 * Removed `Show Warnings` modals from modules. +* Moved `teal.data` from `Suggests` to `Imports`. +* Changed examples from `cdisc_data()` to `teal_data()`. ### Breaking Changes * Adapted all modules to use `teal_data` objects. diff --git a/R/tm_g_ae_oview.R b/R/tm_g_ae_oview.R index 776b113d..bcb2a73f 100644 --- a/R/tm_g_ae_oview.R +++ b/R/tm_g_ae_oview.R @@ -16,9 +16,8 @@ #' @export #' #' @examples -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ -#' library(nestcolor) #' ADSL <- rADSL #' ADAE <- rADAE #' add_event_flags <- function(dat) { diff --git a/R/tm_g_ae_sub.R b/R/tm_g_ae_sub.R index f4333a3c..37c7f523 100644 --- a/R/tm_g_ae_sub.R +++ b/R/tm_g_ae_sub.R @@ -18,7 +18,7 @@ #' #' @examples #' # Example using stream (ADaM) dataset -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ #' ADSL <- rADSL #' ADAE <- rADAE diff --git a/R/tm_g_butterfly.R b/R/tm_g_butterfly.R index f55b23c1..c8bfe47f 100644 --- a/R/tm_g_butterfly.R +++ b/R/tm_g_butterfly.R @@ -41,10 +41,9 @@ #' #' @examples #' # Example using stream (ADaM) dataset -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ #' library(dplyr) -#' library(nestcolor) #' set.seed(23) #' ADSL <- rADSL #' ADAE <- rADAE diff --git a/R/tm_g_events_term_id.R b/R/tm_g_events_term_id.R index 9b530aca..98d67451 100644 --- a/R/tm_g_events_term_id.R +++ b/R/tm_g_events_term_id.R @@ -18,9 +18,8 @@ #' @author Molly He (hey59) \email{hey59@gene.com} #' #' @examples -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ -#' library(nestcolor) #' ADSL <- rADSL #' ADAE <- rADAE #' }) diff --git a/R/tm_g_heat_bygrade.R b/R/tm_g_heat_bygrade.R index 61d42c7a..ec423241 100644 --- a/R/tm_g_heat_bygrade.R +++ b/R/tm_g_heat_bygrade.R @@ -34,10 +34,9 @@ #' @export #' #' @examples -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ #' library(dplyr) -#' library(nestcolor) #' ADSL <- rADSL %>% slice(1:30) #' ADEX <- rADEX %>% filter(USUBJID %in% ADSL$USUBJID) #' ADAE <- rADAE %>% filter(USUBJID %in% ADSL$USUBJID) diff --git a/R/tm_g_patient_profile.R b/R/tm_g_patient_profile.R index 483b63eb..6f064abd 100644 --- a/R/tm_g_patient_profile.R +++ b/R/tm_g_patient_profile.R @@ -60,9 +60,8 @@ #' @export #' #' @examples -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ -#' library(nestcolor) #' ADSL <- rADSL #' ADAE <- rADAE %>% mutate(ASTDT = as.Date(ASTDTM), AENDT = as.Date(AENDTM)) #' ADCM <- rADCM %>% mutate(ASTDT = as.Date(ASTDTM), AENDT = as.Date(AENDTM)) diff --git a/R/tm_g_spiderplot.R b/R/tm_g_spiderplot.R index 7a0d26b0..ac0495f5 100644 --- a/R/tm_g_spiderplot.R +++ b/R/tm_g_spiderplot.R @@ -26,9 +26,8 @@ #' #' @examples #' # Example using stream (ADaM) dataset -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ -#' library(nestcolor) #' ADSL <- rADSL #' ADTR <- rADTR #' }) diff --git a/R/tm_g_swimlane.R b/R/tm_g_swimlane.R index 9f5a44ce..55dcb42c 100644 --- a/R/tm_g_swimlane.R +++ b/R/tm_g_swimlane.R @@ -36,17 +36,18 @@ #' #' @examples #' # Example using stream (ADaM) dataset -#' data <- cdisc_data() |> -#' within(library(dplyr)) |> -#' within(library(nestcolor)) |> -#' within(ADSL <- rADSL %>% -#' mutate(TRTDURD = as.integer(TRTEDTM - TRTSDTM) + 1) %>% -#' filter(STRATA1 == "A" & ARMCD == "ARM A")) |> -#' within(ADRS <- rADRS %>% -#' filter(PARAMCD == "LSTASDI" & DCSREAS == "Death") %>% -#' mutate(AVALC = DCSREAS, ADY = EOSDY) %>% -#' rbind(rADRS %>% filter(PARAMCD == "OVRINV" & AVALC != "NE")) %>% -#' arrange(USUBJID)) +#' data <- teal_data() |> +#' within({ +#' library(dplyr) +#' ADSL <- rADSL %>% +#' mutate(TRTDURD = as.integer(TRTEDTM - TRTSDTM) + 1) %>% +#' filter(STRATA1 == "A" & ARMCD == "ARM A") +#' ADRS <- rADRS %>% +#' filter(PARAMCD == "LSTASDI" & DCSREAS == "Death") %>% +#' mutate(AVALC = DCSREAS, ADY = EOSDY) %>% +#' rbind(rADRS %>% filter(PARAMCD == "OVRINV" & AVALC != "NE")) %>% +#' arrange(USUBJID) +#' }) #' #' datanames(data) <- c("ADSL", "ADRS") #' join_keys(data) <- default_cdisc_join_keys[datanames(data)] diff --git a/R/tm_g_waterfall.R b/R/tm_g_waterfall.R index 6d6c5b55..5a5c7129 100644 --- a/R/tm_g_waterfall.R +++ b/R/tm_g_waterfall.R @@ -47,9 +47,8 @@ #' @author houx14 \email{houx14@gene.com} #' #' @examples -#' data <- cdisc_data() |> +#' data <- teal_data() |> #' within({ -#' library(nestcolor) #' ADSL <- rADSL #' ADRS <- rADRS #' ADTR <- rADTR diff --git a/man/tm_g_ae_oview.Rd b/man/tm_g_ae_oview.Rd index 621c211a..5c21df9d 100644 --- a/man/tm_g_ae_oview.Rd +++ b/man/tm_g_ae_oview.Rd @@ -51,9 +51,8 @@ the \code{\link[teal:teal_modules]{teal::module()}} object. Display the \code{AE} overview plot as a shiny module } \examples{ -data <- cdisc_data() |> +data <- teal_data() |> within({ - library(nestcolor) ADSL <- rADSL ADAE <- rADAE add_event_flags <- function(dat) { diff --git a/man/tm_g_ae_sub.Rd b/man/tm_g_ae_sub.Rd index 925ef6d0..06b4cc4c 100644 --- a/man/tm_g_ae_sub.Rd +++ b/man/tm_g_ae_sub.Rd @@ -50,7 +50,7 @@ Display the \code{AE} by subgroups plot as a teal module } \examples{ # Example using stream (ADaM) dataset -data <- cdisc_data() |> +data <- teal_data() |> within({ ADSL <- rADSL ADAE <- rADAE diff --git a/man/tm_g_butterfly.Rd b/man/tm_g_butterfly.Rd index edef8704..4b25ab2b 100644 --- a/man/tm_g_butterfly.Rd +++ b/man/tm_g_butterfly.Rd @@ -87,10 +87,9 @@ used directly as filter. } \examples{ # Example using stream (ADaM) dataset -data <- cdisc_data() |> +data <- teal_data() |> within({ library(dplyr) - library(nestcolor) set.seed(23) ADSL <- rADSL ADAE <- rADAE diff --git a/man/tm_g_events_term_id.Rd b/man/tm_g_events_term_id.Rd index 915dab8a..5a49b307 100644 --- a/man/tm_g_events_term_id.Rd +++ b/man/tm_g_events_term_id.Rd @@ -50,9 +50,8 @@ the \code{\link[teal:teal_modules]{teal::module()}} object. Display Events by Term plot as a shiny module } \examples{ -data <- cdisc_data() |> +data <- teal_data() |> within({ - library(nestcolor) ADSL <- rADSL ADAE <- rADAE }) diff --git a/man/tm_g_heat_bygrade.Rd b/man/tm_g_heat_bygrade.Rd index d93e77d0..93057df0 100644 --- a/man/tm_g_heat_bygrade.Rd +++ b/man/tm_g_heat_bygrade.Rd @@ -76,10 +76,9 @@ the \code{\link[teal:teal_modules]{teal::module()}} object. Display the heatmap by grade as a shiny module } \examples{ -data <- cdisc_data() |> +data <- teal_data() |> within({ library(dplyr) - library(nestcolor) ADSL <- rADSL \%>\% slice(1:30) ADEX <- rADEX \%>\% filter(USUBJID \%in\% ADSL$USUBJID) ADAE <- rADAE \%>\% filter(USUBJID \%in\% ADSL$USUBJID) diff --git a/man/tm_g_patient_profile.Rd b/man/tm_g_patient_profile.Rd index a53152f0..393b0e2d 100644 --- a/man/tm_g_patient_profile.Rd +++ b/man/tm_g_patient_profile.Rd @@ -108,9 +108,8 @@ the start date } } \examples{ -data <- cdisc_data() |> +data <- teal_data() |> within({ - library(nestcolor) ADSL <- rADSL ADAE <- rADAE \%>\% mutate(ASTDT = as.Date(ASTDTM), AENDT = as.Date(AENDTM)) ADCM <- rADCM \%>\% mutate(ASTDT = as.Date(ASTDTM), AENDT = as.Date(AENDTM)) diff --git a/man/tm_g_spiderplot.Rd b/man/tm_g_spiderplot.Rd index b4fe33d9..35011035 100644 --- a/man/tm_g_spiderplot.Rd +++ b/man/tm_g_spiderplot.Rd @@ -78,9 +78,8 @@ Display spider plot as a shiny module } \examples{ # Example using stream (ADaM) dataset -data <- cdisc_data() |> +data <- teal_data() |> within({ - library(nestcolor) ADSL <- rADSL ADTR <- rADTR }) diff --git a/man/tm_g_swimlane.Rd b/man/tm_g_swimlane.Rd index 8429e65a..6dd578b8 100644 --- a/man/tm_g_swimlane.Rd +++ b/man/tm_g_swimlane.Rd @@ -82,17 +82,18 @@ This is teal module that generates a \code{swimlane} plot (bar plot with markers } \examples{ # Example using stream (ADaM) dataset -data <- cdisc_data() |> - within(library(dplyr)) |> - within(library(nestcolor)) |> - within(ADSL <- rADSL \%>\% - mutate(TRTDURD = as.integer(TRTEDTM - TRTSDTM) + 1) \%>\% - filter(STRATA1 == "A" & ARMCD == "ARM A")) |> - within(ADRS <- rADRS \%>\% - filter(PARAMCD == "LSTASDI" & DCSREAS == "Death") \%>\% - mutate(AVALC = DCSREAS, ADY = EOSDY) \%>\% - rbind(rADRS \%>\% filter(PARAMCD == "OVRINV" & AVALC != "NE")) \%>\% - arrange(USUBJID)) +data <- teal_data() |> + within({ + library(dplyr) + ADSL <- rADSL \%>\% + mutate(TRTDURD = as.integer(TRTEDTM - TRTSDTM) + 1) \%>\% + filter(STRATA1 == "A" & ARMCD == "ARM A") + ADRS <- rADRS \%>\% + filter(PARAMCD == "LSTASDI" & DCSREAS == "Death") \%>\% + mutate(AVALC = DCSREAS, ADY = EOSDY) \%>\% + rbind(rADRS \%>\% filter(PARAMCD == "OVRINV" & AVALC != "NE")) \%>\% + arrange(USUBJID) + }) datanames(data) <- c("ADSL", "ADRS") join_keys(data) <- default_cdisc_join_keys[datanames(data)] diff --git a/man/tm_g_waterfall.Rd b/man/tm_g_waterfall.Rd index 36815938..a1ebdd12 100644 --- a/man/tm_g_waterfall.Rd +++ b/man/tm_g_waterfall.Rd @@ -100,9 +100,8 @@ the \code{\link[teal:teal_modules]{teal::module()}} object. This is teal module that generates a waterfall plot for \code{ADaM} data } \examples{ -data <- cdisc_data() |> +data <- teal_data() |> within({ - library(nestcolor) ADSL <- rADSL ADRS <- rADRS ADTR <- rADTR diff --git a/staged_dependencies.yaml b/staged_dependencies.yaml index e6641518..d04bf594 100644 --- a/staged_dependencies.yaml +++ b/staged_dependencies.yaml @@ -33,7 +33,4 @@ upstream_repos: insightsengineering/formatters: repo: insightsengineering/formatters host: https://github.com - insightsengineering/nestcolor: - repo: insightsengineering/nestcolor - host: https://github.com downstream_repos: