Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Imports:
checkmate,
distspec (>= 0.2.0),
ggplot2,
juliaready,
juliabridge,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
posterior,
rlang,
stats
Expand All @@ -28,7 +28,7 @@ Suggests:
rmarkdown,
testthat (>= 3.2.0)
Remotes:
sbfnk/juliaready
epiforecasts/juliabridge
VignetteBuilder: knitr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
* `epiaware_call()` has been replaced by `component()` and `julia()`.
* `plot(type = "posterior")` has been removed; use bayesplot on
`posterior::as_draws_array(fit)` instead.
* The Julia setup dependency is now
[juliabridge](https://github.com/epiforecasts/juliabridge), which juliaready
was renamed to. An install from GitHub picks it up through `Remotes`; an
existing checkout needs the dependency reinstalled.

## New features

Expand Down
8 changes: 4 additions & 4 deletions R/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ cidm_setup_julia <- function(verbose = TRUE) {
if (!is.null(bin)) Sys.setenv(JULIACONNECTOR_JULIABIN = bin)
}

juliaready::julia_ready(
juliabridge::julia_ready(
packages = c("ComposableTuringIDModels", "Distributions",
"composableIDModelR"),
state_env = .cidm_env,
Expand Down Expand Up @@ -135,7 +135,7 @@ cidm_available <- function() {
return(FALSE)
}
running <- tryCatch(
isTRUE(juliaready::eval_julia("isdefined(Main, :composableIDModelR)")),
isTRUE(juliabridge::eval_julia("isdefined(Main, :composableIDModelR)")),
error = function(e) FALSE
)
if (!running) {
Expand All @@ -161,13 +161,13 @@ cidm_available <- function() {
.cidm_env$released <- NULL
for (fit in released) {
try(
juliaready::call_julia(
juliabridge::call_julia(
"composableIDModelR.release!", fit$handle, fit$session
),
silent = TRUE
)
}
juliaready::call_julia(paste0("composableIDModelR.", fn), ...)
juliabridge::call_julia(paste0("composableIDModelR.", fn), ...)
}

#' Keep a Julia-side object alive while an R object refers to it
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test_that("a Julia process that has gone away clears the setup flag", {
# clear for the next call to set it up again.
local_mocked_bindings(
eval_julia = function(...) stop("Julia has gone away"),
.package = "juliaready"
.package = "juliabridge"
)
.cidm_env$ready <- TRUE
expect_false(cidm_available())
Expand Down
Loading