Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
realxinzhao committed Apr 5, 2024
2 parents bd237f6 + 998b197 commit 8cb4a7e
Show file tree
Hide file tree
Showing 5 changed files with 945 additions and 4 deletions.
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
7 changes: 5 additions & 2 deletions R/driver.R
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ driver_drake <- function(
return_data_names <- union(inputs_of(return_inputs_of), outputs_of(return_outputs_of))
}

optional <- input <- from_file <- name <- to_xml <- data_mod <- output <- . <-
PREBUILT_DATA <-NULL # silence notes from package check.
optional <- input <- from_file <- name <- to_xml <- data_mod <- output <- . <- NULL
# silence notes from package check.

assert_that(is.null(stop_before) | is.character(stop_before))
assert_that(is.null(stop_after) | is.character(stop_after))
Expand All @@ -512,6 +512,8 @@ driver_drake <- function(
assert_that(is.logical(return_plan_only))
assert_that(is.logical(write_xml))
assert_that(is.logical(quiet))
# PREBUILT_DATA cannot be NULL
assert_that(!is.null(PREBUILT_DATA), msg = "PREBUILT_DATA is NULL")

# we need to use package data to set this in effect in such a way that drake does not notice
# and think all XML files need to be rebuilt with the suffix
Expand Down Expand Up @@ -757,6 +759,7 @@ driver_drake <- function(

# Separate plan for prebuilt_data -- we will track each name and clear the cache for it's chunk if
# there are any changes

prebuilt_data_plan <- tibble(target = names(PREBUILT_DATA)) %>%
mutate(command = paste0(PACKAGE_NAME, "::PREBUILT_DATA[['", target, "']]"),
target = paste0("PREBUILT_", target))
Expand Down
2 changes: 1 addition & 1 deletion man/driver.Rd

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

2 changes: 1 addition & 1 deletion man/driver_drake.Rd

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

Loading

0 comments on commit 8cb4a7e

Please sign in to comment.