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

cran check error with ndigest #411

Open
jefferis opened this issue Aug 22, 2019 · 4 comments
Open

cran check error with ndigest #411

jefferis opened this issue Aug 22, 2019 · 4 comments

Comments

@jefferis
Copy link
Collaborator

I am not exactly sure of the origin of this error, but the digest value for a particular neuron
is now changed on r-devel

  • unfortunately there seem to be some situations that cause digest differences but
    they are almost impossible to debug on CRAN
  • digest::sha1 does attempt to create a 32/64 bit stable hash,
    but even there are differences across package versions

The exact issue seems to be here:

expect_equal(ndigest(read.neuron('testdata/neuron/EBT7R.am')),
"f24c1252d17b6bd9898c7842f1ad9f5d")

@jefferis
Copy link
Collaborator Author

Here is the CRAN error

Version: 1.8.11 
Check: tests 
Result: ERROR 
     Running 'test-all.R' [31s/36s]
    Running the tests in 'tests/test-all.R' failed.
    Complete output:
     > library(testthat)
     > library(nat)
     Loading required package: rgl
     Registered S3 method overwritten by 'nat':
     method from
     as.mesh3d.ashape3d rgl 
     Some nat functions depend on a CMTK installation. See ?cmtk and README.md for details.
     
     Attaching package: 'nat'
     
     The following objects are masked from 'package:base':
     
     intersect, setdiff, union
     
     > library(httr)
     > 
     > # suppress RGL in headless environments (some CRAN build machines fail otherwise)
     > if(!interactive())
     + Sys.setenv(RGL_USE_NULL=TRUE)
     > 
     > # Is internet accessible?
     > internet.ok = identical(
     + try(
     + status_code(
     + HEAD("http://flybrain.mrc-lmb.cam.ac.uk/", timeout(2))
     + ),
     + silent = TRUE
     + ),
     + 200L
     + )
     > 
     > if(Sys.getenv('NOT_CRAN') == "true" && internet.ok) {
     + # note that we want to run all tests requiring internet access
     + Sys.setenv(NAT_INTERNET_TESTS="TRUE")
     + # Run all test files
     + test_check("nat")
     + } else {
     + # We're on CRAN or flybrain is inacessible, so don't run anything involving 
     + # remote files
     + Sys.setenv(NAT_INTERNET_TESTS="")
     + test_check("nat", filter="^[^.]+")
     + }
     -- 1. Failure: ndigest works for overloaded and regular classes (@test-ndigest.R
     ndigest(read.neuron("testdata/neuron/EBT7R.am")) not equal to "f24c1252d17b6bd9898c7842f1ad9f5d".
     1/1 mismatches
     x[1]: "a84b2255bb21e35d7906c756e7d14e47"
     y[1]: "f24c1252d17b6bd9898c7842f1ad9f5d"
     
     adding: testdata/neuron/testneuron_am3d.am (deflated 45%)
     adding: testdata/neuron/testneuron_lineset.am (deflated 69%)
     adding: DA1/EBH11R.swc (deflated 53%)
     adding: DA1/EBH20R.swc (deflated 54%)
     adding: DA1/EBI12L.swc (deflated 54%)
     adding: DL3/EBH20L.swc (deflated 54%)
     adding: DL3/EBI22R.swc (deflated 53%)
     == testthat results ===========================================================
     [ OK: 793 | SKIPPED: 4 | WARNINGS: 0 | FAILED: 1 ]
     1. Failure: ndigest works for overloaded and regular classes (@test-ndigest.R#12) 

@jefferis
Copy link
Collaborator Author

And the CRAN check status

image

@jefferis
Copy link
Collaborator Author

Worked around by 69d3f2c which simply skips test on CRAN.

@jefferis
Copy link
Collaborator Author

Note that the windows and mac errors/warning are rgl related. So the digest mismatch is apparently due to a change in r-devel / r-patched.

@jefferis jefferis reopened this Aug 25, 2019
jefferis added a commit that referenced this issue Feb 6, 2020
* see #411
* skipped on CRAN anyway but coming up elsewher now
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

1 participant