From c4f62db11a0165bc4b1c8e01998d969bd9e1e19a Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Fri, 21 Jun 2024 18:32:30 -0700 Subject: [PATCH 1/5] usethis::use_tidy_description() --- DESCRIPTION | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6215be2..6226441 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,12 +4,11 @@ Version: 0.0.0.9000 Authors@R: person("Emil", "Hvitfeldt", , "emil.hvitfeldt@posit.co", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-0679-1945")) -Description: Turning tidymodels workflows into series of equations, to allow - for low dependency prediction locally or in databases. +Description: Turning tidymodels workflows into series of equations, to + allow for low dependency prediction locally or in databases. License: MIT + file LICENSE -Encoding: UTF-8 -Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1.9000 +URL: https://github.com/EmilHvitfeldt/orbital +BugReports: https://github.com/EmilHvitfeldt/orbital/issues Imports: cli, recipes (>= 1.0.10.9000), @@ -18,13 +17,14 @@ Imports: workflows Suggests: dbplyr, - dtplyr, dplyr, + dtplyr, jsonlite, parsnip, testthat (>= 3.0.0) -URL: https://github.com/EmilHvitfeldt/orbital -BugReports: https://github.com/EmilHvitfeldt/orbital/issues -Config/testthat/edition: 3 Remotes: tidymodels/recipes +Config/testthat/edition: 3 +Encoding: UTF-8 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.1.9000 From 5d1c7f463a0247ff925a88ea3f7e4f58998c39e7 Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Fri, 21 Jun 2024 18:39:43 -0700 Subject: [PATCH 2/5] move recipes to suggests --- DESCRIPTION | 2 +- R/dt.R | 2 +- R/inline.R | 2 +- R/json.R | 4 ++-- R/mutate.R | 2 +- R/orbital.R | 2 +- R/predict.R | 2 +- R/sql.R | 2 +- R/to.R | 2 +- man/orbital.Rd | 3 ++- man/orbital_dt.Rd | 2 +- man/orbital_inline.Rd | 2 ++ man/orbital_json_read.Rd | 2 +- man/orbital_json_write.Rd | 2 +- man/orbital_predict.Rd | 4 ++++ man/orbital_sql.Rd | 2 +- man/to_r_fun.Rd | 2 ++ tests/testthat/test-dt.R | 1 + tests/testthat/test-inline.R | 2 ++ tests/testthat/test-json.R | 1 + tests/testthat/test-orbital.R | 5 +++++ tests/testthat/test-predict.R | 1 + tests/testthat/test-sql.R | 1 + 23 files changed, 35 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6226441..1f2cc1e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,7 +11,6 @@ URL: https://github.com/EmilHvitfeldt/orbital BugReports: https://github.com/EmilHvitfeldt/orbital/issues Imports: cli, - recipes (>= 1.0.10.9000), rlang, tidypredict, workflows @@ -21,6 +20,7 @@ Suggests: dtplyr, jsonlite, parsnip, + recipes (>= 1.0.10.9000), testthat (>= 3.0.0) Remotes: tidymodels/recipes diff --git a/R/dt.R b/R/dt.R index 8ba5232..3e13cc6 100644 --- a/R/dt.R +++ b/R/dt.R @@ -4,7 +4,7 @@ #' #' @returns data.table code. #' -#' @examplesIf rlang::is_installed(c("dbplyr", "dtplyr")) +#' @examplesIf rlang::is_installed(c("dbplyr", "dtplyr", "recipes")) #' #' library(workflows) #' library(recipes) diff --git a/R/inline.R b/R/inline.R index 118c434..64e83df 100644 --- a/R/inline.R +++ b/R/inline.R @@ -10,7 +10,7 @@ #' #' @returns a list of quosures. #' -#' @examples +#' @examplesIf rlang::is_installed("recipes") #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/json.R b/R/json.R index f7ffcec..483df02 100644 --- a/R/json.R +++ b/R/json.R @@ -7,7 +7,7 @@ #' #' @seealso [orbital_json_read()] #' -#' @examplesIf rlang::is_installed("jsonlite") +#' @examplesIf rlang::is_installed(c("jsonlite", "recipes")) #' library(workflows) #' library(recipes) #' library(parsnip) @@ -46,7 +46,7 @@ orbital_json_write <- function(x, path) { #' #' @seealso [orbital_json_write()] #' -#' @examplesIf rlang::is_installed("jsonlite") +#' @examplesIf rlang::is_installed(c("jsonlite", "recipes")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/mutate.R b/R/mutate.R index 76c1f02..4850030 100644 --- a/R/mutate.R +++ b/R/mutate.R @@ -5,7 +5,7 @@ #' #' @returns A modified data frame. #' -#' @examples +#' @examplesIf rlang::is_installed("recipes") #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/orbital.R b/R/orbital.R index 9b6bd3a..0df4fd0 100644 --- a/R/orbital.R +++ b/R/orbital.R @@ -5,7 +5,7 @@ #' #' @returns A orbital object. #' -#' @examples +#' @examplesIf rlang::is_installed("recipes") #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/predict.R b/R/predict.R index 07e449f..e432028 100644 --- a/R/predict.R +++ b/R/predict.R @@ -5,7 +5,7 @@ #' #' @returns A modified data frame. #' -#' @examples +#' @examplesIf rlang::is_installed("recipes") #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/sql.R b/R/sql.R index 156aeb2..4769bcc 100644 --- a/R/sql.R +++ b/R/sql.R @@ -5,7 +5,7 @@ #' #' @returns SQL code. #' -#' @examplesIf rlang::is_installed("dbplyr") +#' @examplesIf rlang::is_installed(c("dbplyr", "recipes")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/to.R b/R/to.R index 4e24f14..7573b5d 100644 --- a/R/to.R +++ b/R/to.R @@ -6,7 +6,7 @@ #' #' @returns A orbital object. #' -#' @examples +#' @examplesIf rlang::is_installed("recipes") #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/man/orbital.Rd b/man/orbital.Rd index 93b9ac9..9cc5b87 100644 --- a/man/orbital.Rd +++ b/man/orbital.Rd @@ -18,6 +18,7 @@ A orbital object. Turn tidymodels workflows into equations } \examples{ +\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -32,5 +33,5 @@ wf_spec <- workflow(rec_spec, lm_spec) wf_fit <- fit(wf_spec, mtcars) orbital(wf_fit) - +\dontshow{\}) # examplesIf} } diff --git a/man/orbital_dt.Rd b/man/orbital_dt.Rd index d741c13..96cd9dd 100644 --- a/man/orbital_dt.Rd +++ b/man/orbital_dt.Rd @@ -16,7 +16,7 @@ data.table code. Convert to data.table code } \examples{ -\dontshow{if (rlang::is_installed(c("dbplyr", "dtplyr"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("dbplyr", "dtplyr", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) diff --git a/man/orbital_inline.Rd b/man/orbital_inline.Rd index ddffd8c..5233595 100644 --- a/man/orbital_inline.Rd +++ b/man/orbital_inline.Rd @@ -21,6 +21,7 @@ This function is mostly going to be used for See examples for use cases. } \examples{ +\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -40,4 +41,5 @@ library(dplyr) mtcars \%>\% mutate(!!!orbital_inline(orbital_obj)) +\dontshow{\}) # examplesIf} } diff --git a/man/orbital_json_read.Rd b/man/orbital_json_read.Rd index 8a758b0..2584384 100644 --- a/man/orbital_json_read.Rd +++ b/man/orbital_json_read.Rd @@ -16,7 +16,7 @@ A orbital object Read orbital json file } \examples{ -\dontshow{if (rlang::is_installed("jsonlite")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("jsonlite", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_json_write.Rd b/man/orbital_json_write.Rd index d85a360..4575b1f 100644 --- a/man/orbital_json_write.Rd +++ b/man/orbital_json_write.Rd @@ -18,7 +18,7 @@ nothing. Save as json file } \examples{ -\dontshow{if (rlang::is_installed("jsonlite")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("jsonlite", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_predict.Rd b/man/orbital_predict.Rd index 195112a..9eda1b5 100644 --- a/man/orbital_predict.Rd +++ b/man/orbital_predict.Rd @@ -24,6 +24,7 @@ Use orbital in a mutate way Use orbital in a mutate way } \examples{ +\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -41,6 +42,8 @@ orbital_obj <- orbital(wf_fit) mtcars \%>\% orbital_predict(orbital_obj) +\dontshow{\}) # examplesIf} +\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -58,4 +61,5 @@ orbital_obj <- orbital(wf_fit) mtcars \%>\% orbital_predict(orbital_obj) +\dontshow{\}) # examplesIf} } diff --git a/man/orbital_sql.Rd b/man/orbital_sql.Rd index a27a043..7a01167 100644 --- a/man/orbital_sql.Rd +++ b/man/orbital_sql.Rd @@ -18,7 +18,7 @@ SQL code. Convert to SQL code } \examples{ -\dontshow{if (rlang::is_installed("dbplyr")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("dbplyr", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/to_r_fun.Rd b/man/to_r_fun.Rd index a7e25a8..f8fecb5 100644 --- a/man/to_r_fun.Rd +++ b/man/to_r_fun.Rd @@ -20,6 +20,7 @@ A orbital object. Turn orbital object into a R function } \examples{ +\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -40,4 +41,5 @@ file_name <- tempfile() to_r_fun(orbital_obj, file = file_name) readLines(file_name) +\dontshow{\}) # examplesIf} } diff --git a/tests/testthat/test-dt.R b/tests/testthat/test-dt.R index 2641513..03f9ddb 100644 --- a/tests/testthat/test-dt.R +++ b/tests/testthat/test-dt.R @@ -1,4 +1,5 @@ test_that("dt works", { + skip_if_not_installed("recipes") skip_if_not_installed("dbplyr") skip_if_not_installed("dtplyr") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% diff --git a/tests/testthat/test-inline.R b/tests/testthat/test-inline.R index 9d5d458..6c908c6 100644 --- a/tests/testthat/test-inline.R +++ b/tests/testthat/test-inline.R @@ -1,4 +1,6 @@ test_that("orbital works with workflows - recipe", { + skip_if_not_installed("recipes") + rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-json.R b/tests/testthat/test-json.R index d2fd806..1f87aa5 100644 --- a/tests/testthat/test-json.R +++ b/tests/testthat/test-json.R @@ -1,4 +1,5 @@ test_that("read and write json works", { + skip_if_not_installed("recipes") skip_if_not_installed("jsonlite") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-orbital.R b/tests/testthat/test-orbital.R index 054cd66..23a8a32 100644 --- a/tests/testthat/test-orbital.R +++ b/tests/testthat/test-orbital.R @@ -1,4 +1,5 @@ test_that("orbital works with workflows - recipe", { + skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -53,6 +54,7 @@ test_that("orbital works with workflows - variables", { }) test_that("orbital errors on non-trained workflow", { + skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -67,6 +69,7 @@ test_that("orbital errors on non-trained workflow", { }) test_that("orbital works with recipe", { + skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -80,6 +83,7 @@ test_that("orbital works with recipe", { }) test_that("orbital errors untrained recipe", { + skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -136,6 +140,7 @@ test_that("orbital errors on wrong input", { }) test_that("orbital printing works", { + skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-predict.R b/tests/testthat/test-predict.R index f89180d..cd3d718 100644 --- a/tests/testthat/test-predict.R +++ b/tests/testthat/test-predict.R @@ -1,4 +1,5 @@ test_that("orbital works with workflows - recipe", { + skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-sql.R b/tests/testthat/test-sql.R index e828784..694d4f4 100644 --- a/tests/testthat/test-sql.R +++ b/tests/testthat/test-sql.R @@ -1,4 +1,5 @@ test_that("sql works", { + skip_if_not_installed("recipes") skip_if_not_installed("dbplyr") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) From 80564e52b7e88e34361b56a2ee7436071835cfe3 Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Fri, 21 Jun 2024 18:52:25 -0700 Subject: [PATCH 3/5] move tidypredict to suggests --- DESCRIPTION | 4 ++-- R/dt.R | 2 +- R/inline.R | 2 +- R/json.R | 4 ++-- R/mutate.R | 2 +- R/orbital.R | 2 +- R/predict.R | 2 +- R/sql.R | 2 +- R/to.R | 2 +- man/orbital.Rd | 2 +- man/orbital_dt.Rd | 2 +- man/orbital_inline.Rd | 2 +- man/orbital_json_read.Rd | 2 +- man/orbital_json_write.Rd | 2 +- man/orbital_predict.Rd | 4 ++-- man/orbital_sql.Rd | 2 +- man/to_r_fun.Rd | 2 +- tests/testthat/test-dt.R | 2 ++ tests/testthat/test-inline.R | 1 + tests/testthat/test-json.R | 1 + tests/testthat/test-orbital.R | 6 ++++++ tests/testthat/test-predict.R | 1 + tests/testthat/test-sql.R | 2 ++ 23 files changed, 33 insertions(+), 20 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1f2cc1e..199e6b8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,7 +12,6 @@ BugReports: https://github.com/EmilHvitfeldt/orbital/issues Imports: cli, rlang, - tidypredict, workflows Suggests: dbplyr, @@ -21,7 +20,8 @@ Suggests: jsonlite, parsnip, recipes (>= 1.0.10.9000), - testthat (>= 3.0.0) + testthat (>= 3.0.0), + tidypredict Remotes: tidymodels/recipes Config/testthat/edition: 3 diff --git a/R/dt.R b/R/dt.R index 3e13cc6..17b93fd 100644 --- a/R/dt.R +++ b/R/dt.R @@ -4,7 +4,7 @@ #' #' @returns data.table code. #' -#' @examplesIf rlang::is_installed(c("dbplyr", "dtplyr", "recipes")) +#' @examplesIf rlang::is_installed(c("dbplyr", "dtplyr", "recipes", "tidypredict")) #' #' library(workflows) #' library(recipes) diff --git a/R/inline.R b/R/inline.R index 64e83df..4fb072d 100644 --- a/R/inline.R +++ b/R/inline.R @@ -10,7 +10,7 @@ #' #' @returns a list of quosures. #' -#' @examplesIf rlang::is_installed("recipes") +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/json.R b/R/json.R index 483df02..d2fbf67 100644 --- a/R/json.R +++ b/R/json.R @@ -7,7 +7,7 @@ #' #' @seealso [orbital_json_read()] #' -#' @examplesIf rlang::is_installed(c("jsonlite", "recipes")) +#' @examplesIf rlang::is_installed(c("jsonlite", "recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) @@ -46,7 +46,7 @@ orbital_json_write <- function(x, path) { #' #' @seealso [orbital_json_write()] #' -#' @examplesIf rlang::is_installed(c("jsonlite", "recipes")) +#' @examplesIf rlang::is_installed(c("jsonlite", "recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/mutate.R b/R/mutate.R index 4850030..555723e 100644 --- a/R/mutate.R +++ b/R/mutate.R @@ -5,7 +5,7 @@ #' #' @returns A modified data frame. #' -#' @examplesIf rlang::is_installed("recipes") +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/orbital.R b/R/orbital.R index 0df4fd0..88780ee 100644 --- a/R/orbital.R +++ b/R/orbital.R @@ -5,7 +5,7 @@ #' #' @returns A orbital object. #' -#' @examplesIf rlang::is_installed("recipes") +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/predict.R b/R/predict.R index e432028..c7dd552 100644 --- a/R/predict.R +++ b/R/predict.R @@ -5,7 +5,7 @@ #' #' @returns A modified data frame. #' -#' @examplesIf rlang::is_installed("recipes") +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/sql.R b/R/sql.R index 4769bcc..3a76528 100644 --- a/R/sql.R +++ b/R/sql.R @@ -5,7 +5,7 @@ #' #' @returns SQL code. #' -#' @examplesIf rlang::is_installed(c("dbplyr", "recipes")) +#' @examplesIf rlang::is_installed(c("dbplyr", "recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/to.R b/R/to.R index 7573b5d..c877f62 100644 --- a/R/to.R +++ b/R/to.R @@ -6,7 +6,7 @@ #' #' @returns A orbital object. #' -#' @examplesIf rlang::is_installed("recipes") +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/man/orbital.Rd b/man/orbital.Rd index 9cc5b87..873b9fa 100644 --- a/man/orbital.Rd +++ b/man/orbital.Rd @@ -18,7 +18,7 @@ A orbital object. Turn tidymodels workflows into equations } \examples{ -\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_dt.Rd b/man/orbital_dt.Rd index 96cd9dd..0d592d2 100644 --- a/man/orbital_dt.Rd +++ b/man/orbital_dt.Rd @@ -16,7 +16,7 @@ data.table code. Convert to data.table code } \examples{ -\dontshow{if (rlang::is_installed(c("dbplyr", "dtplyr", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("dbplyr", "dtplyr", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) diff --git a/man/orbital_inline.Rd b/man/orbital_inline.Rd index 5233595..00dc44d 100644 --- a/man/orbital_inline.Rd +++ b/man/orbital_inline.Rd @@ -21,7 +21,7 @@ This function is mostly going to be used for See examples for use cases. } \examples{ -\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_json_read.Rd b/man/orbital_json_read.Rd index 2584384..6b21d26 100644 --- a/man/orbital_json_read.Rd +++ b/man/orbital_json_read.Rd @@ -16,7 +16,7 @@ A orbital object Read orbital json file } \examples{ -\dontshow{if (rlang::is_installed(c("jsonlite", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("jsonlite", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_json_write.Rd b/man/orbital_json_write.Rd index 4575b1f..59e4c92 100644 --- a/man/orbital_json_write.Rd +++ b/man/orbital_json_write.Rd @@ -18,7 +18,7 @@ nothing. Save as json file } \examples{ -\dontshow{if (rlang::is_installed(c("jsonlite", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("jsonlite", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_predict.Rd b/man/orbital_predict.Rd index 9eda1b5..84fef54 100644 --- a/man/orbital_predict.Rd +++ b/man/orbital_predict.Rd @@ -24,7 +24,7 @@ Use orbital in a mutate way Use orbital in a mutate way } \examples{ -\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -43,7 +43,7 @@ orbital_obj <- orbital(wf_fit) mtcars \%>\% orbital_predict(orbital_obj) \dontshow{\}) # examplesIf} -\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_sql.Rd b/man/orbital_sql.Rd index 7a01167..d6d5ebc 100644 --- a/man/orbital_sql.Rd +++ b/man/orbital_sql.Rd @@ -18,7 +18,7 @@ SQL code. Convert to SQL code } \examples{ -\dontshow{if (rlang::is_installed(c("dbplyr", "recipes"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("dbplyr", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/to_r_fun.Rd b/man/to_r_fun.Rd index f8fecb5..d9931a9 100644 --- a/man/to_r_fun.Rd +++ b/man/to_r_fun.Rd @@ -20,7 +20,7 @@ A orbital object. Turn orbital object into a R function } \examples{ -\dontshow{if (rlang::is_installed("recipes")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/tests/testthat/test-dt.R b/tests/testthat/test-dt.R index 03f9ddb..38c1bed 100644 --- a/tests/testthat/test-dt.R +++ b/tests/testthat/test-dt.R @@ -2,6 +2,8 @@ test_that("dt works", { skip_if_not_installed("recipes") skip_if_not_installed("dbplyr") skip_if_not_installed("dtplyr") + skip_if_not_installed("tidypredict") + rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-inline.R b/tests/testthat/test-inline.R index 6c908c6..aa58a39 100644 --- a/tests/testthat/test-inline.R +++ b/tests/testthat/test-inline.R @@ -1,5 +1,6 @@ test_that("orbital works with workflows - recipe", { skip_if_not_installed("recipes") + skip_if_not_installed("tidypredict") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-json.R b/tests/testthat/test-json.R index 1f87aa5..ad04294 100644 --- a/tests/testthat/test-json.R +++ b/tests/testthat/test-json.R @@ -1,5 +1,6 @@ test_that("read and write json works", { skip_if_not_installed("recipes") + skip_if_not_installed("tidypredict") skip_if_not_installed("jsonlite") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-orbital.R b/tests/testthat/test-orbital.R index 23a8a32..f38f7ee 100644 --- a/tests/testthat/test-orbital.R +++ b/tests/testthat/test-orbital.R @@ -1,5 +1,6 @@ test_that("orbital works with workflows - recipe", { skip_if_not_installed("recipes") + skip_if_not_installed("tidypredict") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -20,6 +21,7 @@ test_that("orbital works with workflows - recipe", { }) test_that("orbital works with workflows - formula", { + skip_if_not_installed("tidypredict") lm_spec <- parsnip::linear_reg() wf_spec <- workflows::workflow() %>% @@ -37,6 +39,7 @@ test_that("orbital works with workflows - formula", { }) test_that("orbital works with workflows - variables", { + skip_if_not_installed("tidypredict") lm_spec <- parsnip::linear_reg() wf_spec <- workflows::workflow() %>% @@ -69,6 +72,7 @@ test_that("orbital errors on non-trained workflow", { }) test_that("orbital works with recipe", { + skip_if_not_installed("tidypredict") skip_if_not_installed("recipes") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -94,6 +98,7 @@ test_that("orbital errors untrained recipe", { }) test_that("orbital works with parsnip", { + skip_if_not_installed("tidypredict") lm_spec <- parsnip::linear_reg() lm_fit <- parsnip::fit(lm_spec, mpg ~ ., data = mtcars) @@ -141,6 +146,7 @@ test_that("orbital errors on wrong input", { test_that("orbital printing works", { skip_if_not_installed("recipes") + skip_if_not_installed("tidypredict") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-predict.R b/tests/testthat/test-predict.R index cd3d718..2069b9c 100644 --- a/tests/testthat/test-predict.R +++ b/tests/testthat/test-predict.R @@ -1,5 +1,6 @@ test_that("orbital works with workflows - recipe", { skip_if_not_installed("recipes") + skip_if_not_installed("tidypredict") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-sql.R b/tests/testthat/test-sql.R index 694d4f4..7faaf07 100644 --- a/tests/testthat/test-sql.R +++ b/tests/testthat/test-sql.R @@ -1,6 +1,8 @@ test_that("sql works", { skip_if_not_installed("recipes") skip_if_not_installed("dbplyr") + skip_if_not_installed("tidypredict") + rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) From e214b0fce89e74f1109a757b213cc9ce23512359 Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Fri, 21 Jun 2024 19:05:28 -0700 Subject: [PATCH 4/5] move workflows to suggests --- DESCRIPTION | 6 +++--- R/dt.R | 2 +- R/inline.R | 2 +- R/json.R | 4 ++-- R/mutate.R | 2 +- R/orbital.R | 2 +- R/predict.R | 2 +- R/sql.R | 2 +- R/to.R | 2 +- man/orbital.Rd | 2 +- man/orbital_dt.Rd | 2 +- man/orbital_inline.Rd | 2 +- man/orbital_json_read.Rd | 2 +- man/orbital_json_write.Rd | 2 +- man/orbital_predict.Rd | 4 ++-- man/orbital_sql.Rd | 2 +- man/to_r_fun.Rd | 2 +- tests/testthat/test-dt.R | 1 + tests/testthat/test-inline.R | 1 + tests/testthat/test-json.R | 1 + tests/testthat/test-orbital.R | 6 ++++++ tests/testthat/test-predict.R | 1 + tests/testthat/test-sql.R | 1 + 23 files changed, 32 insertions(+), 21 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 199e6b8..114c326 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,8 +11,7 @@ URL: https://github.com/EmilHvitfeldt/orbital BugReports: https://github.com/EmilHvitfeldt/orbital/issues Imports: cli, - rlang, - workflows + rlang Suggests: dbplyr, dplyr, @@ -21,7 +20,8 @@ Suggests: parsnip, recipes (>= 1.0.10.9000), testthat (>= 3.0.0), - tidypredict + tidypredict, + workflows Remotes: tidymodels/recipes Config/testthat/edition: 3 diff --git a/R/dt.R b/R/dt.R index 17b93fd..00b9c37 100644 --- a/R/dt.R +++ b/R/dt.R @@ -4,7 +4,7 @@ #' #' @returns data.table code. #' -#' @examplesIf rlang::is_installed(c("dbplyr", "dtplyr", "recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("dbplyr", "dtplyr", "recipes", "tidypredict", "workflows")) #' #' library(workflows) #' library(recipes) diff --git a/R/inline.R b/R/inline.R index 4fb072d..7e8005c 100644 --- a/R/inline.R +++ b/R/inline.R @@ -10,7 +10,7 @@ #' #' @returns a list of quosures. #' -#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/json.R b/R/json.R index d2fbf67..e7c8323 100644 --- a/R/json.R +++ b/R/json.R @@ -7,7 +7,7 @@ #' #' @seealso [orbital_json_read()] #' -#' @examplesIf rlang::is_installed(c("jsonlite", "recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("jsonlite", "recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) @@ -46,7 +46,7 @@ orbital_json_write <- function(x, path) { #' #' @seealso [orbital_json_write()] #' -#' @examplesIf rlang::is_installed(c("jsonlite", "recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("jsonlite", "recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/mutate.R b/R/mutate.R index 555723e..a5cf29c 100644 --- a/R/mutate.R +++ b/R/mutate.R @@ -5,7 +5,7 @@ #' #' @returns A modified data frame. #' -#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/orbital.R b/R/orbital.R index 88780ee..91a9411 100644 --- a/R/orbital.R +++ b/R/orbital.R @@ -5,7 +5,7 @@ #' #' @returns A orbital object. #' -#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/predict.R b/R/predict.R index c7dd552..c184d27 100644 --- a/R/predict.R +++ b/R/predict.R @@ -5,7 +5,7 @@ #' #' @returns A modified data frame. #' -#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/sql.R b/R/sql.R index 3a76528..32a8935 100644 --- a/R/sql.R +++ b/R/sql.R @@ -5,7 +5,7 @@ #' #' @returns SQL code. #' -#' @examplesIf rlang::is_installed(c("dbplyr", "recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("dbplyr", "recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/R/to.R b/R/to.R index c877f62..76880c4 100644 --- a/R/to.R +++ b/R/to.R @@ -6,7 +6,7 @@ #' #' @returns A orbital object. #' -#' @examplesIf rlang::is_installed(c("recipes", "tidypredict")) +#' @examplesIf rlang::is_installed(c("recipes", "tidypredict", "workflows")) #' library(workflows) #' library(recipes) #' library(parsnip) diff --git a/man/orbital.Rd b/man/orbital.Rd index 873b9fa..5e300e4 100644 --- a/man/orbital.Rd +++ b/man/orbital.Rd @@ -18,7 +18,7 @@ A orbital object. Turn tidymodels workflows into equations } \examples{ -\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_dt.Rd b/man/orbital_dt.Rd index 0d592d2..977e244 100644 --- a/man/orbital_dt.Rd +++ b/man/orbital_dt.Rd @@ -16,7 +16,7 @@ data.table code. Convert to data.table code } \examples{ -\dontshow{if (rlang::is_installed(c("dbplyr", "dtplyr", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("dbplyr", "dtplyr", "recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) diff --git a/man/orbital_inline.Rd b/man/orbital_inline.Rd index 00dc44d..7722417 100644 --- a/man/orbital_inline.Rd +++ b/man/orbital_inline.Rd @@ -21,7 +21,7 @@ This function is mostly going to be used for See examples for use cases. } \examples{ -\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_json_read.Rd b/man/orbital_json_read.Rd index 6b21d26..62addc2 100644 --- a/man/orbital_json_read.Rd +++ b/man/orbital_json_read.Rd @@ -16,7 +16,7 @@ A orbital object Read orbital json file } \examples{ -\dontshow{if (rlang::is_installed(c("jsonlite", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("jsonlite", "recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_json_write.Rd b/man/orbital_json_write.Rd index 59e4c92..237c101 100644 --- a/man/orbital_json_write.Rd +++ b/man/orbital_json_write.Rd @@ -18,7 +18,7 @@ nothing. Save as json file } \examples{ -\dontshow{if (rlang::is_installed(c("jsonlite", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("jsonlite", "recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_predict.Rd b/man/orbital_predict.Rd index 84fef54..c8e764e 100644 --- a/man/orbital_predict.Rd +++ b/man/orbital_predict.Rd @@ -24,7 +24,7 @@ Use orbital in a mutate way Use orbital in a mutate way } \examples{ -\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) @@ -43,7 +43,7 @@ orbital_obj <- orbital(wf_fit) mtcars \%>\% orbital_predict(orbital_obj) \dontshow{\}) # examplesIf} -\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/orbital_sql.Rd b/man/orbital_sql.Rd index d6d5ebc..64d401a 100644 --- a/man/orbital_sql.Rd +++ b/man/orbital_sql.Rd @@ -18,7 +18,7 @@ SQL code. Convert to SQL code } \examples{ -\dontshow{if (rlang::is_installed(c("dbplyr", "recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("dbplyr", "recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/man/to_r_fun.Rd b/man/to_r_fun.Rd index d9931a9..6a55eab 100644 --- a/man/to_r_fun.Rd +++ b/man/to_r_fun.Rd @@ -20,7 +20,7 @@ A orbital object. Turn orbital object into a R function } \examples{ -\dontshow{if (rlang::is_installed(c("recipes", "tidypredict"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("recipes", "tidypredict", "workflows"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} library(workflows) library(recipes) library(parsnip) diff --git a/tests/testthat/test-dt.R b/tests/testthat/test-dt.R index 38c1bed..b5629bd 100644 --- a/tests/testthat/test-dt.R +++ b/tests/testthat/test-dt.R @@ -3,6 +3,7 @@ test_that("dt works", { skip_if_not_installed("dbplyr") skip_if_not_installed("dtplyr") skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-inline.R b/tests/testthat/test-inline.R index aa58a39..7c35dc4 100644 --- a/tests/testthat/test-inline.R +++ b/tests/testthat/test-inline.R @@ -1,6 +1,7 @@ test_that("orbital works with workflows - recipe", { skip_if_not_installed("recipes") skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-json.R b/tests/testthat/test-json.R index ad04294..e3bd030 100644 --- a/tests/testthat/test-json.R +++ b/tests/testthat/test-json.R @@ -2,6 +2,7 @@ test_that("read and write json works", { skip_if_not_installed("recipes") skip_if_not_installed("tidypredict") skip_if_not_installed("jsonlite") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-orbital.R b/tests/testthat/test-orbital.R index f38f7ee..05e7f90 100644 --- a/tests/testthat/test-orbital.R +++ b/tests/testthat/test-orbital.R @@ -1,6 +1,7 @@ test_that("orbital works with workflows - recipe", { skip_if_not_installed("recipes") skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -22,6 +23,7 @@ test_that("orbital works with workflows - recipe", { test_that("orbital works with workflows - formula", { skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") lm_spec <- parsnip::linear_reg() wf_spec <- workflows::workflow() %>% @@ -40,6 +42,7 @@ test_that("orbital works with workflows - formula", { test_that("orbital works with workflows - variables", { skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") lm_spec <- parsnip::linear_reg() wf_spec <- workflows::workflow() %>% @@ -58,6 +61,7 @@ test_that("orbital works with workflows - variables", { test_that("orbital errors on non-trained workflow", { skip_if_not_installed("recipes") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) @@ -120,6 +124,7 @@ test_that("orbital errors on non-trained parsnip", { }) test_that("orbital errors nicely on post-processing", { + skip_if_not_installed("workflows") lm_spec <- parsnip::linear_reg() wf_spec <- workflows::workflow() %>% @@ -147,6 +152,7 @@ test_that("orbital errors on wrong input", { test_that("orbital printing works", { skip_if_not_installed("recipes") skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-predict.R b/tests/testthat/test-predict.R index 2069b9c..4081fb4 100644 --- a/tests/testthat/test-predict.R +++ b/tests/testthat/test-predict.R @@ -1,6 +1,7 @@ test_that("orbital works with workflows - recipe", { skip_if_not_installed("recipes") skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) diff --git a/tests/testthat/test-sql.R b/tests/testthat/test-sql.R index 7faaf07..5811d5c 100644 --- a/tests/testthat/test-sql.R +++ b/tests/testthat/test-sql.R @@ -2,6 +2,7 @@ test_that("sql works", { skip_if_not_installed("recipes") skip_if_not_installed("dbplyr") skip_if_not_installed("tidypredict") + skip_if_not_installed("workflows") rec_spec <- recipes::recipe(mpg ~ ., data = mtcars) %>% recipes::step_normalize(recipes::all_numeric_predictors()) From e24eef0aeeba247ea70ff202448840d0004d512f Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Fri, 21 Jun 2024 19:20:50 -0700 Subject: [PATCH 5/5] add missing skip_if_not_installed --- tests/testthat/test-orbital.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-orbital.R b/tests/testthat/test-orbital.R index 05e7f90..a4969fa 100644 --- a/tests/testthat/test-orbital.R +++ b/tests/testthat/test-orbital.R @@ -115,6 +115,7 @@ test_that("orbital works with parsnip", { }) test_that("orbital errors on non-trained parsnip", { + skip_if_not_installed("parsnip") lm_spec <- parsnip::linear_reg() expect_snapshot(