Skip to content

Commit

Permalink
fix resolve_delayed (#1006)
Browse files Browse the repository at this point in the history
remove teal.transform dependency
  • Loading branch information
gogonzo authored Dec 13, 2023
1 parent 6344dd0 commit ff118ba
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 27 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ repos:
- insightsengineering/teal.logger
- insightsengineering/teal.reporter
- insightsengineering/teal.slice
- insightsengineering/teal.transform
- insightsengineering/teal.widgets
- utils
- id: spell-check
Expand Down
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions R/module_nested_tabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion R/teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 0 additions & 3 deletions staged_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions tests/testthat/test-module_nested_tabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-module_tabs_with_filters.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion vignettes/blueprint/intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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|

Expand Down
1 change: 0 additions & 1 deletion vignettes/blueprint/product_map.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ subgraph features
direction LR
teal.data
teal.slice
teal.transform
teal.code
teal.logger
teal.widgets
Expand Down
2 changes: 0 additions & 2 deletions vignettes/creating-custom-modules.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion vignettes/getting-started-with-teal.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit ff118ba

Please sign in to comment.