tidymodels / rsample

Classes and functions to create and summarize resampling objects
https://rsample.tidymodels.org
Other
341 stars 66 forks source link

Check `prop` argument #551

Closed hfrick closed 2 months ago

hfrick commented 2 months ago

For #541 and #458

This PR reworks how the prop argument to various functions is checked.

Several of the functions had a written-out check block in either the user-facing function or the underlying *_split() function. The functions for grouped resampling were checking prop deep down the call chain with a check_prop().

I've decided to place the check in the user-facing functions and reworked it a little to benefit from the "friendly object type" in the standard checkers from rlang and only do the boundaries in a custom way.

github-actions[bot] commented 1 month ago

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.