From 613f58ac67e5474dbe7f94fa9ad63160d85776c1 Mon Sep 17 00:00:00 2001 From: m7pr Date: Tue, 23 Jan 2024 12:13:03 +0100 Subject: [PATCH 1/4] use `expect_no_error` in tests instead of `expect_error(, NA)` --- tests/testthat/test-validate_standard_inputs.R | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-validate_standard_inputs.R b/tests/testthat/test-validate_standard_inputs.R index 9713172f4f..2a7ff9f8d2 100644 --- a/tests/testthat/test-validate_standard_inputs.R +++ b/tests/testthat/test-validate_standard_inputs.R @@ -27,13 +27,11 @@ testthat::test_that("validate_arm throws specific shiny error if arm_vec has jus }) testthat::test_that("validate_arm throws no error if arm_vec is a factor", { - testthat::expect_error( - validate_arm(factor(c("A", "B"), levels = c("A", "B"))), - NA + testthat::expect_no_error( + validate_arm(factor(c("A", "B"), levels = c("A", "B"))) ) - testthat::expect_error( - validate_arm(factor(c("A", "B"), levels = c("A", "B", "C"))), - NA + testthat::expect_no_error( + validate_arm(factor(c("A", "B"), levels = c("A", "B", "C"))) ) }) From bffb4fb64437b230937b827d4cf4ddc228dc7a72 Mon Sep 17 00:00:00 2001 From: "27856297+dependabot-preview[bot]@users.noreply.github.com" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:18:39 +0000 Subject: [PATCH 2/4] [skip actions] Roxygen Man Pages Auto Update --- DESCRIPTION | 2 +- man/teal.modules.clinical.Rd | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8cbc216356..ddf1b4cf80 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -79,4 +79,4 @@ Encoding: UTF-8 Language: en-US LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.0 diff --git a/man/teal.modules.clinical.Rd b/man/teal.modules.clinical.Rd index d18f707fb3..00c2f4c155 100644 --- a/man/teal.modules.clinical.Rd +++ b/man/teal.modules.clinical.Rd @@ -2,10 +2,43 @@ % Please edit documentation in R/teal.modules.clinical.R \docType{package} \name{teal.modules.clinical} +\alias{teal.modules.clinical-package} \alias{teal.modules.clinical} \title{Teal Modules for Standard Clinical Outputs} \description{ Provides teal modules for the standard clinical trials outputs. The teal modules add an encoding panel to interactively change the encodings within teal. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/insightsengineering/teal.modules.clinical} + \item Report bugs at \url{https://github.com/insightsengineering/teal.modules.clinical/issues} +} + +} +\author{ +\strong{Maintainer}: Joe Zhu \email{joe.zhu@roche.com} + +Authors: +\itemize{ + \item Jana Stoilova \email{jana.stoilova@roche.com} + \item Mahmoud Hallal \email{mahmoud.hallal@roche.com} + \item Dawid Kaledkowski \email{dawid.kaledkowski@roche.com} + \item Rosemary Li \email{li.yaqiong@gene.com} + \item Heng Wang \email{wang.heng@gene.com} + \item Pawel Rucki \email{pawel.rucki@roche.com} + \item Nikolas Burkoff + \item Konrad Pagacz +} + +Other contributors: +\itemize{ + \item Vaakesan Sundrelingam [contributor] + \item Francois Collin [contributor] + \item Imanol Zubizarreta [contributor] + \item F. Hoffmann-La Roche AG [copyright holder, funder] +} + } \keyword{internal} From 35f2ab4525bb7d6d16186d28d860cc5c15ea2d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:37:12 +0100 Subject: [PATCH 3/4] adds some missing prefixes and bumps testthat --- DESCRIPTION | 2 +- tests/testthat/test-string_ops.R | 2 +- tests/testthat/test-substitute_names.R | 36 +++++++++++++------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ddf1b4cf80..9c315a2b0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -70,7 +70,7 @@ Suggests: lubridate, nestcolor (>= 0.1.0), teal.data (>= 0.3.0.9010), - testthat (>= 3.0) + testthat (>= 3.1.5) VignetteBuilder: knitr Config/Needs/website: insightsengineering/nesttemplate diff --git a/tests/testthat/test-string_ops.R b/tests/testthat/test-string_ops.R index e738e1c541..786abb6fe9 100644 --- a/tests/testthat/test-string_ops.R +++ b/tests/testthat/test-string_ops.R @@ -1,4 +1,4 @@ -test_that("`as_num` as a wide interpretation of input to extract numerics.", { +testthat::test_that("`as_num` as a wide interpretation of input to extract numerics.", { dta <- list( character = c("text10,20.5letter30.!", "!-.40$$-50e5[", NA), factor = factor(c("]+60e-6, 7.7%%8L", "%90sep.100\"1L", NA_character_)), diff --git a/tests/testthat/test-substitute_names.R b/tests/testthat/test-substitute_names.R index 279ac6b254..929edca066 100644 --- a/tests/testthat/test-substitute_names.R +++ b/tests/testthat/test-substitute_names.R @@ -1,76 +1,76 @@ -test_that("substitute_q works as expected", { +testthat::test_that("substitute_q works as expected", { result <- substitute_q( qexpr = quote(a <- c + d), env = list(c = 5, d = 3) ) expected <- quote(a <- 5 + 3) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_q fails on unquoted call", { - expect_error(substitute_q(c + d, env = list(c = 5, d = 3))) +testthat::test_that("substitute_q fails on unquoted call", { + testthat::expect_error(substitute_q(c + d, env = list(c = 5, d = 3))) }) -test_that("h_subst_lhs_names works as expected", { +testthat::test_that("h_subst_lhs_names works as expected", { result <- h_subst_lhs_names( qexpr = quote(c(a = d, b = 3, z = "foo")), names = list(a = as.name("x"), z = as.name("y")) ) expected <- quote(c(x = d, b = 3, y = "foo")) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_lhs_names works as expected with nested expressions", { +testthat::test_that("substitute_lhs_names works as expected with nested expressions", { result <- substitute_lhs_names( qexpr = quote(anl <- anl %>% mutate(a = factor(a))), names = list(a = as.name("AEBODSYS")) ) expected <- quote(anl <- anl %>% mutate(AEBODSYS = factor(a))) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_lhs_names does not lead to infinite recursion", { +testthat::test_that("substitute_lhs_names does not lead to infinite recursion", { result <- substitute_lhs_names( qexpr = quote(c(a = d, b = 3, z = "foo")), names = list(b = as.name("x"), z = as.name("y")) ) expected <- quote(c(a = d, x = 3, y = "foo")) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_rhs works as expected", { +testthat::test_that("substitute_rhs works as expected", { result <- substitute_rhs( qexpr = quote(c(a = d, b = 3, z = "foo")), env = list(d = as.name("x"), z = as.name("y")) ) expected <- quote(c(a = x, b = 3, z = "foo")) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_names works as expected", { +testthat::test_that("substitute_names works as expected", { result <- substitute_names( expr = c(a = d, b = 3, z = "foo"), names = list(d = as.name("x"), z = as.name("y")) ) expected <- quote(c(a = x, b = 3, y = "foo")) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_names can also substitute other expressions if requested", { +testthat::test_that("substitute_names can also substitute other expressions if requested", { result <- substitute_names( expr = c(a = d, b = 3, z = doo), names = list(d = as.name("x"), z = as.name("y")), others = list(doo = "loo") ) expected <- quote(c(a = x, b = 3, y = "loo")) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) -test_that("substitute_names works as expected with nested expressions", { +testthat::test_that("substitute_names works as expected with nested expressions", { result <- substitute_names( expr = anl <- anl %>% mutate(a = factor(a)), names = list(a = as.name("AEBODSYS")) ) expected <- quote(anl <- anl %>% mutate(AEBODSYS = factor(AEBODSYS))) - expect_identical(result, expected) + testthat::expect_identical(result, expected) }) From b97400b28161f740554525214c4d81fb26fafbe3 Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Tue, 23 Jan 2024 21:18:33 +0100 Subject: [PATCH 4/4] Update DESCRIPTION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> --- DESCRIPTION | 1 - 1 file changed, 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9244826004..b958b07164 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -69,7 +69,6 @@ Suggests: knitr, lubridate, nestcolor (>= 0.1.0), - teal.data (>= 0.3.0.9010), testthat (>= 3.1.5) VignetteBuilder: knitr