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

239 utilize logger::log_shiny_input_change #265

Merged
merged 6 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Imports:
formatters (>= 0.3.1),
ggplot2 (>= 3.4.0),
lifecycle (>= 0.2.0),
logger (>= 0.3.0),
shinyvalidate,
teal.code (>= 0.4.1.9009),
teal.logger (>= 0.1.3.9013),
Expand All @@ -41,7 +42,6 @@ Imports:
tidyr (>= 0.8.3)
Suggests:
knitr (>= 1.42),
logger (>= 0.2.0),
nestcolor (>= 0.1.0),
rmarkdown (>= 2.19),
teal.data (>= 0.3.0.9018),
Expand All @@ -50,11 +50,11 @@ Suggests:
Config/Needs/verdepcheck: insightsengineering/osprey, rstudio/shiny,
insightsengineering/teal, insightsengineering/teal.transform,
mllg/checkmate, tidyverse/dplyr, insightsengineering/formatters,
tidyverse/ggplot2, r-lib/lifecycle, rstudio/shinyvalidate,
tidyverse/ggplot2, r-lib/lifecycle, daroczig/logger, rstudio/shinyvalidate,
insightsengineering/teal.code, insightsengineering/teal.logger,
insightsengineering/teal.reporter, insightsengineering/teal.widgets,
insightsengineering/tern, tidyverse/tidyr, yihui/knitr,
daroczig/logger, insightsengineering/nestcolor, rstudio/rmarkdown,
insightsengineering/nestcolor, rstudio/rmarkdown,
insightsengineering/teal.data, r-lib/testthat, r-lib/withr
Config/Needs/website: insightsengineering/nesttemplate
Encoding: UTF-8
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Breaking Changes
* Adapted all modules to use `teal_data` objects.

### Enhancements
* Added `logger` functionality for logging changes in shiny inputs in all modules. `logger` was added to Imports.

### Miscellaneous

* Specified minimal version of package dependencies.
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_ae_oview.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ srv_g_ae_oview <- function(id,
checkmate::assert_class(isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
ANL <- data()[[dataname]]

Expand Down
1 change: 1 addition & 0 deletions R/tm_g_ae_sub.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ srv_g_ae_sub <- function(id,
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
ANL <- data()[[dataname]]
ADSL <- data()[["ADSL"]]
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_butterfly.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ srv_g_butterfly <- function(id, data, filter_panel_api, reporter, dataname, labe
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
ADSL <- data()[["ADSL"]]
ANL <- data()[[dataname]]
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_decorate.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ srv_g_decorate <- function(id,
plot_height,
plot_width) {
moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
plot_g <- reactive({
g <- tern::decorate_grob(
plt(),
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_events_term_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ srv_g_events_term_id <- function(id,
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
iv <- shinyvalidate::InputValidator$new()
iv$add_rule("term", shinyvalidate::sv_required(
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_heat_bygrade.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ srv_g_heatmap_bygrade <- function(id,
if (!is.na(cm_dataname)) checkmate::assert_names(cm_dataname, subset.of = names(data))

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
ADSL <- data()[[sl_dataname]]
ADEX <- data()[[ex_dataname]]
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_patient_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ srv_g_patient_profile <- function(id,
if (!is.na(cm_dataname)) checkmate::assert_names(cm_dataname, subset.of = names(data))
checkboxes <- c(ex_dataname, ae_dataname, rs_dataname, lb_dataname, cm_dataname)
moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
select_plot <- reactive(
vapply(checkboxes, function(x) x %in% input$select_ADaM, logical(1L))
)
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_spiderplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ srv_g_spider <- function(id, data, filter_panel_api, reporter, dataname, label,
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
ADSL <- data()[["ADSL"]]
ADTR <- data()[[dataname]]
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_swimlane.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ srv_g_swimlane <- function(id,
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
iv <- shinyvalidate::InputValidator$new()
iv$add_rule("bar_var", shinyvalidate::sv_required(
Expand Down
1 change: 1 addition & 0 deletions R/tm_g_waterfall.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ srv_g_waterfall <- function(id,
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.osprey")
iv <- reactive({
adsl <- data()[["ADSL"]]
adtr <- data()[[dataname_tr]]
Expand Down
Loading