bcgov / rems

An R package to access data from British Columbia's Environmental Monitoring System
Apache License 2.0
19 stars 5 forks source link

rems cache removed when downloading historic #62

Closed steffilazerte closed 3 years ago

steffilazerte commented 3 years ago

Sorry for the separate issues (I think they're different problems).

In #61 I mentioned that sometimes my rems cache gets removed. I'm not sure if this is meant to happen, but it looks like if the rems cache directory exists, the entire folder is removed when updating historic data... but presumably that isn't meant to happen?

This also removed recent data, and means that my historical data update fails because there's no rems cache folder anymore

https://github.com/bcgov/rems/blob/9d228b7550768e442c617accd378af01389ecce4/R/ems_sqlite.R#L67-L70

Presumably, if the rems cache folder isn't deleted, then my other issue #61 is much less relevant...

Is there something I'm missing?

ateucher commented 3 years ago

I think you're on to something! I'll have a look

ateucher commented 3 years ago

@steffilazerte would you mind testing? You can install from the fix-historic-removal branch.

steffilazerte commented 3 years ago

Will do, but probably tomorrow!

steffilazerte commented 3 years ago

Tested updating existing recent and historical, as well as downloading fresh recent and historical and the cache updated with no problems!. Thanks!