Closed AugustT closed 8 years ago
I have hit a number of issues in the process but one I'm struggling to overcome
A number of packages seem to refuse to install when GetPackage is called. This is an issue when checking devtools::check()
but not in testing devtools::test()
Here is the sort of error I get on Travis
ERROR: dependency ‘KernSmooth’ is not available for package ‘gplots’
* removing ‘/tmp/RtmpdFNGJa/RLIBS_72391050bd62/gplots’
ERROR: dependency ‘gplots’ is not available for package ‘ROCR’
* removing ‘/tmp/RtmpdFNGJa/RLIBS_72391050bd62/ROCR’
ERROR: dependencies ‘ROCR’, ‘rpart’ are not available for package ‘sperrorest’
* removing ‘/tmp/RtmpdFNGJa/RLIBS_72391050bd62/sperrorest’
The downloaded source packages are in
'/tmp/RtmpSc0Eq7/downloaded_packages'
7. Error: Check PROCESS output formats for PartitionDisc.R ---------------------
there is no package called 'sperrorest'
1: suppressWarnings({
pro_return <- do.call(roxy_parse$name, args = list(.data = .data))
})
While some other packages seem to install just fine. @goldingn can you try this on your linux box.
Installing these packages beforehand in the yml file does not solve the issue.
Another approach is to re-write the yml file to only run the test script, which might be a better approach
I'm beginning to think this might be an issue with the way GetPackage behaves in checks...
I think it is as I suspected. I have added this test to the zoon package and it now fails on Travis
rncep <- try(zoon::GetPackage('RNCEP'), silent = TRUE)
expect_null(rncep, info = 'GetPackage has failed with "RNCEP"')
Can't figure out why though
Is it only the packages that require external packages? On linux (guess mac is the same) you need gdal-lib-dev or whatever it is to install rgdal? GetPackage obviously doesn't deal with this.
I don't think so it appears to affect a range of packages but let me double check. Note it fails locally on my machine too.
I can confirm this same error occurs for lme4
. It fails in devtools::check()
but not devtools::test()
. I wonder if it has something to do with libs
or repos
arguments to install.packages
and if these are changed when running checks
Aah the arcane inner workings of testthat. Still want me to test something on linux?
I was lying on a picnic blanket in bordeaux yesterday, enjoying the 30c sunshine and decided I will just write a script that finds all the packages loaded with getpackage and add them to the namespace. We need the testing the work and this, thought inelegant, should do the job. I don't think there is a solution to the specific testthat issue. I suggest it is not tested.
☀️ 🍷 😎 💻 👍
There are numerous modules that fail testing. These have been missed as the module testing has secretly stopped working on Travis (they will have failed the tests in BuildModule). Fix coming in PR (once I have fixed all the failing modules).