File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,23 @@ tar_option_set(
50
50
)
51
51
)
52
52
53
+ use_aws_s3 <- as.logical(Sys.getenv(" USE_AWS_S3" , FALSE ))
54
+ tar_project <- Sys.getenv(" TAR_PROJECT" , " covid_hosp_explore" )
55
+ aws_s3_prefix <- Sys.getenv(" AWS_S3_PREFIX" , " exploration" )
56
+ aws_s3_prefix <- paste0(aws_s3_prefix , " /" , tar_project )
57
+ if (use_aws_s3 ) {
58
+ tar_option_set(
59
+ repository = " aws" ,
60
+ resources = tar_resources(
61
+ aws = tar_resources_aws(
62
+ bucket = " forecasting-team-data" ,
63
+ prefix = aws_s3_prefix ,
64
+ region = " us-east-1"
65
+ )
66
+ )
67
+ )
68
+ }
69
+
53
70
linreg <- parsnip :: linear_reg()
54
71
quantreg <- epipredict :: quantile_reg()
55
72
ONE_AHEAD_FORECAST_NAME <- " forecast_by_ahead"
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ debug_mode <- as.logical(Sys.getenv("DEBUG_MODE", TRUE))
32
32
use_shiny <- as.logical(Sys.getenv(" USE_SHINY" , FALSE ))
33
33
use_aws_s3 <- as.logical(Sys.getenv(" USE_AWS_S3" , FALSE ))
34
34
aws_s3_prefix <- Sys.getenv(" AWS_S3_PREFIX" , " exploration" )
35
+ aws_s3_prefix <- paste0(aws_s3_prefix , " /" , tar_project )
35
36
cli :: cli_inform(
36
37
c(
37
38
" i" = " Reading environment variables..." ,
@@ -53,18 +54,6 @@ suppressPackageStartupMessages({
53
54
store_dir <- tar_path_store()
54
55
if (! dir.exists(store_dir )) dir.create(store_dir )
55
56
56
- if (use_aws_s3 ) {
57
- tar_option_set(
58
- repository = " aws" ,
59
- resources = tar_resources(
60
- aws = tar_resources_aws(
61
- bucket = " forecasting-team-data" ,
62
- prefix = aws_s3_prefix ,
63
- region = " us-east-1"
64
- )
65
- )
66
- )
67
- }
68
57
69
58
tar_manifest()
70
59
if (debug_mode ) {
You can’t perform that action at this time.
0 commit comments