-
Notifications
You must be signed in to change notification settings - Fork 13
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
Build fail - tests #189
Comments
The tests in your PR all work fine on my mac but fail on my ubuntu box, the same way Travis does. This probably isn't the issue, but I'm confused by this bit at the top of dir <- tempdir()
dir.create(dir, showWarnings = FALSE) I think I guess it's possible this is freaking the travis environment out somehow |
Got it. Linux is case-sensitive in file paths, the other OSs aren't.
so it just needs minor edits in the tests |
Or rather that only fixes the first failure. I suspect the rest have something to do with unlinking the temporary directory at the end of this BuildModule script, since the rest are to do with downloading. Will investigate further... |
Great, I came to the same conclusions. I forget that tempdir() returned a directory that existed. I thought it was a character vector to create a directory. Let's see... |
It doesn't seem to be just that, but will try on travis shortly to check |
Still failing: https://travis-ci.org/zoonproject/zoon/builds/84484148 I can replicate this when doing R CMD check at the console, but not when running interactively (or sourcing the test script). It passes fine interactively. No helpful error messages either. Grrr. |
Thanks, yeah the PR fails. We fixed about half of them. These must be able to run since the last successful travis run included these tests... I just have to figure out what has changed since then. |
See here, which refers to a previous bug of mine: I've just tested it by adding |
These errors are consistent with an error in the occurrence module, and I can simulate it with this: work2 <- workflow(occurrence = SpOcc(species = 'Anopheles plumbeus',
extent = c(-Inf, 10, 45, 65)),
covariate = UKAir,
process = OneHundredBackground,
model = RandomForest,
output = SameTimePlaceMap) So it looks like it's to do with downloading that data. Maybe the connection times out or doesn't have permission? |
Yeah, figures, but why did it work in the past and not now. The current (successfully building) version has the same test in it! |
... |
Nope that still works |
Wait.... has the module changed between these commits?? |
Nope not that either... argh |
weirdly I can't get bf7b272 to pass now either, and that's the last good build on Travis. That suggests (but it's not certain) that something external has changed - presumably |
I also just ran that and found the same. Also I can replecate teh error on my machine using
|
Okay, I'm going to comment these tests out and move on. I'll come back to it later by which time it might have fixed itself! |
…se is not clear, see issue zoonproject#189. This is a tempory measure to pass build
Seems sensible. I just ran the following code to find dependencies of library(versions)
deps <- unique(names(get('imports', envir = spocc:::.__NAMESPACE__.)))
versions <- available.versions(deps[-1]) # first is base which we can't get versions for
idx <- sapply(versions, function (x) isTRUE(any(x$date >= as.Date('2015-10-07'))))
versions[idx]
Which would point the finger of blame squarely at But after running: install.versions('rgbif', '0.8.8') I still get the errors... Maybe it's GBIF itself? |
Note to self:
Will try this and switching back to the metacran Travis yaml (with fix mentioned above) at some point. |
Found the problem. There was another unlink lurking in another test file. My bad. |
Aaaaah. Well done! |
This issue has returned, suggesting that the reason tests including spocc ran successfully for me was independent from the unlink line. I have run It is interesting that there is a I changed the tests to a much smaller extent, thinking that this might reduce download time and lessen the chance of time outs. I changed the extent from |
I managed to get some console output from the tests and here is where it is going wrong:
It looks like spocc uses MASS but this is not specified in the description. I can fix this issue now by loading in the MASS library prior to spocc in our module but perhaps this can be fixed in spocc? |
I'm not sure that's it. I just got this on my ubuntu box, using the version of
|
Those are different failures... It suggests you box is failing on this: workSyn <- workflow(occurrence = UKAnophelesPlumbeus,
covariate = 'UKAir',
process = BackgroundAndCrossvalid(k=2),
model = list(LogisticRegression, RandomForest),
output = Chain('SameTimePlaceMap', 'SameTimePlaceMap')) |
hi all - so you think this is a
We do run tests nightly on Travis and Appveyor (passing now https://travis-ci.org/ropensci/spocc/builds/83326392). I just don't run on CRAN b/c well it's CRAN |
yeah, that fails on one ubuntu box and not the other, best we ignore that for now (though weird that it also fails with as-cran and not without). |
Using my otherwise working ubuntu box, the main repo version as of tom's previous PR: 323c6fd it works fine. But if I uncomment those tests that depend on So I still think the main issue is some sort of CRAN testing timeout, rather than |
Hi @sckott , I was having issues calling
Could this be because Probably not an issue to worry about since all your tests are passing. @goldingn since I was getting an error Tom |
@AugustT was this failing in |
I'll have a look |
@goldingn Yes it was failing there. What I did was comment out all the tests and then uncomment L 57-66. work2 <- workflow(occurrence = SpOcc(species = 'Anopheles plumbeus',
extent = c(-10, 10, 45, 65)),
covariate = UKAir,
process = OneHundredBackground,
model = RandomForest,
output = SameTimePlaceMap)
expect_true(exists('work2'))
expect_equal(names(work2), expected_names)
expect_is(work2$occurrence.output[[1]], 'data.frame') This meant that I got back more useful information in the console (because check() only shows you the last ~13 lines to console. This failed when MASS was not loaded and then passed when I added in the loading MASS line. |
Ah right. When I uncomment the whole thing, I get:
So it looks like your |
Sorry, miscounted lines. In fact I get a failure on line 67 that seems to work for you. |
|
hmm, check and tests run fine for me locally. Where is the error occurring. |
I've just pushed a branch to my fork which should reproduce this: https://github.com/goldingn/zoon/tree/checkfail and created a PR to force a Travis run: https://travis-ci.org/goldingn/zoon/builds/84933122 @sckott we have these tests commented out in the master, this fork is the failing one |
this all looks to be fixed now: https://travis-ci.org/goldingn/zoon/builds/85023423 |
glad its working. in my playing around I couldn't figure out anything wrong... |
Thanks for looking! Will let you know of we figure out the root cause of that MASS/spocc error |
@goldingn Great work Nick! Do I still need to use the 'skip on cran' command or are we simply going to let it fail on the cran test and be happy with this as long as it passes the other tests? I also noticed that the Travis run now takes 1hr 30min. That seems like a very long time? Is that normal? My rnbn Travis takes only 1min 30sec, but that could be abnormally fast? |
Nope, it works without It should only take a little over 20 mins. There are four runs in parallel though and it reports the total. 1min 30s is impressive! Presumably its using docker on Travis. That's apparently tricky to do with a complex build like this, its an issue on r-builder though. The best way of speeding this up now would be reducing dependencies I think. |
Fab, great work for getting this sorted! |
I think that travis fails if a test tries to write to disk. I'm not 100% but it would be consistent with the current build failure in my PR
The text was updated successfully, but these errors were encountered: