Skip to content

Commit

Permalink
options for strict tests; few enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelru committed Jan 24, 2024
1 parent e4a4c54 commit 38c159e
Show file tree
Hide file tree
Showing 47 changed files with 24 additions and 53 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Suggests:
diffdf,
knitr (>= 1.42),
rmarkdown (>= 2.19),
testthat (>= 3.0.4)
testthat (>= 3.0.4),
withr (>= 2.0.0)
VignetteBuilder:
knitr
RdMacros:
Expand All @@ -40,11 +41,11 @@ Config/Needs/verdepcheck: mllg/checkmate, tidyverse/dplyr,
r-lib/lifecycle, tidyverse/lubridate, tidyverse/magrittr, r-lib/rlang,
tidyverse/stringr, tidyverse/tibble, tidyverse/tidyr,
yaml=vubiostat/r-yaml, gowerc/diffdf, yihui/knitr, rstudio/rmarkdown,
r-lib/testthat
r-lib/testthat, r-lib/withr
Config/Needs/website: insightsengineering/nesttemplate
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.0
1 change: 0 additions & 1 deletion R/radab.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#' @details One record per study per subject per parameter per time point: "R1800000", "RESULT1", "R1800001", "RESULT2".
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#' adpc <- radpc(adsl, seed = 2, duration = 9 * 7)
#'
Expand Down
1 change: 0 additions & 1 deletion R/radae.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, study_duration = 2, seed = 1)
#'
#' adae <- radae(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radaette.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' @author Xiuting Mi
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adaette <- radaette(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radcm.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adcm <- radcm(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/raddv.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' addv <- raddv(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radeg.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' @author tomlinsj, npaszty, Xuefeng Hou, dipietrc
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adeg <- radeg(adsl, visit_format = "WEEK", n_assessments = 7L, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radex.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, study_duration = 2, seed = 1)
#'
#' adex <- radex(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radhy.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @author wojciakw
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adhy <- radhy(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radlb.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' @author tomlinsj, npaszty, Xuefeng Hou
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adlb <- radlb(adsl, visit_format = "WEEK", n_assessments = 7L, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radmh.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, study_duration = 2, seed = 1)
#'
#' admh <- radmh(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radpc.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adpc <- radpc(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adpp <- radpp(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radqlqc.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, study_duration = 2, seed = 1)
#'
#' adqlqc <- radqlqc(adsl, seed = 1, percent = 80, number = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radqs.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @author npaszty
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adqs <- radqs(adsl, visit_format = "WEEK", n_assessments = 7L, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adrs <- radrs(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radsaftte.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adsaftte <- radsaftte(adsl, seed = 2)
Expand Down
2 changes: 0 additions & 2 deletions R/radsl.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#' @export
#
#' @examples
#' library(random.cdisc.data)
#'
#' adsl <- radsl(N = 10, study_duration = 2, seed = 1)
#' adsl
#'
Expand Down
2 changes: 0 additions & 2 deletions R/radsub.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' @keywords internal
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 5, seed = 1)
#'
#' df_with_measurements <- random.cdisc.data:::h_anthropometrics_by_sex(df = adsl)
Expand Down Expand Up @@ -97,7 +96,6 @@ h_anthropometrics_by_sex <- function(df,
#' @author tomlinsj, npaszty, Xuefeng Hou, dipietrc
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adsub <- radsub(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radtr.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#' @author tomlinsj, npaszty, Xuefeng Hou, dipietrc
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adtr <- radtr(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radtte.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @export
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' adtte <- radtte(adsl, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion R/radvs.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @author npaszty
#'
#' @examples
#' library(random.cdisc.data)
#' adsl <- radsl(N = 10, seed = 1, study_duration = 2)
#'
#' advs <- radvs(adsl, visit_format = "WEEK", n_assessments = 7L, seed = 2)
Expand Down
1 change: 0 additions & 1 deletion man/h_anthropometrics_by_sex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radab.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radae.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radaette.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radcm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/raddv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radeg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radhy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radlb.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radmh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radpc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radqlqc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radqs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radrs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radsaftte.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions man/radsl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radsub.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radtr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radtte.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/radvs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions tests/testthat/setup-options.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
opts_partial_match_old <- list(
warnPartialMatchDollar = getOption("warnPartialMatchDollar"),
warnPartialMatchArgs = getOption("warnPartialMatchArgs"),
warnPartialMatchAttr = getOption("warnPartialMatchAttr")
)
opts_partial_match_new <- list(
warnPartialMatchDollar = TRUE,
warnPartialMatchArgs = TRUE,
warnPartialMatchAttr = TRUE
)

if (isFALSE(getFromNamespace("on_cran", "testthat")()) && require("withr")) {
withr::local_options(
opts_partial_match_new,
.local_envir = testthat::teardown_env()
)
}
Loading

0 comments on commit 38c159e

Please sign in to comment.