-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_targets.R
executable file
·55 lines (50 loc) · 1.73 KB
/
_targets.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
################################################################################
############################## BEETHOVEN #############################
##### Main file controlling the settings, options, and sourcing of targets
##### for the beethoven analysis pipeline.
############################# CONTROLLER #############################
default_controller <- crew::crew_controller_local(
name = "default_controller",
workers = 4,
seconds_idle = 30
)
calc_controller <- crew::crew_controller_local(
name = "calc_controller",
workers = 96,
seconds_idle = 30
)
############################## STORE ##############################
targets::tar_config_set(store = "/opt/_targets")
############################## OPTIONS ##############################
targets::tar_option_set(
packages = c(
"beethoven", "targets", "tarchetypes", "dplyr",
"data.table", "sf", "crew", "crew.cluster"
),
repository = "local",
error = "continue",
memory = "transient",
format = "qs",
storage = "worker",
deployment = "worker",
garbage_collection = TRUE,
seed = 202401L,
controller = crew::crew_controller_group(
default_controller,
calc_controller
)
)
########################### SOURCE TARGETS ###########################
targets::tar_source("inst/targets/targets_critical.R")
targets::tar_source("inst/targets/targets_initiate.R")
targets::tar_source("inst/targets/targets_download.R")
targets::tar_source("inst/targets/targets_aqs.R")
targets::tar_source("inst/targets/targets_calculate_fit.R")
############################## PIPELINE ##############################
list(
target_critical,
target_initiate,
target_download,
target_aqs,
target_calculate_fit
)