From f14e25d79ab550fc8c37a90c01cb4a82a7f296fb Mon Sep 17 00:00:00 2001 From: b_falquet <64274616+BFalquet@users.noreply.github.com> Date: Mon, 8 Apr 2024 18:03:34 +0200 Subject: [PATCH 1/2] error in pca snapshot (#377) close #378 add timeout before setting input to ensure that update is performed correctly. thank you for the review Co-authored-by: benoit --- tests/testthat/_snaps/pca.md | 18 +++++++++--------- tests/testthat/test-pca.R | 6 ++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/testthat/_snaps/pca.md b/tests/testthat/_snaps/pca.md index a3bee8c6..3158989b 100644 --- a/tests/testthat/_snaps/pca.md +++ b/tests/testthat/_snaps/pca.md @@ -44,15 +44,15 @@ cat(res) Output x y PANEL group shape colour size fill alpha stroke - 1 -0.68789565 0.04912578 1 -1 19 black 1.5 NA NA 0.5 - 2 -0.37824954 0.19209841 1 -1 19 black 1.5 NA NA 0.5 - 3 0.07502276 -0.31568702 1 -1 19 black 1.5 NA NA 0.5 - 4 0.33995282 -0.26532014 1 -1 19 black 1.5 NA NA 0.5 - 5 0.29004708 0.25038379 1 -1 19 black 1.5 NA NA 0.5 - 6 0.08718694 0.09422278 1 -1 19 black 1.5 NA NA 0.5 - 7 0.15015883 0.07932206 1 -1 19 black 1.5 NA NA 0.5 - 8 -0.05952522 -0.58893592 1 -1 19 black 1.5 NA NA 0.5 - 9 0.18330198 0.50479025 1 -1 19 black 1.5 NA NA 0.5 + 1 0.22531097 0.04912578 1 -1 19 black 1.5 NA NA 0.5 + 2 -0.32245662 0.19209841 1 -1 19 black 1.5 NA NA 0.5 + 3 0.19042723 -0.31568702 1 -1 19 black 1.5 NA NA 0.5 + 4 -0.12543919 -0.26532014 1 -1 19 black 1.5 NA NA 0.5 + 5 0.29815055 0.25038379 1 -1 19 black 1.5 NA NA 0.5 + 6 0.54809249 0.09422278 1 -1 19 black 1.5 NA NA 0.5 + 7 -0.06706013 0.07932206 1 -1 19 black 1.5 NA NA 0.5 + 8 -0.30521740 -0.58893592 1 -1 19 black 1.5 NA NA 0.5 + 9 -0.44180789 0.50479025 1 -1 19 black 1.5 NA NA 0.5 --- diff --git a/tests/testthat/test-pca.R b/tests/testthat/test-pca.R index 0c2115a7..8234442b 100644 --- a/tests/testthat/test-pca.R +++ b/tests/testthat/test-pca.R @@ -112,12 +112,18 @@ test_that("pca module works as expected in the test app", { # label option and matrix option. app$set_inputs(!!ns("tab_selected") := "PCA") app$set_inputs(!!ns("assay-name") := "rpkm") + app$wait_for_idle(timeout = 30000) # Important to ensure update of x_var. app$set_inputs(!!ns("x_var") := "3") app$set_inputs(!!ns("y_var") := "4") app$set_inputs(!!ns("var_pct") := FALSE) app$set_inputs(!!ns("label") := FALSE) app$wait_for_idle(timeout = 30000) + res <- app$get_value(input = ns("x_var")) + expect_identical(res, "3") + res <- app$get_value(input = ns("y_var")) + expect_identical(res, "4") + res <- app$get_value(output = ns("test_pca")) expect_snapshot( cat(res) From 6dd18442b3700002984a5e74c97d33efab18fb53 Mon Sep 17 00:00:00 2001 From: BFalquet Date: Mon, 8 Apr 2024 16:04:41 +0000 Subject: [PATCH 2/2] [skip actions] Bump version to 0.1.6.9011 --- .pre-commit-config.yaml | 2 +- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50710b55..d93d8523 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -122,7 +122,7 @@ repos: design/.* )$ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files args: ["--maxkb=1000"] diff --git a/DESCRIPTION b/DESCRIPTION index 34c653ea..a5cba889 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: teal.modules.hermes Title: RNA-Seq Analysis Modules to Add to a Teal Application -Version: 0.1.6.9010 -Date: 2024-04-02 +Version: 0.1.6.9011 +Date: 2024-04-08 Authors@R: c( person("Daniel", "Sabanés Bové", , "daniel.sabanes_bove@roche.com", role = c("aut", "cre")), person("Nikolas", "Burkoff", role = "aut"), diff --git a/NEWS.md b/NEWS.md index de8aac06..cf962d76 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal.modules.hermes 0.1.6.9010 +# teal.modules.hermes 0.1.6.9011 ### Miscellaneous * Added placeholders for `assaySpec`, `adtteSpec` and `geneSpec` inputs when no option is selected.