Open Aariq opened 2 weeks ago
I think updating the GDAL driver supplied via filetype should invalidate a target the same way changing format for tar_target() does.
filetype
format
tar_target()
targets::tar_dir({ targets::tar_script({ library(geotargets) list( tar_terra_rast( rast, terra::rast(system.file("ex/elev.tif", package = "terra")), filetype = "GTiff" ) ) }) targets::tar_make() print("End of initial run") targets::tar_script({ library(geotargets) list( tar_terra_rast( rast, terra::rast(system.file("ex/elev.tif", package = "terra")), filetype = "COG" ) ) }) targets::tar_make() print("End of second run") }) #> ▶ dispatched target rast #> ● completed target rast [0.017 seconds, 7.992 kilobytes] #> ▶ ended pipeline [0.156 seconds] #> [1] "End of initial run" #> ✔ skipped target rast #> ✔ skipped pipeline [0.095 seconds] #> [1] "End of second run"
Created on 2024-10-02 with reprex v2.1.1
I agree with you, this feels similar to changing a file format from say .csv to .rds. I'd be curious what @mdsumner's thoughts are on this?
.csv
.rds
I think updating the GDAL driver supplied via
filetype
should invalidate a target the same way changingformat
fortar_target()
does.Created on 2024-10-02 with reprex v2.1.1