taxizedb icon indicating copy to clipboard operation
taxizedb copied to clipboard

possibly use cached `taxize` objects for test suite?

Open sckott opened this issue 7 years ago • 6 comments

This might be a bit tricky, but I guess whenever there's a new version of taxize on cran, then we can re-create the cached objects from taxize - then the test suite here won't fail due to failures in taxize (a lot of failures happen in taxize due to one or more of the many web services being down)

thoughts @arendsee ?

sckott avatar Mar 28 '18 22:03 sckott

related to 1031a57e427c3da568d14083b0e425258194a89c

sckott avatar Mar 28 '18 22:03 sckott

That sounds reasonable. Also caching would speed up running the tests, which are pretty slow right now. Another nice thing about caching is that we can specify exactly what version of taxize we are testing against, and it won't slip around on us and break mysteriously.

arendsee avatar Mar 29 '18 03:03 arendsee

Right - we can use my pkg vcr eventually, but for now we can do it manually

sckott avatar Mar 29 '18 16:03 sckott

@sckott I played a little with this. I'm a worried that it would become messy and hard to maintain, though.

This

expect_equal
  taxizedb::children("asdfasdf", db='ncbi'),
  taxize::children("asdfasdf", db='ncbi')
)

is a lot clearer than this

expect_equal(
  taxizedb::children("asdfasdf", db='ncbi'),
  readRDS("test123.Rda")
)

Can you think of a cleaner approach?

arendsee avatar Apr 05 '18 04:04 arendsee

here's a vcr example https://github.com/ropensci/taxizedb/commit/9fa54201fbc2d793491e2693e93932b9eb14f0e0 on a diff. branch

but i'm still working on some bugs (See https://github.com/ropensci/vcr/milestone/1) - if i can get it to cran soon then we can use it

sckott avatar Apr 05 '18 16:04 sckott

unarchiving it thanks to @stitam :smile_cat:

maelle avatar Sep 09 '22 13:09 maelle