From 9e475a61d06fd5a880d443c621bb5594908bcf06 Mon Sep 17 00:00:00 2001 From: go_gonzo Date: Tue, 12 Dec 2023 08:01:21 +0100 Subject: [PATCH] remove resolve_delayed --- .pre-commit-config.yaml | 1 - DESCRIPTION | 5 ++--- NAMESPACE | 1 - R/module_nested_tabs.R | 4 +--- R/teal.R | 2 +- README.md | 1 - staged_dependencies.yaml | 3 --- tests/testthat/test-module_nested_tabs.R | 6 ------ tests/testthat/test-module_tabs_with_filters.R | 3 --- vignettes/blueprint/intro.Rmd | 1 - vignettes/blueprint/product_map.Rmd | 1 - vignettes/creating-custom-modules.Rmd | 2 -- vignettes/getting-started-with-teal.Rmd | 1 - 13 files changed, 4 insertions(+), 27 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fb140fda1..fcd9b38401 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,6 @@ repos: - insightsengineering/teal.logger - insightsengineering/teal.reporter - insightsengineering/teal.slice - - insightsengineering/teal.transform - insightsengineering/teal.widgets - utils - id: spell-check diff --git a/DESCRIPTION b/DESCRIPTION index 5e0ceabe1e..2dae184b5a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,8 +32,7 @@ Depends: R (>= 4.0), shiny (>= 1.7.0), teal.data (>= 0.3.0.9017), - teal.slice (>= 0.4.0.9027), - teal.transform (>= 0.4.0.9010) + teal.slice (>= 0.4.0.9027) Imports: checkmate (>= 2.1.0), jsonlite, @@ -64,7 +63,7 @@ VignetteBuilder: RdMacros: lifecycle Config/Needs/verdepcheck: rstudio/shiny, insightsengineering/teal.data, - insightsengineering/teal.slice, insightsengineering/teal.transform, + insightsengineering/teal.slice, mllg/checkmate, jeroen/jsonlite, r-lib/lifecycle, daroczig/logger, tidyverse/magrittr, r-lib/rlang, daattali/shinyjs, insightsengineering/teal.logger, insightsengineering/teal.reporter, diff --git a/NAMESPACE b/NAMESPACE index 341b7e34e1..cf5976db1e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -47,7 +47,6 @@ exportMethods(eval_code) import(shiny) import(teal.data) import(teal.slice) -import(teal.transform) importFrom(lifecycle,badge) importFrom(magrittr,"%>%") importFrom(methods,setMethod) diff --git a/R/module_nested_tabs.R b/R/module_nested_tabs.R index 7a0e4a9c93..73afb01be8 100644 --- a/R/module_nested_tabs.R +++ b/R/module_nested_tabs.R @@ -112,8 +112,7 @@ ui_nested_tabs.teal_module <- function(id, modules, datasets, depth = 0L, is_mod checkmate::assert_class(datasets, classes = "FilteredData") ns <- NS(id) - args <- isolate(teal.transform::resolve_delayed(modules$ui_args, datasets)) - args <- c(list(id = ns("module")), args) + args <- c(list(id = ns("module")), modules$ui_args) teal_ui <- tags$div( id = id, @@ -202,7 +201,6 @@ srv_nested_tabs.teal_module <- function(id, datasets, modules, is_module_specifi logger::log_trace("srv_nested_tabs.teal_module initializing the module: { deparse1(modules$label) }.") moduleServer(id = id, module = function(input, output, session) { - modules$server_args <- teal.transform::resolve_delayed(modules$server_args, datasets) if (!is.null(modules$datanames) && is_module_specific) { datasets$srv_filter_panel("module_filter_panel") } diff --git a/R/teal.R b/R/teal.R index 6ec6e6cee4..ddd5072512 100644 --- a/R/teal.R +++ b/R/teal.R @@ -14,7 +14,7 @@ magrittr::`%>%` # Fix R CMD check notes -#' @import shiny teal.data teal.slice teal.transform +#' @import shiny teal.data teal.slice #' @importFrom stats setNames NULL diff --git a/README.md b/README.md index b37c4fb10c..ec27cede9b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ A lot of the functionality of the `teal` framework derives from the following pa - [`teal.widgets`](https://insightsengineering.github.io/teal.widgets/): shiny components used within `teal`. - [`teal.slice`](https://insightsengineering.github.io/teal.slice/): provides a filtering panel to allow filtering of data. - [`teal.code`](https://insightsengineering.github.io/teal.code/): handles reproducibility of outputs. -- [`teal.transform`](https://insightsengineering.github.io/teal.transform/): standardizes extracting and merging data. - [`teal.logger`](https://insightsengineering.github.io/teal.logger/): standardizes logging within `teal` framework. - [`teal.reporter`](https://insightsengineering.github.io/teal.reporter/): allows `teal` applications to generate reports. diff --git a/staged_dependencies.yaml b/staged_dependencies.yaml index 6ec27ef219..f28f2f80ab 100644 --- a/staged_dependencies.yaml +++ b/staged_dependencies.yaml @@ -15,9 +15,6 @@ upstream_repos: insightsengineering/teal.slice: repo: insightsengineering/teal.slice host: https://github.com - insightsengineering/teal.transform: - repo: insightsengineering/teal.transform - host: https://github.com insightsengineering/teal.logger: repo: insightsengineering/teal.logger host: https://github.com diff --git a/tests/testthat/test-module_nested_tabs.R b/tests/testthat/test-module_nested_tabs.R index 6ef8a8c3ad..63d2c05939 100644 --- a/tests/testthat/test-module_nested_tabs.R +++ b/tests/testthat/test-module_nested_tabs.R @@ -147,12 +147,6 @@ out <- shiny::testServer( reporter = teal.reporter::Reporter$new() ), expr = { - # to adjust input modules to the active modules (server_args is dropped when NULL) - test_module1$server_args <- NULL - test_module2$server_args <- NULL - test_module3$server_args <- NULL - test_module4$server_args <- NULL - testthat::test_that("modules_reactive is a list of reactives", { expect_is(modules_reactive, "list") expect_is(modules_reactive$tab1, "reactive") diff --git a/tests/testthat/test-module_tabs_with_filters.R b/tests/testthat/test-module_tabs_with_filters.R index 1c9d1f8385..d732b2ef5b 100644 --- a/tests/testthat/test-module_tabs_with_filters.R +++ b/tests/testthat/test-module_tabs_with_filters.R @@ -44,9 +44,6 @@ testthat::test_that("active_module() returns module specs from active tab when f reporter = teal.reporter::Reporter$new() ), expr = { - test_module1$server_args <- NULL # because empty server_args are dropped from object in srv_nested_tabs - test_module2$server_args <- NULL - session$setInputs(`root-active_tab` = "iris_tab") testthat::expect_identical(active_module(), test_module1) session$setInputs(`root-active_tab` = "mtcars_tab") diff --git a/vignettes/blueprint/intro.Rmd b/vignettes/blueprint/intro.Rmd index dba76cf04e..0537ce52e5 100644 --- a/vignettes/blueprint/intro.Rmd +++ b/vignettes/blueprint/intro.Rmd @@ -29,7 +29,6 @@ The `teal` framework's functionality draws heavily from the following packages: |[`teal.data`](https://insightsengineering.github.io/teal.data) | provides the data structure used in all `teal` applications| |[`teal.slice`](https://insightsengineering.github.io/teal.slice) | provides the filter panel to allow dynamic filtering of data| |[`teal.code`](https://insightsengineering.github.io/teal.code) | provides a mechanism for tracking code to reproduce an analysis| -|[`teal.transform`](https://insightsengineering.github.io/teal.transform) | standardizes extracting and merging data| |[`teal.logger`](https://insightsengineering.github.io/teal.logger) | standardizes logging within `teal` framework| |[`teal.reporter`](https://insightsengineering.github.io/teal.reporter) | allows `teal` applications to generate reports| diff --git a/vignettes/blueprint/product_map.Rmd b/vignettes/blueprint/product_map.Rmd index 6f57ebc428..3949c3d8ae 100644 --- a/vignettes/blueprint/product_map.Rmd +++ b/vignettes/blueprint/product_map.Rmd @@ -22,7 +22,6 @@ subgraph features direction LR teal.data teal.slice - teal.transform teal.code teal.logger teal.widgets diff --git a/vignettes/creating-custom-modules.Rmd b/vignettes/creating-custom-modules.Rmd index d9b9ad32c2..26102d6d32 100644 --- a/vignettes/creating-custom-modules.Rmd +++ b/vignettes/creating-custom-modules.Rmd @@ -82,8 +82,6 @@ It is of the `tdata` type and can be created using the `new_tdata` function. The `teal` framework also provides: - A way to create modules which then generate the R code needed to reproduce their outputs; these modules use the [`teal.code`](https://insightsengineering.github.io/teal.code/) package. -- A way extract from and merge related datasets using the [`teal.transform`](https://insightsengineering.github.io/teal.transform/) package. -- A way to allow app creators to customize your modules also using `teal.transform`. The annotated example below demonstrates these features within a simple histogram module, allowing app developers to choose the data and columns that their app users can select for display in a histogram. diff --git a/vignettes/getting-started-with-teal.Rmd b/vignettes/getting-started-with-teal.Rmd index 50873c00c4..3c918f3160 100644 --- a/vignettes/getting-started-with-teal.Rmd +++ b/vignettes/getting-started-with-teal.Rmd @@ -120,4 +120,3 @@ The packages which are of most interest when defining `teal`applications are: * [`teal.data`](https://insightsengineering.github.io/teal.data/): defining data for `teal` application. * [`teal.slice`](https://insightsengineering.github.io/teal.slice/): defining data filtering before passing into `teal` modules. -* [`teal.transform`](https://insightsengineering.github.io/teal.transform/): defining the way arguments are passed into `teal` modules.