pik-piam/remind

lucode2::buildlibrary("remind") throws notes with R>4

Closed this issue ยท 6 comments

The problem is the existence of 28 non-default packages in the Imports list. People who run R>4 can use the cluster to build the package, or have a colleague do it for them. As a permanent solution we can either remove dependencies, or allow a few notes. This has to be discussed and decided upon collectively.

Clarification question (couldn't find out online): "non-default" refers to packages not found on CRAN, or packages that are not the base package etc.?

To re-iterate and document my position from the RSE chat here:

  • tl;dr: buildLibrary() delenda est! ;)
  • Notes are neither Errors nor Warnings and no reason to reject a package in the first place. CRAN will do so only on "significant notes".
  • It is not clear what are "standard packages", and therefore what "non-standard" packages are (as Anastasis mentioned). Going by this information, it could be as little as
$ ls -1 R-4.0.2/src/library/base
compiler
datasets
graphics
grDevices
grid
methods
parallel
profile
Recommended
splines
stats
stats4
tcltk
tools
translations
utils

going by this forum post it could be

> installed.packages() %>% as_tibble() %>% filter(Priority %in% c('base', 'recommended')) %>% distinct(Package, Priority) %>% arrange(Priority, Package) %>% print(n = Inf)
# A tibble: 29 x 2
   Package    Priority   
   <chr>      <chr>      
 1 base       base       
 2 compiler   base       
 3 datasets   base       
 4 graphics   base       
 5 grDevices  base       
 6 grid       base       
 7 methods    base       
 8 parallel   base       
 9 splines    base       
10 stats      base       
11 stats4     base       
12 tcltk      base       
13 tools      base       
14 utils      base       
15 boot       recommended
16 class      recommended
17 cluster    recommended
18 codetools  recommended
19 foreign    recommended
20 KernSmooth recommended
21 lattice    recommended
22 MASS       recommended
23 Matrix     recommended
24 mgcv       recommended
25 nlme       recommended
26 nnet       recommended
27 rpart      recommended
28 spatial    recommended
29 survival   recommended
  • In both cases, that would be zero "standard packages" in remind.
Depends:
    gdx(>= 1.29),
    magclass(>= 3.37)
Imports:
    abind,
    dplyr,
    flexdashboard,
    knitr,
    lucode2,
    luplot,
    luscale,
    lusweave,
    madrat,
    mip,
    iamc,
    quitte,
    readr,
    reshape2,
    rlang,
    tidyr,
    remulator,
    magpie,
    ggplot2,
    rmarkdown,
    RColorBrewer,
    scales,
    highcharter,
    lubridate,
    plotly,
    data.table,
    rmndt,
    gdxdt
Suggests:
    testthat,
    sr15data
  • We don't know at what threshold the note would disappear. How many "non-standard" packages are OK for R CMD check --as-cran?
  • Moving all those Imports to Suggests is tedious and error-prone, as it involves checking for package availability at every call to a "non-standard" package. So every time a magpie object is touched. It is also somewhat dishonest, since the remind package would have no functionality left without all those "non-standard" packages, so there would be no point in distributing and using it.
  • If dropping the "Notes are Errors"-behaviour from buildLibrary() (which I would advocate for) is considered too extreme, then then the rcmdcheck package seems like an halfway easy way to filter the notes returned by R CMD check and ignore the one about "non-standard packages".
  • This issue should be in the lucode2 tracker. I'm pretty sure it is only incidental that this showed up with the remind package because Antoine updated to R 4 and happens to work only on that package at the moment.

"$%@#!" The whole discussion is moot.
https://github.com/pik-piam/lucode2/blob/master/R/buildLibrary.R#L73-L91
buildLibrary() is already ignoring warnings inconvenient to it's lofty standards. Patch this warning in and be done with it!

Clarification question (couldn't find out online): "non-default" refers to packages not found on CRAN, or packages that are not the base package etc.?

Just found this:

Base and recommended packages (i.e., packages contained in the R source distribution or available from CRAN and recommended to be included in every binary distribution of R)

I guess this is as much information as we are going to get on this.

  • tl;dr: buildLibrary() delenda est! ;)

So you did read it after all :)

I agree with Michaja, will patch lucode2::buildlibrary()

the note is now ignored in buildlibrary (lucode2 version >= 0.4.2) via the config file .buildlibrary in the remind package