Skip to content

Commit

Permalink
remove rsample Suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 27, 2024
1 parent d7a9797 commit 47eda7b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 21 deletions.
2 changes: 0 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Suggests:
methods,
modeldata (>= 1.0.0),
recipes (>= 1.0.10.9000),
rsample (>= 1.2.1.9000),
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder:
Expand All @@ -54,7 +53,6 @@ Config/Needs/website:
tidyverse/tidytemplate,
yardstick
Remotes:
tidymodels/rsample,
tidymodels/recipes,
tidymodels/parsnip,
tidymodels/tailor,
Expand Down
4 changes: 2 additions & 2 deletions R/post-action-tailor.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#' be used to train the postprocessor.
#'
#' In some situations, randomly splitting `fit.workflow(data)` (with
#' [rsample::initial_split()], for example) is sufficient to prevent data
#' `rsample::initial_split()`, for example) is sufficient to prevent data
#' leakage. However, `fit.workflow(data)` could also have arisen as:
#'
#' ```
Expand All @@ -59,7 +59,7 @@
#' datasets, resulting in the preprocessor and model generating predictions on
#' rows they've seen before. Similarly problematic situations could arise in the
#' context of other resampling situations, like time-based splits.
#' In general, use the [rsample::inner_split()] function to prevent data
#' In general, use the `rsample::inner_split()` function to prevent data
#' leakage when resampling; when workflows with postprocessors that require
#' training are passed to the tune package, this is handled internally.
#'
Expand Down
14 changes: 0 additions & 14 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,6 @@ validate_tailor_available <- function(..., call = caller_env()) {
invisible()
}

validate_rsample_available <- function(..., call = caller_env()) {
check_dots_empty()

if (!requireNamespace("rsample", quietly = TRUE)) {
cli_abort(
"The {.pkg rsample} package must be available to add a tailor that
requires training.",
call = call
)
}

invisible()
}

# ------------------------------------------------------------------------------

# https://github.com/r-lib/tidyselect/blob/10e00cea2fff3585fc827b6a7eb5e172acadbb2f/R/utils.R#L109
Expand Down
4 changes: 2 additions & 2 deletions man/add_tailor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/testthat/test-post-action-tailor.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ test_that("postprocessor fit aligns with manually fitted version (no calibration

test_that("postprocessor fit aligns with manually fitted version (with calibration)", {
skip_if_not_installed("modeldata")
skip_if_not_installed("rsample")

# create example data
y <- seq(0, 7, .1)
Expand Down

0 comments on commit 47eda7b

Please sign in to comment.