Skip to content

Commit

Permalink
remove spurious options in download.file()
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Oct 17, 2024
1 parent 0c544ac commit 3c280df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions R/get_radar_imagery.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,29 +177,22 @@ get_radar_imagery <- get_radar <-
if (is.null(path)) {
path <- tempfile(fileext = ".gif", tmpdir = tempdir())
}
h <- curl::new_handle()
curl::handle_setopt(
handle = h,
TCP_KEEPALIVE = 200000,
CONNECTTIMEOUT = 90
)

tryCatch({
if (download_only == TRUE) {
utils::download.file(
url = fp,
destfile = path,
mode = "wb",
quiet = TRUE,
handle = h
quiet = TRUE
)
message("file downloaded to:", path)
} else {
utils::download.file(
url = fp,
destfile = path,
mode = "wb",
quiet = TRUE,
handle = h
quiet = TRUE
)
message("file downloaded to:", path)
y <- magick::image_read(path = path)
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
"applicationCategory": "Tools",
"isPartOf": "https://ropensci.org",
"keywords": ["dpird", "bom", "meteorological-data", "weather-forecast", "australia", "weather", "weather-data", "meteorology", "western-australia", "australia-bureau-of-meteorology", "western-australia-agriculture", "australia-agriculture", "australia-climate", "australia-weather", "rstats", "climate", "api-client", "data", "weather-api", "rainfall", "r"],
"fileSize": "5563.401KB",
"fileSize": "5563.203KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down Expand Up @@ -698,7 +698,7 @@
],
"releaseNotes": "https://github.com/ropensci/weatherOz/blob/master/NEWS.md",
"readme": "https://github.com/ropensci/weatherOz/blob/main/README.md",
"contIntegration": ["https://github.com/ropensci/weatherOz/actions/workflows/R-CMD-check.yaml", "https://github.com/ropensci/weatherOz/actions/workflows/test-coverage.yaml", "https://app.codecov.io/gh/ropensci/weatherOz"],
"contIntegration": ["https://github.com/ropensci/weatherOz/actions/workflows/R-CMD-check.yaml", "https://app.codecov.io/gh/ropensci/weatherOz"],
"developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#stable",
"review": {
"@type": "Review",
Expand Down

0 comments on commit 3c280df

Please sign in to comment.