ropensci / opencage

:globe_with_meridians: R package for the OpenCage API -- both forward and reverse geocoding :globe_with_meridians:
https://docs.ropensci.org/opencage
87 stars 11 forks source link

add tests using vcr and webmockr #48

Closed maelle closed 1 year ago

maelle commented 6 years ago

a.k.a using this package as a playground to learn about these packages.

dpprdan commented 5 years ago

started at https://github.com/dpprdan/opencage/tree/feat_vcr

dpprdan commented 4 years ago

To use these tests on CRAN as well, we have to wait for a new CRAN release of memoise, so memoise works well with ratelimitr in vcr tests. There is https://github.com/r-lib/memoise/issues/107 to ask for a CRAN release:

maelle commented 4 years ago

So we should skip those tests on CRAN , at least I don't think we want to wait?

dpprdan commented 4 years ago

Maybe we will have to look into the bug more closely. If vcr only works reliably with the fixed memoise version, both in recording and playback, then we can only use it outside of CRAN. And we would have to make sure, that we always use the dev-version of memoise. That sounds doable, but also like something to mess up easily and I don't know whether it is worth the hassle. (Alternatively, wouldn't it be easier to somehow urge Jim to release a new memoise version?)

Maybe it is possible, that we need the memoise fix only for recording? That would make things a bit easier and it would also be possible to use the tests on CRAN. It still sounds fragile, though.

Postpone this to after v0.2 in any case?!

maelle commented 4 years ago

yeah maybe we can ping him again in the issue, just in case it is easy to release a version.

And yes reg postponing!