Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messaging for step_cut() with missing data #1359

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

jrwinget
Copy link
Contributor

Fixes #1351

Updated the create_full_breaks() function to provide a more informative error message when step_cut() is applied to a column containing missing values (NA). The function now checks for missing data and warns users appropriately.

Fixes tidymodels#1351

Updated the `create_full_breaks()` function to provide a more informative error message when `step_cut()` is applied to a column containing missing values (`NA`). The function now checks for missing data and warns users appropriately.
@EmilHvitfeldt
Copy link
Member

EmilHvitfeldt commented Aug 15, 2024

Looking great! would you kindly add some snapshot tests using extract_snapshot() in https://github.com/tidymodels/recipes/blob/main/tests/testthat/test-cut.R so we can verify that they trigger correctly.

Those tests should be placed above https://github.com/tidymodels/recipes/blob/main/tests/testthat/test-cut.R#L171

@jrwinget
Copy link
Contributor Author

Sure thing - thanks for the feedback!

@jrwinget
Copy link
Contributor Author

I've added the snapshot tests and pushed the changes. Please take a look when you have a moment. Thanks again!!

@topepo topepo merged commit bdb7e40 into tidymodels:main Oct 31, 2024
13 checks passed
@topepo
Copy link
Member

topepo commented Oct 31, 2024

Thanks for the contribution!

Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uninformative error when step_cut() is applied to column with missing values
3 participants