Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package to pass R CMD CHECK for CRAN submission #38

Closed
ramhiser opened this issue May 22, 2017 · 10 comments
Closed

Update package to pass R CMD CHECK for CRAN submission #38

ramhiser opened this issue May 22, 2017 · 10 comments

Comments

@ramhiser
Copy link
Owner

The package was removed from CRAN because there's now a warning.

checking for unstated dependencies in ‘tests’ ... WARNING
'library' or 'require' call not declared from: ‘testthat’

According to this testthat issue, need to add Suggests: testthat to the description file.

@ramhiser
Copy link
Owner Author

The check passes on Mac (local) and Ubuntu (on Travis-CI).

The Windows build is failing with 1 note, 1 warning, and 1 error:

Note

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'John A. Ramey <johnramey@gmail.com>'

New submission

Package was archived on CRAN

CRAN repository db overrides:
  X-CRAN-Comment: Archived on 2017-04-21 as check errors were not
    corrected despite reminders.

Found the following (possibly) invalid URLs:
  URL: http://cran.r-project.org/package=sparsediscrim
    From: README.md
    CRAN URL not in canonical form
  Canonical CRAN.R-project.org URLs use https.

Warning

* checking whether package 'sparsediscrim' can be installed ... WARNING
Found the following significant warnings:
  Warning: Installed Rcpp (0.12.11) different from Rcpp used to build dplyr (0.12.10).
  Warning: Installed R (R Under development (unstable) (2017-05-20 r72713)) different from R used to build dplyr (R Under development (unstable) (2017-05-20 r72708)).
See 'd:/RCompile/CRANguest/R-devel/sparsediscrim.Rcheck/00install.out' for details.

Error

** running tests for arch 'i386' ... [10s] ERROR
  Running 'testthat.r' [9s]
Running the tests in 'tests/testthat.r' failed.
Last 13 lines of output:
  [3]  -0.00192 -  0.00192 == -0.00385
  [4]   0.00376 - -0.00376 ==  0.00753
  [5]  -0.07789 -  0.07789 == -0.15578
  [9]  -0.00192 -  0.00192 == -0.00385
  [13]  0.00376 - -0.00376 ==  0.00753
  
  
  testthat results ================================================================
  OK: 160 SKIPPED: 0 FAILED: 3
  1. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#60) 
  2. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#61) 
  3. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#62) 
  
  Error: testthat unit tests failed
  Execution halted

@DarioS
Copy link

DarioS commented Jul 12, 2017

Will this happen soon? I have a Bioconductor package that depends on sparsediscrim that is no longer able to be built and needs to be resolved before the next version of the repository is released.

@ramhiser
Copy link
Owner Author

@DarioS Yes! I'm blocking out some time this weekend. Sorry about the inconvenience.

@DarioS
Copy link

DarioS commented Aug 11, 2017

Or this weekend?

@ramhiser
Copy link
Owner Author

Running on latest R version 3.4.1. devtools::check() everything passes.

Using devtools::build_win(), tests pass on x64 on Windows, but not on i386.

** running tests for arch 'i386' ... [12s] ERROR
  Running 'testthat.r' [10s]
Running the tests in 'tests/testthat.r' failed.
Last 13 lines of output:
  [3]  -0.00192 -  0.00192 == -0.00385
  [4]   0.00376 - -0.00376 ==  0.00753
  [5]  -0.07789 -  0.07789 == -0.15578
  [9]  -0.00192 -  0.00192 == -0.00385
  [13]  0.00376 - -0.00376 ==  0.00753
  
  
  testthat results ================================================================
  OK: 160 SKIPPED: 0 FAILED: 3
  1. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#60) 
  2. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#61) 
  3. Failure: HDRDA's calculations are correct for (lambda, gamma) = (0, 0) (@test-hdrda.r#62) 
  
  Error: testthat unit tests failed
  Execution halted
** running tests for arch 'x64' ... [11s] OK
  Running 'testthat.r' [11s]

ramhiser added a commit that referenced this issue Aug 12, 2017
ramhiser added a commit that referenced this issue Aug 12, 2017
ramhiser added a commit that referenced this issue Aug 12, 2017
@ramhiser
Copy link
Owner Author

Submitted updated package. We'll see if it makes it through the CRAN gauntlet.

@ramhiser
Copy link
Owner Author

That Windows i386 test failure above came back to haunt me. CRAN denied package submission. Think I'm gonna remove that test for now. I don't have a Windows box to investigate. Especially difficult since it passes on Windows x64.

@ramhiser
Copy link
Owner Author

I submitted another version 2 hours ago. It hasn't been rejected yet, so I think it made it through CRAN's automated checks.

Hopefully, it makes it through the manual BDR check tomorrow. :-\

@DarioS
Copy link

DarioS commented Aug 13, 2017

I have a i386 Windows computer. It turns out that the sign of some of the off-diagonal numbers are the opposite to what is expected.

Browse[1]> W_k$setosa
             [,1]        [,2]         [,3]        [,4]
[1,]  0.158807209  0.08873751 -0.033947619 0.008166478
[2,]  0.088737511  0.09779328 -0.024209703 0.013101441
[3,] -0.033947619 -0.02420970  0.032950803 0.003264817
[4,]  0.008166478  0.01310144  0.003264817 0.013468712
Browse[1]> W_k_expected$setosa
             [,1]        [,2]         [,3]         [,4]
[1,]  0.158807209 -0.08873751  0.033947619 -0.008166478
[2,] -0.088737511  0.09779328 -0.024209703  0.013101441
[3,]  0.033947619 -0.02420970  0.032950803  0.003264817
[4,] -0.008166478  0.01310144  0.003264817  0.013468712

It's likely that the eigenvectors used in the calculation of W_k have the opposite sign on a 32-bit computer.

@ramhiser
Copy link
Owner Author

Just got the note.

Thanks, on CRAN now.

For your next version:
Can you provide some references in the 'Description' field of your DESCRIPTION file in the form
authors (year) <doi:...> or <arXiv:...>
(no space after 'doi:' and 'arXiv:')?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants