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

workshop protected arguments warning #1216

Merged
merged 3 commits into from
Oct 25, 2024
Merged

workshop protected arguments warning #1216

merged 3 commits into from
Oct 25, 2024

Conversation

simonpcouch
Copy link
Contributor

I came across this warning while spring cleaning bonsai and felt that it was reasonable that we tested for it but not that we screenshotted it. This PR adds a warning subclass and corrects pluralization in the message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is a totally new test file. This warning is tested in a couple engine-specific files already—I just test for the subclass now.

@@ -32,25 +32,6 @@
x Engine "wat?" is not supported for `mlp()`
i See `show_engines("mlp")`.

---
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of these removed snapshots both tested duplicates of the print method and this warning message.

@simonpcouch
Copy link
Contributor Author

I imagine this will cause snap changes in many places in extratests and parsnip extensions. Those should be able to just test the warning class now.😜

@simonpcouch simonpcouch requested a review from hfrick October 24, 2024 13:50
Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally totally on board with this but hitting "request changes" to make that part obvious. I'm inclined to say that we should add a test that such a protected argument does indeed get protected, not just that it warns. What do you think?

Happy for you to merge after that's fixed 👍

R/arguments.R Show resolved Hide resolved
@simonpcouch simonpcouch merged commit a4f9811 into main Oct 25, 2024
10 checks passed
@simonpcouch simonpcouch deleted the protected-args-error branch October 25, 2024 19:30
Copy link

github-actions bot commented Nov 9, 2024

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 9, 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.

2 participants