From f08b3f8263ceea494c27066a407a98314f2a3af6 Mon Sep 17 00:00:00 2001 From: m7pr Date: Fri, 18 Oct 2024 12:23:48 +0200 Subject: [PATCH 1/4] substitute teal.data::get_code with teal.code::get_code --- R/module_filter_data.R | 4 +++- R/teal_data_utils.R | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/R/module_filter_data.R b/R/module_filter_data.R index 959fd867ee..d889168c61 100644 --- a/R/module_filter_data.R +++ b/R/module_filter_data.R @@ -73,8 +73,10 @@ srv_filter_data <- function(id, datasets, active_datanames, data_rv, is_active) previous_signature <- reactiveVal(NULL) filter_changed <- reactive({ req(inherits(datasets(), "FilteredData")) + data_q <- data_rv() + class(data_q) <- "qenv" new_signature <- c( - teal.data::get_code(data_rv()), + teal.code::get_code(data_q), .get_filter_expr(datasets = datasets(), datanames = active_datanames()) ) if (!identical(previous_signature(), new_signature)) { diff --git a/R/teal_data_utils.R b/R/teal_data_utils.R index caedf21e21..86f547a1fa 100644 --- a/R/teal_data_utils.R +++ b/R/teal_data_utils.R @@ -48,12 +48,15 @@ NULL return(teal_data()) } + data_q <- data + class(data_q) <- "qenv" + new_data <- do.call( teal.data::teal_data, args = c( mget(x = datanames_corrected_with_raw, envir = teal.code::get_env(data)), list( - code = teal.data::get_code(data, datanames = datanames_corrected_with_raw), + code = teal.code::get_code(data_q, names = datanames_corrected_with_raw), join_keys = teal.data::join_keys(data)[datanames_corrected] ) ) From 3ff17e93ce83d0a9f6b709beaaa8d18cf30dfd7d Mon Sep 17 00:00:00 2001 From: m7pr Date: Tue, 22 Oct 2024 12:25:47 +0200 Subject: [PATCH 2/4] remove class assignment as teal_data inherist from qenv and we can use teal.code::get_code on teal_data --- R/module_filter_data.R | 4 +--- R/teal_data_utils.R | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/R/module_filter_data.R b/R/module_filter_data.R index d889168c61..cb60a08d5b 100644 --- a/R/module_filter_data.R +++ b/R/module_filter_data.R @@ -73,10 +73,8 @@ srv_filter_data <- function(id, datasets, active_datanames, data_rv, is_active) previous_signature <- reactiveVal(NULL) filter_changed <- reactive({ req(inherits(datasets(), "FilteredData")) - data_q <- data_rv() - class(data_q) <- "qenv" new_signature <- c( - teal.code::get_code(data_q), + teal.code::get_code(data_rv()), .get_filter_expr(datasets = datasets(), datanames = active_datanames()) ) if (!identical(previous_signature(), new_signature)) { diff --git a/R/teal_data_utils.R b/R/teal_data_utils.R index 86f547a1fa..a92ee9cc05 100644 --- a/R/teal_data_utils.R +++ b/R/teal_data_utils.R @@ -48,15 +48,12 @@ NULL return(teal_data()) } - data_q <- data - class(data_q) <- "qenv" - new_data <- do.call( teal.data::teal_data, args = c( mget(x = datanames_corrected_with_raw, envir = teal.code::get_env(data)), list( - code = teal.code::get_code(data_q, names = datanames_corrected_with_raw), + code = teal.code::get_code(data, names = datanames_corrected_with_raw), join_keys = teal.data::join_keys(data)[datanames_corrected] ) ) From 75821e1325b0cd57849a718fc6692de50bd0d03c Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 23 Oct 2024 09:24:13 +0200 Subject: [PATCH 3/4] updated dependecny versions --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e3a3f33d0b..580d87403d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,7 +37,7 @@ BugReports: https://github.com/insightsengineering/teal/issues Depends: R (>= 4.0), shiny (>= 1.8.1), - teal.data (> 0.6.0.9007), + teal.data (> 0.6.0.9014), teal.slice (>= 0.5.1.9009) Imports: checkmate (>= 2.1.0), @@ -48,7 +48,7 @@ Imports: rlang (>= 1.0.0), shinyjs, stats, - teal.code (>= 0.5.0), + teal.code (>= 0.5.0.9011), teal.logger (>= 0.2.0), teal.reporter (>= 0.3.1.9004), teal.widgets (>= 0.4.0), From eb5aed12d666c214ced908603865dee3456b34bd Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 23 Oct 2024 10:30:25 +0200 Subject: [PATCH 4/4] put an equal sign to the dependency manager --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 20b4a83877..873192d20a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,7 +37,7 @@ BugReports: https://github.com/insightsengineering/teal/issues Depends: R (>= 4.0), shiny (>= 1.8.1), - teal.data (> 0.6.0.9014), + teal.data (>= 0.6.0.9014), teal.slice (>= 0.5.1.9009) Imports: checkmate (>= 2.1.0),