-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cache management #228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good! Shall we merge or are more commits still flowing in?
Seems good. Some notes:
|
Hi! I’ll tackle your comments and I would let you know, thanks both |
Also bump version
Avoid warnings
Once per week
It’s done now, moving to testthat 3 made me change some tests due to deprecations (a bit of pain). I’ll leave it to you if finally you decided to merge @antagomir @pitkant |
Ok to me, how about @pitkant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work, looks great!
Closes #223
See here an implementation of the new cache management. There is a suite of functions that detects the current cache dir (either set up via parameter, via
options(eurostat_cache_dir
or installed in the machine) and manages the download.A similar suite is implemented in two of my packages, already on CRAN: https://github.com/rOpenGov/giscoR and https://github.com/rOpenSpain/mapSpain
The current approach only writes on the temporary directory unless the user set a cache dir. Also, for storing the persistent cache dir with
rappdirs
the user needs to explicitly install the cache dir path withinstall = TRUE
.I updated also some links, the cache parts on the functions that uses it and the
clean_eurostat_cache
function.There is also a whole test suite for that. Note that the test suite also switches temporarly the cache dir to run the tests on a temporary dir, so no files are downloaded or removed on the local machine.
By last, I updated the GH check action to cache dependencies also for Windows (would reduce significantly the running time) and for showing the tests output.