-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Content-addressable storage (CAS), recently added to targets
, is a more native and elegant way to achieve the original goals of gittargets
. Demonstration:
library(targets)
# Run the first version
tar_script(tar_target(x, 1, repository = tar_repository_cas_local()))
tar_make(reporter = "silent")
# Stash the metadata (would use Git in real life)
temp <- file.copy("_targets/meta/meta", "first_meta")
# Run the second version
tar_script(tar_target(x, 2, repository = tar_repository_cas_local()))
tar_make(reporter = "silent")
# Revert to the first version and skip target x.
file.copy("first_meta", "_targets/meta/meta", overwrite = TRUE)
#> [1] TRUE
tar_script(tar_target(x, 1, repository = tar_repository_cas_local()))
tar_make()
#> ✔ skipped target x
#> ✔ skipped pipeline [0.041 seconds]
Created on 2024-11-18 with reprex v2.1.1
ginolhac