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

553 change level in log_shiny_input_changes and exclude plot sizes in logging #281

Merged
merged 7 commits into from
Jun 19, 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
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ repos:
- ggplot2
- grDevices
- lifecycle
- logger
- methods
- rlang
- shinyjs
Expand Down
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ Imports:
ggplot2 (>= 3.4.0),
grDevices,
lifecycle (>= 0.2.0),
logger (>= 0.3.0),
methods,
rlang (>= 1.0.0),
shinyjs,
shinyvalidate,
stats,
teal.code (>= 0.4.1.9009),
teal.logger (>= 0.1.3.9013),
teal.logger (>= 0.2.0.9004),
teal.reporter (>= 0.2.0),
teal.widgets (>= 0.4.0),
tidyr (>= 0.8.3)
Expand All @@ -67,7 +66,7 @@ VignetteBuilder:
Config/Needs/verdepcheck: insightsengineering/goshawk, rstudio/shiny,
insightsengineering/teal, insightsengineering/teal.transform,
mllg/checkmate, daattali/colourpicker, tidyverse/dplyr, rstudio/DT,
tidyverse/ggplot2, r-lib/lifecycle, daroczig/logger, r-lib/rlang,
tidyverse/ggplot2, r-lib/lifecycle, r-lib/rlang,
daattali/shinyjs, rstudio/shinyvalidate,
insightsengineering/teal.code, insightsengineering/teal.logger,
insightsengineering/teal.reporter, insightsengineering/teal.widgets,
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 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.
* Added `teal.logger` functionality for logging changes in shiny inputs in all modules.
* Updated the documentation and vignettes to demonstrate method to pass `teal_data` object to `teal::init()`.

### Miscellaneous
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ srv_g_boxplot <- 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.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ srv_g_correlationplot <- 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.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x_param <- teal.transform::resolve_delayed(module_args$xaxis_param, env)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ srv_g_density_distribution_plot <- function(id, # nolint
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.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ srv_lineplot <- 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.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
ns <- session$ns

output$axis_selections <- renderUI({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ srv_g_scatterplot <- 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.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_spaghettiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ srv_g_spaghettiplot <- 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.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
Expand Down
2 changes: 1 addition & 1 deletion R/toggleable_slider.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ toggle_slider_ui <- function(id,
# is_dichotomous_slider `logical` whether it is a dichotomous slider or normal slider
toggle_slider_server <- function(id, is_dichotomous_slider = TRUE) {
moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
checkmate::assert_flag(is_dichotomous_slider)
# model view controller: cur_state is the model, the sliderInput and numericInputs are two views/controllers
# additionally, the module returns the cur_state, so it can be controlled from that end as well
Expand Down
2 changes: 1 addition & 1 deletion R/utils-arbitrary_lines.r
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ui_arbitrary_lines <- function(id, line_arb, line_arb_label, line_arb_color, tit
#' @keywords internal
srv_arbitrary_lines <- function(id) {
moduleServer(id, function(input, output, session) {
if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
teal.logger::log_shiny_input_changes(input, namespace = "teal.goshawk")
comma_sep_to_values <- function(values, wrapper_fun = trimws) {
vals <- strsplit(values, "\\s{0,},\\s{0,}")[[1]]
suppressWarnings(wrapper_fun(vals))
Expand Down
Loading