Skip to content

Commit

Permalink
Remove ellipsis in favour of rlang. (#283)
Browse files Browse the repository at this point in the history
Co-authored-by: Julia Silge <julia.silge@gmail.com>
  • Loading branch information
olivroy and juliasilge authored Jul 3, 2024
1 parent e353c3b commit 5c321a4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Imports:
butcher (>= 0.3.1),
cereal,
cli,
ellipsis,
fs,
generics,
glue,
Expand Down
2 changes: 1 addition & 1 deletion R/endpoint.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#'
predict.vetiver_endpoint <- function(object, new_data, ...) {
rlang::check_installed(c("jsonlite", "httr"))
ellipsis::check_dots_used()
check_dots_used()
data_json <- jsonlite::toJSON(new_data, na = "string")
ret <- httr::POST(object$url, ..., body = data_json)
resp <- httr::content(ret, "text", encoding = "UTF-8")
Expand Down
2 changes: 1 addition & 1 deletion R/prototype.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ vetiver_ptype.default <- function(model, ...) {
#' @rdname vetiver_create_ptype
#' @export
vetiver_create_ptype <- function(model, save_prototype, ...) {
ellipsis::check_dots_used()
check_dots_used()
if (isTRUE(save_prototype)) {
ptype <- vetiver_ptype(model, ...)
} else if (isFALSE(save_prototype)) {
Expand Down
2 changes: 1 addition & 1 deletion R/rsconnect.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ vetiver_deploy_rsconnect <- function(board, name, version = NULL,
...,
additional_pkgs = character(0)) {

ellipsis::check_dots_used()
check_dots_used()
tmp <- fs::dir_create(tempdir(), "vetiver")
vetiver_write_plumber(board = board,
name = name,
Expand Down
4 changes: 2 additions & 2 deletions R/sagemaker.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ vetiver_deploy_sagemaker <- function(board,
endpoint_args = list(),
repo_name = glue("vetiver-sagemaker-{name}")) {

ellipsis::check_dots_empty()
check_dots_empty()
if (!inherits(board, "pins_board_s3")) {
stop_input_type(board, "an S3 pins board")
}
Expand Down Expand Up @@ -207,7 +207,7 @@ vetiver_sm_build <- function(board,
log = TRUE,
...) {
check_installed("smdocker")
ellipsis::check_dots_used()
check_dots_used()
compute_type <- arg_match(compute_type)
docker_args <- list_modify(docker_args, port = 8080)
predict_args <- list_modify(predict_args, path = "/invocations")
Expand Down
6 changes: 3 additions & 3 deletions R/vetiver-model.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ vetiver_model <- function(model,
save_ptype = deprecated(),
versioned = NULL) {

ellipsis::check_dots_used()
check_dots_used()
if (lifecycle::is_present(save_ptype)) {
lifecycle::deprecate_soft(
"0.2.0",
Expand Down Expand Up @@ -131,7 +131,7 @@ print.vetiver_model <- function(x, ...) {

#' @export
predict.vetiver_model <- function(object, ...) {
ellipsis::check_dots_used()
check_dots_used()
model <- bundle::unbundle(object$model)
predict(model, ...)
}
Expand All @@ -140,7 +140,7 @@ predict.vetiver_model <- function(object, ...) {

#' @export
augment.vetiver_model <- function(x, ...) {
ellipsis::check_dots_used()
check_dots_used()
model <- bundle::unbundle(x$model)
augment(model, ...)
}
Expand Down
2 changes: 1 addition & 1 deletion R/write-docker.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ vetiver_write_docker <- function(vetiver_model,
expose = TRUE,
additional_pkgs = character(0)) {

ellipsis::check_dots_empty()
check_dots_empty()

if (!fs::file_exists(plumber_file)) {
cli::cli_abort(
Expand Down

0 comments on commit 5c321a4

Please sign in to comment.