forked from UBESP-DCTV/laims.analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.R
35 lines (31 loc) · 845 Bytes
/
run.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# To view your current pipeline status, and possibly run/update it,
# you can simply source/execute this script (maybe using the
# `dev/03-run_cycle.R` script)
{
function(proceed = TRUE, save_all = TRUE) {
if (interactive()) {
if (
requireNamespace("rstudioapi") &&
rstudioapi::isAvailable() &&
save_all
) {
rstudioapi::documentSaveAll()
}
targets::tar_visnetwork() |>
print()
proceed <- usethis::ui_yeah(
"Do you want to proceed with {usethis::ui_code('tar_make')}?"
)
}
if (proceed) {
withr::with_envvar(
list(RSTUDIO_VERSION = "2021.09.0"), {
# devtools::test(stop_on_failure = TRUE)
targets::tar_make()
}
)
targets::tar_visnetwork(targets_only = TRUE) |>
print()
}
}
}()