Skip to content

Commit

Permalink
register teal.logger handlers (#354)
Browse files Browse the repository at this point in the history
close insightsengineering/coredev-tasks#502
test with insightsengineering/teal.logger#73

As a bonus, we can safely move `logger` to suggests (it's still used in
tests)

---------

Signed-off-by: Pawel Rucki <[email protected]>
Co-authored-by: Dony Unardi <[email protected]>
  • Loading branch information
pawelru and donyunardi authored Mar 20, 2024
1 parent d6326b5 commit 3336364
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ repos:
- forcats
- bioc::hermes
- lifecycle
- logger
- bioc::MultiAssayExperiment
- rtables
- S4Vectors
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Imports:
forcats,
hermes (>= 1.7.1),
lifecycle,
logger (>= 0.2.0),
MultiAssayExperiment,
rtables (>= 0.5.1),
S4Vectors,
Expand All @@ -50,7 +49,7 @@ Imports:
stringr,
SummarizedExperiment,
teal.data (>= 0.3.0.9018),
teal.logger (>= 0.1.1),
teal.logger (>= 0.1.3.9013),
teal.reporter (>= 0.2.0),
teal.widgets (>= 0.4.0),
tern (>= 0.7.10)
Expand All @@ -60,6 +59,7 @@ Suggests:
dplyr,
globals,
knitr,
logger (>= 0.2.0),
matrixStats,
R6,
rmarkdown,
Expand Down
2 changes: 1 addition & 1 deletion R/barplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tm_g_barplot <- function(label,
),
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_barplot")
message("Initializing tm_g_barplot")
assert_string(label)
assert_string(mae_name)
assert_character(exclude_assays)
Expand Down
2 changes: 1 addition & 1 deletion R/boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tm_g_boxplot <- function(label,
),
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_boxplot")
message("Initializing tm_g_boxplot")
assert_string(label)
assert_string(mae_name)
assert_character(exclude_assays, any.missing = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/forestplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ tm_g_forest_tte <- function(label,
post_output = NULL,
plot_height = c(600L, 200L, 2000L),
plot_width = c(1360L, 500L, 2000L)) {
logger::log_info("Initializing tm_g_forest_tte")
message("Initializing tm_g_forest_tte")
assert_string(label)
assert_string(adtte_name)
assert_string(mae_name)
Expand Down
2 changes: 1 addition & 1 deletion R/km.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tm_g_km <- function(label,
),
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_km")
message("Initializing tm_g_km")
assert_string(label)
assert_string(adtte_name)
assert_string(mae_name)
Expand Down
2 changes: 1 addition & 1 deletion R/pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tm_g_pca <- function(label,
exclude_assays = character(),
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_pca")
message("Initializing tm_g_pca")
assert_string(label)
assert_string(mae_name)
assert_tag(pre_output, null.ok = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tm_g_scatterplot <- function(label,
),
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_scatterplot")
message("Initializing tm_g_scatterplot")
assert_string(label)
assert_string(mae_name)
assert_character(exclude_assays, any.missing = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/volcanoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tm_g_volcanoplot <- function(label,
exclude_assays = character(),
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_volcanoplot")
message("Initializing tm_g_volcanoplot")
assert_string(label)
assert_string(mae_name)
assert_character(exclude_assays)
Expand Down
1 change: 1 addition & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.onLoad <- function(libname, pkgname) { # nolint
teal.logger::register_logger(namespace = "teal.modules.hermes")
teal.logger::register_handlers("teal.modules.hermes")
}

0 comments on commit 3336364

Please sign in to comment.