Skip to content

Commit

Permalink
remove url checks from download_sedac*
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellmanware committed Jan 18, 2024
1 parent 1f57e82 commit 970dea0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
12 changes: 0 additions & 12 deletions R/download.R
Original file line number Diff line number Diff line change
Expand Up @@ -1438,12 +1438,6 @@ download_sedac_groads_data <- function(
format,
".zip"
)
if (!(check_url_status(download_url, method = "GET"))) {
stop(paste0(
"Invalid input returns HTTP code 404. ",
"Check parameters.\n"
))
}
#### 9. build download file name
download_name <- paste0(
directory_to_download,
Expand Down Expand Up @@ -1623,12 +1617,6 @@ download_sedac_population_data <- function(
format,
".zip"
)
if (!(check_url_status(download_url, method = "GET"))) {
stop(paste0(
"Invalid input returns HTTP code 404. ",
"Check parameters.\n"
))
}
#### 10. build download file name
download_name <- paste0(
directory_to_download,
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-download_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ testthat::test_that("Errors when temporal ranges invalid.", {
)
expect_error(
download_sedac_population_data(
year = "1900",
year = "1000",
data_download_acknowledgement = TRUE,
directory_to_save = "../testdata",
directory_to_download = "../testdata"
directory_to_download = "../testdata",
unzip = FALSE
)
)
expect_error(
Expand Down

0 comments on commit 970dea0

Please sign in to comment.