diff --git a/.drone.yml b/.drone.yml index bc8c2cbcd..6c49ef857 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,8 +34,8 @@ steps: image: 906087756158.dkr.ecr.us-east-1.amazonaws.com/r-dev-ci-mpn-4.0:latest commands: - R -s -e 'devtools::install_deps(upgrade = '"'"'never'"'"')' - # this can be removed once nmrec 0.3.0.8001 is available on MPN - - git clone --branch 0.3.0.8001 --depth 1 https://github.com/metrumresearchgroup/nmrec.git /tmp/nmrec + # this can be removed once nmrec 0.4.0 is available on MPN + - git clone --branch 0.4.0 --depth 1 https://github.com/metrumresearchgroup/nmrec.git /tmp/nmrec - R -s -e 'devtools::install("/tmp/nmrec", upgrade = "never")' - R -s -e 'devtools::check(env_vars = c("BBI_EXE_PATH" = "/ephemeral/bbi", "NOT_CRAN" = "true"))' environment: @@ -50,8 +50,8 @@ steps: image: 906087756158.dkr.ecr.us-east-1.amazonaws.com/r-dev-ci-mpn-4.1:latest commands: - R -s -e 'devtools::install_deps(upgrade = '"'"'never'"'"')' - # this can be removed once nmrec 0.3.0.8001 is available on MPN - - git clone --branch 0.3.0.8001 --depth 1 https://github.com/metrumresearchgroup/nmrec.git /tmp/nmrec + # this can be removed once nmrec 0.4.0 is available on MPN + - git clone --branch 0.4.0 --depth 1 https://github.com/metrumresearchgroup/nmrec.git /tmp/nmrec - R -s -e 'devtools::install("/tmp/nmrec", upgrade = "never")' - R -s -e 'devtools::check(env_vars = c("BBI_EXE_PATH" = "/ephemeral/bbi", "NOT_CRAN" = "true"))' environment: @@ -107,7 +107,7 @@ steps: commands: - R -s -e 'devtools::install_deps(upgrade = '"'"'never'"'"')' # nmrec isn't available until the 2023-09-19 snapshot. - - git clone --branch 0.3.0.8001 --depth 1 https://github.com/metrumresearchgroup/nmrec.git /tmp/nmrec + - git clone --branch 0.4.0 --depth 1 https://github.com/metrumresearchgroup/nmrec.git /tmp/nmrec - R -s -e 'devtools::install("/tmp/nmrec", upgrade = "never")' - R -s -e 'devtools::check(env_vars = c("BBI_EXE_PATH" = "/ephemeral/bbi", "NOT_CRAN" = "true"))' environment: diff --git a/DESCRIPTION b/DESCRIPTION index 4ef32cb03..14ce0d105 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: bbr Title: R package for bbi -Version: 1.8.1 +Version: 1.9.0 Authors@R: c(person(given = "Seth", family = "Green", diff --git a/NEWS.md b/NEWS.md index 6753b8424..9e7d66c27 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,25 @@ +# bbr 1.9.0 + +## New features and changes + +* New `initial_estimates()` function for extracting and formatting initial + parameter estimates from a `NONMEM` control stream file. (#646) + +* New `tweak_initial_estimates()` function for tweaking or 'jittering' initial + parameter estimates. Only `$THETA` records are supported for now. (#646) + +## Bugs addressed + +* With the latest `data.table` release (1.15.0), `param_estimates_batch()` + failed for an edge case due to a change in the header detection heuristics. + `param_estimates_batch()` now tells `data.table::fread()` to expect a header. + (#648) + +* When passed `.recurse = TRUE`, `run_log()`, `config_log()`, and + `summary_log()` included nested models, which was not by design. Any models + under another model's output directory are considered an implementation + detail. (#643, #644, #645) + # bbr 1.8.1 ## Bugs addressed diff --git a/R/initial-estimates.R b/R/initial-estimates.R index a92a59574..9e8e7569c 100644 --- a/R/initial-estimates.R +++ b/R/initial-estimates.R @@ -90,7 +90,7 @@ initial_estimates <- function(.mod, flag_fixed = FALSE){ #' @noRd get_initial_est <- function(.mod, flag_fixed = FALSE){ - test_nmrec_version(.min_version = "0.3.0.8001") + test_nmrec_version(.min_version = "0.4.0") check_model_object(.mod, "bbi_nonmem_model") diff --git a/R/tweak-initial-estimates.R b/R/tweak-initial-estimates.R index c641938e2..74d0838fe 100644 --- a/R/tweak-initial-estimates.R +++ b/R/tweak-initial-estimates.R @@ -54,7 +54,7 @@ tweak_initial_estimates <- function( ){ # Assertions - test_nmrec_version(.min_version = "0.3.0.8001") + test_nmrec_version(.min_version = "0.4.0") check_model_object(.mod, "bbi_nonmem_model") checkmate::assert_true(all(tweak %in% BBR_ESTIMATES_INHERIT)) diff --git a/tests/testthat/test-initial-estimates.R b/tests/testthat/test-initial-estimates.R index 0dbae1171..642a2e419 100644 --- a/tests/testthat/test-initial-estimates.R +++ b/tests/testthat/test-initial-estimates.R @@ -13,7 +13,7 @@ describe("initial_estimates", { }) it("get_theta_inits", { - skip_if_old_nmrec("0.3.0.8001") + skip_if_old_nmrec("0.4.0") ctl <- nmrec::read_ctl(get_model_path(MOD1)) theta_inits <- get_theta_inits(ctl, mark_flags = "fix") @@ -25,7 +25,7 @@ describe("initial_estimates", { }) it("fmt_record_num", { - skip_if_old_nmrec("0.3.0.8001") + skip_if_old_nmrec("0.4.0") ctl <- nmrec::read_ctl(get_model_path(MOD1)) # Test THETA @@ -61,7 +61,7 @@ describe("initial_estimates", { }) it("initial_estimates: integration", { - skip_if_old_nmrec("0.3.0.8001") + skip_if_old_nmrec("0.4.0") mod_c <- read_model(file.path(MODEL_DIR_X, "1001")) initial_est_df <- initial_estimates(mod_c, flag_fixed = TRUE) initial_est <- get_initial_est(mod_c, flag_fixed = TRUE) @@ -87,7 +87,7 @@ describe("initial_estimates", { }) it("initial_estimates: SAME blocks", { - skip_if_old_nmrec("0.3.0.8001") + skip_if_old_nmrec("0.4.0") mod_c <- read_model(file.path(MODEL_DIR_X, "acop-iov")) initial_est_df <- initial_estimates(mod_c, flag_fixed = TRUE) initial_est <- get_initial_est(mod_c, flag_fixed = TRUE) diff --git a/tests/testthat/test-tweak-initial-estimates.R b/tests/testthat/test-tweak-initial-estimates.R index eebd7d813..261cb4d67 100644 --- a/tests/testthat/test-tweak-initial-estimates.R +++ b/tests/testthat/test-tweak-initial-estimates.R @@ -7,7 +7,7 @@ # of the bounds. describe("tweak_initial_estimates", { - skip_if_old_nmrec("0.3.0.8001") + skip_if_old_nmrec("0.4.0") it("base case - tweaking initial value works", { test_case <- list(