From 4efe187dd7a710e375f121c5fbc867be6eb590dc Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Fri, 8 Sep 2023 08:31:13 -0600 Subject: [PATCH] Use base R `deparse()` when writing `plumber.R` (#241) * Use base R `deparse()` * Update NEWS * Pin vdiffr due to r-lib/vdiffr#137 --- .github/workflows/R-CMD-check.yaml | 3 ++- NEWS.md | 2 ++ R/write-plumber.R | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 9ebe9b48..32048006 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -52,7 +52,8 @@ jobs: extra-packages: any::rcmdcheck, any::cpp11, - ranger=?ignore-before-r=4.1.0 + ranger=?ignore-before-r=4.1.0, + vdiffr@1.0.5 needs: check - name: Install Miniconda & Tensorflow diff --git a/NEWS.md b/NEWS.md index 005ffae2..bb6a4283 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # vetiver (development version) +* Fixed how plumber files are generated for `board_url()` (#241). + # vetiver 0.2.3 * Updated test involving renv and rsconnect (#230). diff --git a/R/write-plumber.R b/R/write-plumber.R index 5128c684..2b77c238 100644 --- a/R/write-plumber.R +++ b/R/write-plumber.R @@ -59,7 +59,7 @@ vetiver_write_plumber <- function(board, name, version = NULL, load_infra_pkgs <- glue_collapse(glue("library({infra_pkgs})"), sep = "\n") load_required_pkgs <- glue_required_pkgs(v$metadata$required_pkgs, rsconnect) - board <- rlang::expr_deparse(pins::board_deparse(board)) + board <- deparse(pins::board_deparse(board)) board <- glue('b <- {board}') if (rlang::is_empty(plumber_dots)) {