Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ShixiangWang committed Nov 23, 2020
1 parent cf0d04f commit a1aef01
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2020-11-15.
Once it is accepted, delete this file and tag the release (commit 9a9558a).
This package was submitted to CRAN on 2020-11-23.
Once it is accepted, delete this file and tag the release (commit cf0d04f).
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: UCSCXenaTools
Title: Download and Explore Datasets from UCSC Xena Data Hubs
Version: 1.3.5
Version: 1.3.6
Authors@R: c(person("Shixiang", "Wang", email = "w_shixiang@163.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9855-7357")),
person("Xue-Song", "Liu", role = "aut", comment = c(ORCID = "0000-0002-7736-0077")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# UCSCXenaTools 1.3.6

- Fixed a bug about try times for data download.
- Make sure a message instead of an error will be returned if download process failed.

# UCSCXenaTools 1.3.5

- Added TDI data Hub containing 9 new datasets.
Expand Down
12 changes: 10 additions & 2 deletions R/XenaDownload.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,15 @@ XenaDownload <- function(xquery,
x[4] <- gsub(pattern = "\\.gz$", "", x[4])
x[5] <- gsub(pattern = "\\.gz$", "", x[5])
message("Try downloading file", x[4], "...")
download.file2(x[3], destfile = x[5], max_try = max_try, ...)
tryCatch(
{
download.file2(x[3], destfile = x[5], max_try = max_try, ...)
},
error = function(e) {
message("Your network is bad (try again) or the data source is invalid (report to the developer).")
invisible(NULL)
}
)
}
)
}) # nocov end
Expand Down Expand Up @@ -121,7 +129,7 @@ download.file2 <- function(url, destfile,
if (max_try == 1) {
stop("Tried 3 times but failed, please check your internet connection!")
} else {
download.file(url, destfile, max_try = max_try - 1L, ...)
download.file2(url, destfile, max_try = max_try - 1L, ...)
}
}
)
Expand Down

0 comments on commit a1aef01

Please sign in to comment.