DrylandEcology / rSFSW2

rSFSW2: A R package to create soil water balance simulation experiment
GNU General Public License v3.0
8 stars 7 forks source link

rSFSW2 Master Build Failing on CI #357

Closed nip5 closed 5 years ago

nip5 commented 5 years ago

rSFSW2 master branch is failing on Travis whereas the branch was passing when ran three months ago. I think the reason is that three months ago the CI was running it using R version 3.5.1 and now is running it on R version 3.5.2 and dependencies that are grabbed online may have also been updated. The build says to see /home/travis/build/DrylandEcology/rSFSW2/rSFSW2.Rcheck/00check.log for details, but I'm not sure where to find this. Sources online seem to think it needs to be cated to the screen in the .yml file. @dschlaep should we pursue this?

nip5 commented 5 years ago

This was partially caused by the DayMet tests not properly dealing with the weather data being unavailable, this issue is fixed in branch Bugfix#357_DayMet_Validation. However, test_projects.Ris still failing due to missing P_ids causing information to not be written to the dbOutput database.

nip5 commented 5 years ago

The specific error contained within runDataSC post test is: Error in rSOILWAT2::sw_exec(inputData = swRunScenariosData[[sc]], weatherList = i_sw_weatherList[[scw]], : \n REAL() can only be applied to a 'numeric', not a 'integer'\n" attr(,"class")

But simply converting these inputs into integers causes more issues down the road as well as some values are expected to be integers per their class definitions. @dschlaep

nip5 commented 5 years ago

The issue now seems to be fixed on Caitlin's local (unix) and AppVeyor (windows) but fails on both my local and Travis CI, both Linux. Thus it seems like a weird Linux thing.

nip5 commented 5 years ago

This is fixed on my local as well now but still fails on Travis, I'm thinking this has to do with the package circular not properly being loaded in. This would cause both overall_mean and overall_sd databases to not populate correctly and thus it would fail the test_projects tests.

CaitlinA commented 5 years ago

The issue seems to be somewhat of a repeat of issue #82. The tests are passing locally on multiple OSs, and even on the CI, but the tests fail when R CMD check is invoked.

`checking tests ... Running ‘testthat.R’ [544s/545s] ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: [1] "'dbConnect2': 2019-02-19 21:59:47 attempt to connect after 0 s" [1] "'dbWork_update_status': 2019-02-19 21:59:47 (FALSE) attempt to update after 0 s" [1] "'dbWork_update_status': 2019-02-19 21:59:47 (FALSE) transaction confirmed after 0 s" [1] "No missing Pids found: dbOutCurrent database is complete." [1] "rSFSW2's 'check_outputDB_completeness': ended after 0.22 s"

###########################################################################

------ rSFSW2-PROJECT: 'TestPrj4' run on local platform ended at 2019-02-19 21:59:47

###########################################################################

Error: Test failures Tracing test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, .... on exit Untracing function "test_files" in package "namespace:testthat" Execution halted

dschlaep commented 5 years ago

At least on my machine, the unit tests were failing because TestPrj4 produced an empty output database -- because every simulation run failed due to "Simulation run fails if transpiration regions defined as type integer" (https://github.com/DrylandEcology/rSOILWAT2/issues/136). With rSOILWAT2 v2.3.5 this is fixed and all package checks for rSFSW2 pass on my local machine.

nip5 commented 5 years ago

The same thing happened on mine so I ended up creating another branch that fixes that as well but if it was already fixed in v2.3.5 then I'll go with that.