Skip to content

Commit

Permalink
reduce tests and vignettes build timings for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
levenc committed Feb 9, 2024
1 parent af44ad5 commit 0931621
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 56 deletions.
75 changes: 34 additions & 41 deletions docs/articles/multiple_endpoints.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ articles:
multiple_endpoints: multiple_endpoints.html
patient_data_input: patient_data_input.html
posologyr_user_defined_models: posologyr_user_defined_models.html
last_built: 2024-02-08T18:35Z
last_built: 2024-02-09T10:28Z

3 changes: 2 additions & 1 deletion tests/testthat/test_multi_outputs.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Difference from the usual warfarin PKPD model: some IIV are set to zero to
# reduce the dimension of omega and reduce the execution time of the test

if(Sys.getenv("POSOLOGYR_DEV_MACHINE")=="TRUE"){
mod_warfarin_nlmixr <- list(
ppk_model = rxode2::rxode({
ktr <- exp(THETA_ktr + ETA_ktr)
Expand Down Expand Up @@ -84,7 +85,7 @@ test_that("MAP estimates match nlmixr posthoc estimates for multi endpoints mode
expect_equal(map_warf_01$model$kout[1], 0.05502322, tolerance=1e-3)
expect_equal(map_warf_01$model$e0[1], 96.54411, tolerance=1e-3)
})

}
## estimates from nlmixr
#pk.turnover.emax3 <- function() {
# ini({
Expand Down
7 changes: 2 additions & 5 deletions tests/testthat/test_rxui.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
test_that("readme model equivalent", {
skip_on_cran()

patient_data <- data.frame(ID=1,
TIME=c(0.0,1.0,14.0),
DV=c(NA,25.0,5.5),
Expand Down Expand Up @@ -217,11 +215,9 @@ test_that("mod_vancomycin_Goti2018", {

})


if(Sys.getenv("POSOLOGYR_DEV_MACHINE")=="TRUE"){ #skip on CRAN or github actions
test_that("warfarin example", {

skip_on_cran()

mod_warfarin_nlmixr <- function() {
ini({
THETA_ktr=0.106
Expand Down Expand Up @@ -288,3 +284,4 @@ test_that("warfarin example", {
map_warf_01$eta, tolerance =3)

})
}
13 changes: 5 additions & 8 deletions vignettes/multiple_endpoints.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,11 @@ mod_warfarin_nlmixr <- list(

```{r}
warf_01 <- data.frame(ID=1,
TIME=c(0.0,0.5,1.0,2.0,3.0,6.0,9.0,12.0,24.0,24.0,36.0,
36.0,48.0,48.0,72.0,72.0,96.0,120.0,144.0),
DV=c(0.0,0.0,1.9,3.3,6.6,9.1,10.8,8.6,5.6,44.0,4.0,27.0,
2.7,28.0,0.8,31.0,60.0,65.0,71.0),
DVID=c("cp","cp","cp","cp","cp","cp","cp","cp","cp","pca",
"cp","pca","cp","pca","cp","pca","pca","pca","pca"),
EVID=c(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
AMT=c(100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
TIME=c(0.0,1.0,3.0,6.0,24.0,24.0,36.0,36.0,48.0,48.0,72.0,72.0,144.0),
DV=c(0.0,1.9,6.6,10.8,5.6,44.0,4.0,27.0,2.7,28.0,0.8,31.0,71.0),
DVID=c("cp","cp","cp","cp","cp","pca","cp","pca","cp","pca","cp","pca","pca"),
EVID=c(1,0,0,0,0,0,0,0,0,0,0,0,0),
AMT=c(100,0,0,0,0,0,0,0,0,0,0,0,0))
warf_01
```

Expand Down

0 comments on commit 0931621

Please sign in to comment.