technologiestiftung / flusshygiene

WIP Monorepo for the project Flusshygiene and all the modules that are actually used
https://badestellen.berlin.de
MIT License
4 stars 1 forks source link

List all R Packages that can be installed before installing fhpredict #83

Closed ff6347 closed 5 years ago

ff6347 commented 5 years ago

See hsonne's comment below for how these packages were determined.

Original by @fabianmoronzirfas

ff6347 commented 5 years ago

BH is by far the biggest package in terms of size and number of files (see below). It is required by the package "rstan" as we can read in its DESCRIPTION file:

LinkingTo: Rcpp (>= 0.12.0), RcppEigen (>= 0.3.3.3.0), BH (>= 1.66), StanHeaders (>= 2.18.0)

The package "rstan" is required by "rstanarm". Installing "rstanarm" will install most of the packages that are required by "fhpredict" as the following code confirms. It uses our package "kwb.package" to determine the (few) packages that are required by "fhpredict" but not by "rstanarm":

> packages <- kwb.package::packageDependencies(c("fhpredict", "rstanarm"))
> setdiff(packages$fhpredict, packages$rstanarm)
 [1] "fs"        "httr"      "kwb.dwd"   "kwb.utils" "lubridate" "raster"    "rstanarm"  "sf"       
 [9] "sp"        "curl"      "classInt"  "DBI"       "units"     "e1071"     "class"   

grafik

Original by @hsonne

ff6347 commented 5 years ago

Thank you.

Original by @fabianmoronzirfas

ff6347 commented 5 years ago

duplicate of #80 #84

ff6347 commented 5 years ago

Below is the link for the logs of the build of the child image (flusshygiene-opencpu-fhpredict-api) of this one (flusshygiene-opencpu-base).

Could you review the build logs to see if we can install even more dependencies for the fhpedict package in this image beforehand?

https://github.com/technologiestiftung/flusshygiene-opencpu-fhpredict-api/pull/1/checks?check_run_id=228388545#step:6:99

Original by @fabianmoronzirfas

hsonne commented 5 years ago

@fabianmoronzirfas We can install all non-KWB packages that fhpredict depends on (see https://github.com/KWB-R/fhpredict/blob/master/DESCRIPTION) into the base container:

aws.s3 (>= 0.3.12),
caret (>= 6.0-84),
dplyr (>= 0.8.1),
fs (>= 1.2.6),
ggplot2 (>= 3.2.1),
httr (>= 1.4.0),
jsonlite (>= 1.6),
lmtest (>= 0.9-37),
lubridate (>= 1.7.4),
magrittr (>= 1.5),
raster (>= 2.8.19),
rlang (>= 0.3.1),
rstanarm (>= 2.18.2),
sf (>= 0.7.4),
sp (>= 1.3.1),
stringr (>= 1.4.0),
tidyr (>= 1.0.0),
xml2 (>= 1.2.2)
ff6347 commented 5 years ago

@hsonne This speeds up the build immensely. We are down to not 2 minutes 👍