diff --git a/DESCRIPTION b/DESCRIPTION index afdab1dd7a..bed47b2192 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: teal Title: Exploratory Web Apps for Analyzing Clinical Trials Data -Version: 0.15.2.9085 -Date: 2024-11-11 +Version: 0.15.2.9086 +Date: 2024-11-15 Authors@R: c( person("Dawid", "Kaledkowski", , "dawid.kaledkowski@roche.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9533-457X")), diff --git a/NEWS.md b/NEWS.md index 1401db5eae..771c9cfce6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal 0.15.2.9085 +# teal 0.15.2.9086 ### New features diff --git a/R/init.R b/R/init.R index a2c1fac786..72a61380d4 100644 --- a/R/init.R +++ b/R/init.R @@ -103,16 +103,6 @@ init <- function(data, # argument checking (independent) ## `data` - if (inherits(data, "TealData")) { - lifecycle::deprecate_stop( - when = "0.15.0", - what = "init(data)", - paste( - "TealData is no longer supported. Use teal_data() instead.", - "Please follow migration instructions https://github.com/insightsengineering/teal/discussions/988." - ) - ) - } checkmate::assert_multi_class(data, c("teal_data", "teal_data_module")) checkmate::assert_class(landing_popup, "teal_module_landing", null.ok = TRUE) diff --git a/R/modules.R b/R/modules.R index a021187e61..f6d5bfcbe1 100644 --- a/R/modules.R +++ b/R/modules.R @@ -196,6 +196,7 @@ module <- function(label = "module", "\n - `...` server_args elements will be passed to the module named argument or to the `...`" ) } + if ("datasets" %in% server_formals) { warning( sprintf("Called from module(label = \"%s\", ...)\n ", label), @@ -205,7 +206,6 @@ module <- function(label = "module", ) } - ## UI checkmate::assert_function(ui) ui_formals <- names(formals(ui)) @@ -217,6 +217,7 @@ module <- function(label = "module", "\n - `...` ui_args elements will be passed to the module argument of the same name or to the `...`" ) } + if (any(c("data", "datasets") %in% ui_formals)) { stop( sprintf("Called from module(label = \"%s\", ...)\n ", label), @@ -226,7 +227,6 @@ module <- function(label = "module", ) } - ## `filters` if (!missing(filters)) { datanames <- filters diff --git a/tests/testthat/test-modules.R b/tests/testthat/test-modules.R index b1658af98c..65295a363d 100644 --- a/tests/testthat/test-modules.R +++ b/tests/testthat/test-modules.R @@ -31,7 +31,6 @@ testthat::test_that("module warns when server contains datasets argument", { ) }) - testthat::test_that("module expects server being a shiny server module with any argument", { testthat::expect_no_error(module(server = function(id) NULL))