njtierney / geotargets

Targets extensions for geospatial data
https://njtierney.github.io/geotargets/
Other
49 stars 4 forks source link

Default behaviours for filetype and GDAL #16

Closed njtierney closed 3 months ago

njtierney commented 4 months ago

As noted at https://github.com/njtierney/geotargets/blob/master/R/tar-terra-rast.R#L66-L73 by @brownag

It could be a good idea to have some default values for things like raster filetypes ("GTiff", "netCDF", ?) and GDAL ("ENCODING=UTF-8").

These could be set with options or maybe there's a way {targets} like us to set target options - tar_option_set() doesn't look like it has slots for new arguments, so either we make our own geotarget_option_set function, or we can get the user to use options or set an envvar, or something. Note that https://design.tidyverse.org/def-user.html doesn't discuss this in great detail.

brownag commented 4 months ago

I created a PR (#19) that implements geotargets_option_set() and geotargets_option_get(). Incidentally the PR alspo "fixes" an issue with the evaluation of the function body hack we just added for tar_terra_rast() which was causing covr::package_coverage() to fail e.g. https://github.com/njtierney/geotargets/actions/runs/8258728257/job/22591465475

njtierney commented 4 months ago

Fantastic, thank you so much! Looks great, just got some function name suggestions linked in the PR

That {covr} error was annoying, thanks for fixing that!

Aariq commented 3 months ago

Closed by #19