Skip to content

Supersede gittargets? #18

@wlandau

Description

@wlandau

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions