-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Suggestion: remove/change curl::has_internet() from yfR #20
Comments
Hi Julio, I think it is best to add a option as argument (check_internet). You would be surprised how many emails I get when people try to use the package without internet. Btw, can you test |
Thanks for the answer!
pingr::is_online()
#> [1] TRUE Created on 2022-11-11 with reprex v2.0.2 Do you prefer to
I'd be happy to make a PR |
Another option is to use this test (used by > testthat::skip_if_offline
function (host = "r-project.org")
{
skip_on_cran()
skip_if_not_installed("curl")
has_internet <- !is.null(curl::nslookup(host, error = FALSE))
if (!has_internet) {
skip("offline")
}
} This one also works here. This way there's no need to add any new dependencies. |
…kup() (same as testthat) to check internet. Fix ropensci#20
Using pingr is alright, it is a minimal package. Sure, fell free to send a PR. Otherwise I'll fix the code next week. |
Hi! Thanks for this awesome package. We use it a lot in our classes at Insper.
We are facing some issues running
yfR::yf_get()
becausecurl::has_internet()
returnsFALSE
, even though we have a stable internet connection here. Probably it is some proxy issue that we do not control.A suggestion would be to remove this check (if the user does not have internet connection, the download will fail anyway) or add a
check_internet=
parameter havingTRUE
as default.What do you think? Thanks!
The text was updated successfully, but these errors were encountered: