JGCRI / fldgen

Given a global mean temperature pathway, generate random global climate fields consistent with it and with spatial and temporal correlation derived from an ESM
https://jgcri.github.io/fldgen/
GNU General Public License v2.0
12 stars 6 forks source link

'reading and writing models works' test fails #40

Closed kdorheim closed 4 years ago

kdorheim commented 4 years ago

the 'reading and writing models works' test_writedata.R fails it contains the following comments

## These tests are kind of long, since the fldgen objects are rather large.
## Therefore, skip them on the CI environments, which are somewhat
## time-sensitive.  And since we're skipping them on the CI, I also haven't
## included the data file in the repository (it is quite large for the time
## being).  We can revisit this once we find a way to shrink the memory
## footprint of the fldgen objects.
kdorheim commented 4 years ago

Right now it does not look like we have access to the data needed for this test. It looks like it was something that might have been developed to run on a local test and it is unclear if there is a record about how the test data was generated. @crvernon, @FeralFlows, and @abigailsnyder do you think I could comment out this test for now to get the github actions up and running?

abigailsnyder commented 4 years ago

error details (from Kalyn's machine and githubs test on a windows machine):

> test_check("fldgen")

  -- 1. Error: reading and writing models works (@test_writedata.R#59)  ----------

  cannot open the connection

  Backtrace:

    1. testthat::expect_silent(testmodel1 <- loadmodel(oldfile, oldfmt = TRUE))

    9. fldgen::loadmodel(oldfile, oldfmt = TRUE)

   10. base::load(file)

   11. base::readChar(con, 5L, useBytes = TRUE)

  == testthat results  ===========================================================

  [ OK: 233 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]

  1. Error: reading and writing models works (@test_writedata.R#59) 

Depending on what we figure out is causing the test failure, it's possible this may be related to missing data / weird vertical striping in results that @crvernon @FeralFlows are seeing. It may also be completely unrelated and just a test quirk due to updated packages at some point or something.

abigailsnyder commented 4 years ago

Right now it does not look like we have access to the data needed for this test. It looks like it was something that might have been developed to run on a local test and it is unclear if there is a record about how the test data was generated. @crvernon, @FeralFlows, and @abigailsnyder do you think I could comment out this test for now to get the github actions up and running?

@kdorheim I think commenting it out so that we can see if there are any other errors to deal with on the github actions make sense, and then we can circle back to figuring this one out. I do think it's important that we figure it out (I know you do too), but whether we figure it out and then deal with github actions or deal with github actions and then figure it out...I don't think it matters too much

crvernon commented 4 years ago

Agree with @abigailsnyder

abigailsnyder commented 4 years ago

@kdorheim I wonder if this error has anything with changes made in this commit https://github.com/JGCRI/fldgen/commit/ab31dcf27f8d4c1fd62cc899a3a923f5b9e23c25

might be worth checking when we do circle back to digging into the write test

abigailsnyder commented 4 years ago

Follow up notes: The offending test is one making sure that results previously saved as .rda agree with results saved as .rds.

It's failing because the old .rda data is not being carried anymore. We also never actually use the loadmodel or savemodel functions this test is for, so I'm stripping those functions and this test out of the code in an upcoming PR.