Skip to content
Snippets Groups Projects
Commit 9277122a authored by Noam Ross's avatar Noam Ross
Browse files

Add note in README

parent 6e239162
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,9 @@ import_ci_drake_cache <- function(tag = "master", gitlab_pat = Sys.getenv("GITLA
httr::write_disk(zippath, overwrite = TRUE)
)
zip::unzip(zippath, exdir = file.path(td))
my_cache <- drake::drake_cache()
ci_cache <- drake::drake_cache(td)
if (!dir.exists(".drake")) drake::new_cache()
my_cache <- drake::drake_cache(path = ".drake")
ci_cache <- drake::drake_cache(path = file.path(td, ".drake"))
my_cache$import(ci_cache)
my_cache$history$import(ci_cache$history)
}
\ No newline at end of file
......@@ -10,7 +10,8 @@ Some key features:
- Outputs from the drake pipeline (model objects, compiled reports, and a drake network graph) go into `artifacts` when built. This directory is stored as an artifact with each GitLab build job, but `.gitignore`'d.
- A [metrics file](https://docs.gitlab.com/ee/ci/metrics_reports.html) is saved
on each run which can be read and reported by GitLab.
- The `.drake` directory is `.gitignore`'d but cached on GitLab between jobs so as to minimize build times.
- The `.drake` directory is `.gitignore`'d but cached on GitLab between jobs so as to minimize build times. It is also stored as a an artifact (`artifacts/drake_cache.zip) so it may be downloaded and re-used.
- An experimental function in `R/get_cache.R` imports the drake cache from GitLab CI into the local drake cache. It requires a GitLab access token to be set a `GITLAB_PAT` in the environment (e.g., in `.Renviron`).
- A `Makefile` defines a docker command so that `make` builds the Docker environment and runs the `drake` pipeline inside it. This facilitates running the dockerized pipeline locally.
- The RStudio project file (`.Rproj`) is configured so that `make.R` is run using "Build All" (Cmd+Shift+B) in the Rstudio build pane.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment