Local config file is deleted when using tar_resources_aws()
?
#1327
-
Help
DescriptionHello, and thank you for creating this package—it's been a tremendous help and has greatly simplified much of my work! I’m currently integrating Here’s what my default:
config_value: "my-config-value" And here is what my previous library(targets)
list(
tar_target(
config_file,
command = "config.yml",
format = "file"
),
tar_target(
config_value,
config::get(value = "config_value", file = config_file)
)
) Running this interactively: tar_make()
tar_read(config_value)
# [1] "my-config-value" Everything works as expected. However, when I switch to using Here's my new library(targets)
resources <- tar_resources(
tar_resources_aws(
bucket = "my-bucket",
prefix = "my-project"
)
)
)
tar_option_set(
repository = "aws",
resources = resources
)
list(
tar_target(
config_file,
command = "config.yml",
format = "file"
),
tar_target(
config_value,
config::get(value = "config_value", file = config_file)
)
) If I run I'm hoping to get a better understanding of why this is happening, and learn what I can do to ensure that local config files are preserved when using Edit: I'm seeing the below in the storage formats doc:
It looks like this is the intended behavior of file-based targets when using a remote repository. Are there any recommended workarounds for this behavior when using the {config} package? It would be helpful if I could continue using a local |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The assumption with |
Beta Was this translation helpful? Give feedback.
Thanks for clarifying this! I wasn’t entirely sure how to implement the temporary local copy of the
config.yml
approach you suggested, but I believe I've found a workable solution by overwriting the default repository for this target.