Chicago / RSocrata

Provides easier interaction with Socrata open data portals http://dev.socrata.com. Users can provide a 'Socrata' data set resource URL, or a 'Socrata' Open Data API (SoDA) web query, or a 'Socrata' "human-friendly" URL, returns an R data frame. Converts dates to 'POSIX' format. Manages throttling by 'Socrata'.
https://CRAN.R-project.org/package=RSocrata
Other
236 stars 84 forks source link

Skipping tests that call out to external resources when running as CRAN (Issue217) #219

Closed geneorama closed 1 year ago

geneorama commented 1 year ago

I have inserted skips for external calls.

Originally I planned to create a wrapper, but I'm not sure that would be wise. We would still have to maintain each test separately and decide if it belonged in the regular testthat or a wrapper version. So, adding the skips was more explicit.

I also updated the maintainer as instructed.

Additionally, I did some minor work to separate out the authorization tests. I did that because I think there was a little weirdness in the environmental variables, and separating them would make it easier to manage. For some reason we were using the get system variable command rather than setting the variables. It happened to work, but only because it created a global variable in the process (I think by accident). I think keeping those tests separate improves the clarity and reduces the work if we reinstate those tests.

geneorama commented 1 year ago

Skipping the tests seems to work with the code changes, however, I have not been able to get it to reliably skip the test locally. It works manually, but devtools / RStudio doesn’t always seem to respect the environment variables / flags.

geneorama commented 1 year ago

@nicklucius good catch, thanks!