Skip to content

Commit

Permalink
Merge branch 'main' into 1312_todos
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr authored Nov 18, 2024
2 parents 2114b10 + 2115e7f commit 7e8f6e5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9533-457X")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal 0.15.2.9085
# teal 0.15.2.9086

### New features

Expand Down
10 changes: 0 additions & 10 deletions R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions R/modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -205,7 +206,6 @@ module <- function(label = "module",
)
}


## UI
checkmate::assert_function(ui)
ui_formals <- names(formals(ui))
Expand All @@ -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),
Expand All @@ -226,7 +227,6 @@ module <- function(label = "module",
)
}


## `filters`
if (!missing(filters)) {
datanames <- filters
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 7e8f6e5

Please sign in to comment.