-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Implement download_model()
using {httr2}
and add tests
#885
Conversation
@@ -10,6 +10,8 @@ | |||
#' Optional, and should only be used in case the repository-URL is | |||
#' changing. By default, models are downloaded from | |||
#' `https://raw.github.com/easystats/circus/master/data/`. | |||
#' @param extension File extension. Default is `.rda`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case we ever start saving data in some other format.
download_model <- function(name, | ||
url = "https://raw.github.com/easystats/circus/master/data/", | ||
extension = ".rda", | ||
verbose = TRUE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verbosity is useful here to control output in tests.
tests/testthat/download-model-failure/raw.github.com/easystats/circus/master/data/xyz.rda.R
Outdated
Show resolved
Hide resolved
Do we need both httptest2 and httr2 to use |
httptest2 is for tests, httr2 provides the client. The user needs only the latter. |
thanks! we need to change this (httr -> httr2) in our tests where we use |
You are right! Sorry, missed it in this PR. I should have just removed httr from DESCRIPTION. |
You have removed it. I added it back for the patch-release. Else, this insight release would again break downstream packages 😬 and I thought it would be good not to cause any more despair. ;-) So once all tests in other packages are fixed, we can remove httr (and the helper code I added back temporarily). |
SGTM. |
No description provided.