Check if dataverse on CRAN has been updated beyond 0.2.0
Opened this issue · 1 comments
The icews package will not properly work with the CRAN version of dataverse (0.2.0 from 2017 as I'm writing this). This was brought up here in issues #51 and #58, and is discussed in dataverse at their issue #33 (which I don't want to auto link).
Originally I added a fix by using some dataverse internal functions to re-construct a correct API URL. R check does not like that.
So, instead, I added a warning that is displayed on package attach if the detected dataverse version is below 0.2.1.9001 (here 82e632e). The new version is not on CRAN and has to be manually installed from GitHub.
This doesn't impact the tests, and I just verified that the package will pass R check with the CRAN version of dataverse, even though it will not work. But otherwise I get a R check note about Remotes in the DESCRIPTION file, so I'm gonna take it out prior to release to CRAN.
I previously had code that would issue a warning in .onLoad
. This doesn't work with R check, so I changed it to:
- issue a startup message when the package is attached (
.onAttach
) - issue an error in
download_file()
if that point is reached and the dataverse version is old
All the changes are marked with "see #72", so a file search should show all the relevant bits that need to be removed if this issue ever becomes mute.