Ryan-Riggs / RivRetrieve

Other
9 stars 2 forks source link

Cran check #19

Closed simonmoulds closed 1 year ago

simonmoulds commented 1 year ago

This commit corrects a few things to make sure that the package passes the CRAN checks:

  1. Replace the rvest::session(...) call in southAfrica(), which was causing it to fail on some Linux systems, with GET(...)
  2. Remove the tests that download data, because the Brazil ANA API is currently down (has been for some weeks)
  3. In the vignette, replace brazil(...) with australia(...), for the above reason

Note that including real calls to remote servers in vignettes or tests is fraught with danger, because as soon as one of these falls over the package build tests will start failing. An alternative is to use httptest, but I need to look into exactly how to implement that.

Ryan-Riggs commented 1 year ago

Thanks, Simon. I thought about removing the tests involving accessing the websites but I wasn't sure if that was best practice or not. But I agree that it will cause the package to regularly fail tests because the websites will inevitably go down at some point. I'll try submitting to CRAN again.