zachmayer / caretEnsemble

caret models all the way down :turtle:
Other
226 stars 75 forks source link

Use inherits #247

Closed zachmayer closed 4 years ago

zachmayer commented 4 years ago

Broken build: https://cran.r-project.org/web/checks/check_results_caretEnsemble.html

Email from CRAN:


Dear maintainer,

Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_caretEnsemble.html>.

Specifically, see the problems shown for r-devel-linux-x86_64-debian-clang.

These can be reproduced by checking with --as-cran using current
r-devel, which for now sets

  _R_CLASS_MATRIX_ARRAY_=true
  _R_CHECK_LENGTH_1_CONDITION_="package:_R_CHECK_PACKAGE_NAME_,verbose"

in the check environment, to the effect that

  R> class(matrix(1 : 4, 2, 2))
  [1] "matrix" "array"

(and no longer just "matrix" as before), and that conditions of length
greater than one in 'if' and 'while' statements executing in the package
being checked give an error.

According to the R NEWS file,

   For now only active when environment variable _R_CLASS_MATRIX_ARRAY_
   is set to non-empty, but planned to be the new unconditional behavior
   when R 4.0.0 is released:

   matrix objects now also inherit from class "array", namely, e.g.,
   class(diag(1)) is c("matrix", "array") which invalidates code
   assuming that length(class(obj)) == 1, an incorrect assumption that
   is less frequently fulfilled now.

   S3 methods for "array", i.e., <someFun>.array(), are now also
   dispatched for matrix objects.

Apparently your package no longer works correctly when
class(matrix(...)) gives a vector of length two and conditions of length
greater than one in 'if' or 'while' give an error: please fix as
necessary.

See
<https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html>
for more information about correctly using class() in package code.

Please correct before 2019-12-18 to safely retain your package on CRAN.

Best,
-k```
zachmayer commented 4 years ago

travis is broken, but local build and winbuild builds pass

zachmayer commented 4 years ago

Test environments

R CMD check results

There were no ERRORs, WARNINGs, or NOTES.

zachmayer commented 4 years ago

Submitted to CRAN. Will merge PR when they accept.

zachmayer commented 4 years ago

R wind builder output, for posterity:

* using log directory 'd:/RCompile/CRANguest/R-devel_gcc8/caretEnsemble.Rcheck'
* using R Under development (unstable) (2019-12-04 r77519)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'caretEnsemble/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'caretEnsemble' version '2.0.1'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Zachary A. Deane-Mayer <zach.mayer@gmail.com>'

Found the following (possibly) invalid file URI:
  URI: CONDUCT.md
    From: README.md
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking serialization versions ... OK
* checking whether package 'caretEnsemble' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [15s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... [6s] OK
** running examples for arch 'x64' ... [6s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [109s] OK
  Running 'testthat.R' [108s]
** running tests for arch 'x64' ... [122s] OK
  Running 'testthat.R' [121s]
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking re-building of vignette outputs ... [97s] OK
* checking PDF version of manual ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 NOTE
zachmayer commented 4 years ago

I also need to make a tag once I merge this

zachmayer commented 4 years ago

00install.out

* installing *source* package 'caretEnsemble' ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* MD5 sums
packaged installation of 'caretEnsemble' as caretEnsemble_2.0.1.zip
* DONE (caretEnsemble)
zachmayer commented 4 years ago

now builds with no notes:

* using log directory 'd:/RCompile/CRANguest/R-release/caretEnsemble.Rcheck'
* using R version 3.6.1 (2019-07-05)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'caretEnsemble/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'caretEnsemble' version '2.0.1'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
Maintainer: 'Zachary A. Deane-Mayer <zach.mayer@gmail.com>'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking serialization versions ... OK
* checking whether package 'caretEnsemble' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [13s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... [6s] OK
** running examples for arch 'x64' ... [7s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [99s] OK
  Running 'testthat.R' [99s]
** running tests for arch 'x64' ... [125s] OK
  Running 'testthat.R' [125s]
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking re-building of vignette outputs ... [105s] OK
* checking PDF version of manual ... OK
* DONE
Status: OK
* installing *source* package 'caretEnsemble' ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* MD5 sums
packaged installation of 'caretEnsemble' as caretEnsemble_2.0.1.zip
* DONE (caretEnsemble)
zachmayer commented 4 years ago

New build is live on CRAN! https://cran.r-project.org/web/packages/caretEnsemble/index.html