ropensci / taxizedb

Tools for Working with Taxonomic SQL Databases
Other
30 stars 7 forks source link

possibly use cached `taxize` objects for test suite? #32

Open sckott opened 6 years ago

sckott commented 6 years ago

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 commented 6 years ago

related to 1031a57e427c3da568d14083b0e425258194a89c

arendsee commented 6 years ago

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.

sckott commented 6 years ago

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

arendsee commented 6 years ago

@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?

sckott commented 6 years ago

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

maelle commented 2 years ago

unarchiving it thanks to @stitam :smile_cat: