Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TealData checks #1406

Merged
merged 24 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a24a453
Remove TealData checks
llrs-roche Nov 11, 2024
126cbbf
Convert server usage of dataset to an error.
llrs-roche Nov 11, 2024
f16851d
Notification about module(server) no longer accepting datasets.
llrs-roche Nov 11, 2024
2161502
Update NEWS.md
llrs-roche Nov 11, 2024
59a06ca
Remove modules checks for datasets
llrs-roche Nov 11, 2024
b8c38c9
Merge branch 'main' into 1386_deprecate
m7pr Nov 11, 2024
5d3e89e
Remove tests related to parameters datasets
llrs-roche Nov 11, 2024
22ca011
Merge branch 'main' into 1386_deprecate
m7pr Nov 11, 2024
a1645ec
Merge branch '1386_deprecate' of https://github.com/insightsengineeri…
llrs-roche Nov 11, 2024
6fd1a37
Module's ui functions are only checked to have the id parameter.
llrs-roche Nov 12, 2024
98832cc
Update NEWS.md
llrs-roche Nov 13, 2024
34cda3c
Undo before merging: Test fix setup-r-dependencies
llrs-roche Nov 13, 2024
4b53c28
Merge branch '1386_deprecate' of https://github.com/insightsengineeri…
llrs-roche Nov 13, 2024
69ac901
Avoid issue with two @ on github actions.
llrs-roche Nov 13, 2024
36940bd
Temporary: Always use the r.pkg.template branch that has the fix for …
llrs-roche Nov 13, 2024
6ccaf17
Temporary: Testing again with two @
llrs-roche Nov 13, 2024
1a14f63
Temporary: test action with hash instead of branch name
llrs-roche Nov 13, 2024
6ad436e
Revert temporary changes after setup-r-dependencies was fixed
llrs-roche Nov 14, 2024
13ab296
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Nov 14, 2024
dee8f41
Bring back messages on datasets now as errors and tests adjusting for…
llrs-roche Nov 14, 2024
cb291d8
Merge branch '1386_deprecate' of https://github.com/insightsengineeri…
llrs-roche Nov 14, 2024
288598e
Update R/modules.R
llrs-roche Nov 14, 2024
6555991
Revert some changes
llrs-roche Nov 15, 2024
2d1080a
Revert from warning to stop for ui formals as requested.
llrs-roche Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 3 additions & 1 deletion man/teal_data_module.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
Loading