Skip to content

Commit

Permalink
Merge pull request #654 from metrumresearchgroup/release/1.9.0
Browse files Browse the repository at this point in the history
Prepare for 1.9.0 Release
  • Loading branch information
barrettk authored Feb 7, 2024
2 parents 01b4ff5 + eadc261 commit 5c3b0d4
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
22 changes: 22 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/initial-estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down
2 changes: 1 addition & 1 deletion R/tweak-initial-estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-initial-estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-tweak-initial-estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5c3b0d4

Please sign in to comment.