Open mstackhouse opened 7 months ago
metadata <- make_metadata_store("jobs/meta.yaml")
session$userData[["metadata"]] <- metadata
# read in transformed data from wherever
if (Sys.getenv("R_CONFIG_ACTIVE") == "rsconnect" || isTRUE(golem::app_prod())) {
data <- readRDS(file.path(metadata$meta$datapath, "ADaM", "data.rds"))
} else {
data <- readRDS(here::here("jobs/data.rds"))
}
Maybe a helper function that looks for the file path for .rds in .Renviron OR YAML?
TODO - add jobs/data.rds to gitignore
Leverage an active env variable to determine if working in dev area or prod area
If working in dev area, use a dev data folder for data caching (if necessary). If prod, look at the production area process
The temporary folder can be created or configurable into a location outside the parent git repository.
Throw a warning if the location is present in the git repository and advise the user to add folder to .gitignore