Skip to content

Commit

Permalink
Merge branch 'main' into propagations-august-2024
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif authored Aug 14, 2024
2 parents 1ec6ec5 + 5ac52a5 commit e71587f
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.2
rev: v0.4.3
hooks:
- id: style-files
name: Style code with `styler`
Expand Down
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: teal.modules.general
Title: General Modules for 'teal' Applications
Version: 0.3.0.9038
Date: 2024-06-27
Version: 0.3.0.9040
Date: 2024-08-14
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
person("Pawel", "Rucki", , "[email protected]", role = "aut"),
Expand All @@ -27,7 +27,7 @@ Depends:
ggplot2 (>= 3.4.0),
R (>= 3.6),
shiny (>= 1.6.0),
teal (>= 0.15.1),
teal (>= 0.15.2.9052),
teal.transform (>= 0.5.0)
Imports:
checkmate (>= 2.1.0),
Expand Down Expand Up @@ -94,8 +94,7 @@ Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2,
daroczig/logger, deepayan/lattice, MASS,
insightsengineering/nestcolor, r-lib/rlang, rstudio/rmarkdown,
insightsengineering/rtables, tidyverse/rvest, sparkline,
rstudio/shinytest2, insightsengineering/teal.data, r-lib/testthat,
r-lib/withr
rstudio/shinytest2, r-lib/testthat, r-lib/withr
Config/Needs/website: insightsengineering/nesttemplate
Encoding: UTF-8
Language: en-US
Expand Down
7 changes: 5 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# teal.modules.general 0.3.0.9038
# teal.modules.general 0.3.0.9040

* Removed `Show Warnings` modals from modules.

### Enhancements
* Added `teal.logger` functionality for logging changes in shiny inputs in all modules.

### Bug fixes
* Fixed a bug in `tm_missing_data` in "Group by Subject" that was not using reactive data call.

# teal.modules.general 0.3.0

### Enhancements
* Updated the package docs and vignettes with the new way of specifying data for `teal::init()`. The `data` argument will accept a `teal_data` object
* Updated the package docs and vignettes with the new way of specifying data for `teal::init()`. The `data` argument will accept a `teal_data` object.

### Bug fixes
* Outlier labels no longer appear out of bounds in `tm_a_regression`.
Expand Down
4 changes: 2 additions & 2 deletions R/tm_missing_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par


data_parent_keys <- reactive({
if (length(parent_dataname) > 0 && parent_dataname %in% names(data)) {
keys <- teal.data::join_keys(data)[[dataname]]
if (length(parent_dataname) > 0 && parent_dataname %in% teal.data::datanames(data())) {
keys <- teal.data::join_keys(data())[[dataname]]
if (parent_dataname %in% names(keys)) {
keys[[parent_dataname]]
} else {
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-shinytest2-tm_a_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ testthat::test_that("e2e - tm_a_regression: Data parameter and module label is p
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Regression"
)

encoding_dataset <- app_driver$get_text("#teal-main_ui-root-regression .help-block")
encoding_dataset <- app_driver$get_text("#teal-teal_modules-regression .help-block")
testthat::expect_match(encoding_dataset, "Dataset:[\n ]*CO2", all = FALSE)

app_driver$stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_data_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test_that("e2e - tm_data_table: Initializes without errors", {
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Data Table"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_file_viewer.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test_that("e2e - tm_file_viewer: Initializes without errors and shows files tree
)

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"File Viewer Module"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_front_page.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test_that("e2e - tm_front_page: Initializes without errors and check html elemen
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Front page"
)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-shinytest2-tm_g_association.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ testthat::test_that("e2e - tm_g_association: Data parameter and module label is
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Association"
)

encoding_dataset <- app_driver$get_text("#teal-main_ui-root-association .help-block")
encoding_dataset <- app_driver$get_text("#teal-teal_modules-association .help-block")
testthat::expect_match(encoding_dataset, "Dataset:[\n ]*CO2", all = FALSE)

app_driver$stop()
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-shinytest2-tm_g_scatterplotmatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ test_that("e2e - tm_g_scatterplotmatrix: Initializes without errors", {
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Scatterplot matrix"
)

encoding_dataset <- app_driver$get_text("#teal-main_ui-root-scatterplot_matrix .help-block")
encoding_dataset <- app_driver$get_text("#teal-teal_modules-scatterplot_matrix .help-block")
testthat::expect_match(encoding_dataset, "Datasets.*ADSL.*ADRS", all = FALSE)

app_driver$stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_misssing_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test_that("e2e - tm_missing_data: Initializes without errors", {
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Missing data"
)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-shinytest2-tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ testthat::test_that("e2e - tm_outliers: Data parameter and module label is passe
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Outliers Module"
)

encoding_dataset <- app_driver$get_text("#teal-main_ui-root-outliers_module .help-block")
encoding_dataset <- app_driver$get_text("#teal-teal_modules-outliers_module .help-block")
testthat::expect_match(encoding_dataset, "Dataset:[\n ]*CO2", all = FALSE)
testthat::expect_match(encoding_dataset, "Outlier data points", all = FALSE)

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-shinytest2-tm_t_crosstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ test_that("e2e - tm_t_crosstable: Initializes without errors", {
app_driver$expect_no_shiny_error()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Cross Table"
)

encoding_dataset <- app_driver$get_text("#teal-main_ui-root-cross_table .help-block")
encoding_dataset <- app_driver$get_text("#teal-teal_modules-cross_table .help-block")
testthat::expect_match(encoding_dataset, "Dataset:\\n *ADSL\\n", all = FALSE)

app_driver$stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_variable_browser.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ testthat::test_that("e2e - tm_variable_browser: content is displayed correctly."

# Test tab name
testthat::expect_equal(
trimws(app_driver$get_text("#teal-main_ui-root-active_tab > li.active")),
trimws(app_driver$get_text("#teal-teal_modules-active_tab > li.active")),
"Variable browser (e2e)"
)

Expand Down

0 comments on commit e71587f

Please sign in to comment.