Takeaways after discussing with @ItAtKwb for 2 hours what can be improved after the flusshygiene cron-job crash after updating KWB`s linux server to R 4.0.1 and realizing the messy R library installation workflow (2 cron job, one by @ItAtKwb and @wseis use different R libraries !!!) we ended up with some centralisation approach, which will not rule out all further issues but may be harmonize the "general" deployment at KWB of R packages.
The idea is that we provide an R script that can be used by @ItAtKwb to run a daily cron job on Linux/Windows servers so that:
- Linux library: "/usr/lib/R/site-library"
- KWB network drive (e.g.) : "//servername/kwbran/..." (preferably using "//servername" instead of "R:/")
always contain the latest version of R packages (always) on the "master" branch precompiled for both "linux" and "windows" and the latest KWB R release (currently: 4.01).
For Windows @ItAtKwb proposed to adapt the .libPaths() variable .Renvironment file (could be "rolled" out by Marcus.
@hsonne what do you think????
Below a first incomplete and buggy first version how this could look like:
pkg_dependencies <- c("devtools", "remotes", "withr")
install.packages(pkg_dependencies)
remotes::install_github("KWB-R/kwb.pkgstatus", upgrade = "always")
non_r_packages <- kwb.pkgstatus::get_non_r_packages()
gh_repos <- kwb.pkgstatus::get_github_repos()
gh_r_packages <- gh_repos[!gh_repos %in% non_r_packages]
install <- function(p) {
remotes::install_github(p, upgrade = 'always', auth_token = devtools::github_pat(quiet = TRUE))
}
withr::with_libpaths("C:/Users/mrustl/Documents/testlib", install.packages(c("devtools", "remotes")))
withr::with_libpaths("C:/Users/mrustl/Documents/testlib", code = {
lapply(gh_r_packages$full_name[1:2], install)
})
For linux the known system dependencies for package installation are described here:
https://github.com/KWB-R/pkgmeta/blob/master/.travis.yml#L9
Takeaways after discussing with @ItAtKwb for 2 hours what can be improved after the flusshygiene cron-job crash after updating KWB`s linux server to R 4.0.1 and realizing the messy R library installation workflow (2 cron job, one by @ItAtKwb and @wseis use different R libraries !!!) we ended up with some centralisation approach, which will not rule out all further issues but may be harmonize the "general" deployment at KWB of R packages.
The idea is that we provide an R script that can be used by @ItAtKwb to run a daily cron job on Linux/Windows servers so that:
always contain the latest version of R packages (always) on the "master" branch precompiled for both "linux" and "windows" and the latest KWB R release (currently: 4.01).
For Windows @ItAtKwb proposed to adapt the .libPaths() variable .Renvironment file (could be "rolled" out by Marcus.
@hsonne what do you think????
Below a first incomplete and buggy first version how this could look like:
For linux the known system dependencies for package installation are described here:
https://github.com/KWB-R/pkgmeta/blob/master/.travis.yml#L9