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

Check dots empty #281

Merged
merged 6 commits into from
Jan 13, 2024
Merged

Check dots empty #281

merged 6 commits into from
Jan 13, 2024

Conversation

dsweber2
Copy link
Contributor

Closes #276. the different commits identify confidence in actually using check_dots_used. The slather cases were the most ambiguous to me

@dsweber2 dsweber2 self-assigned this Jan 11, 2024
@dsweber2 dsweber2 requested a review from dajmcdon as a code owner January 11, 2024 22:49
Copy link
Contributor

@dajmcdon dajmcdon left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. The dots arguments are a bit complicated. See for example: https://adv-r.hadley.nz/s3.html#s3-arguments

My understanding is that

  1. The S3 generics in this package need ... because methods may have different arguments. So generics should never check_dots_*.
  2. methods "can" have check_dots_*. However, I've tried to make my versions of functions in {recipes} have similar constructions. So, e.g., epi_recipe methods don't check because recipe methods don't check. I'm not sure I could articulate a reason, but my assumption is "they know better".
  3. add_model() should check because the {workflows} analogues (e.g., add_preprocessor() does.
  4. The slather() methods are more complicated. These aren't particularly user facing, so it may not matter. The bake() methods in {recipes} generally don't check, so I haven't (as in point 2) for example, bake.*()/prep.*()

I've tried to comment on each individually.

R/epi_recipe.R Outdated Show resolved Hide resolved
R/epi_recipe.R Outdated Show resolved Hide resolved
R/epi_workflow.R Outdated Show resolved Hide resolved
R/epi_workflow.R Outdated Show resolved Hide resolved
R/extract.R Outdated Show resolved Hide resolved
R/frosting.R Outdated Show resolved Hide resolved
R/layer_predict.R Outdated Show resolved Hide resolved
R/tidy.R Outdated Show resolved Hide resolved
@dajmcdon dajmcdon merged commit 1aa87bf into main Jan 13, 2024
2 checks passed
@dshemetov dshemetov deleted the check_dots_empty branch January 16, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing check_dots_empty() in arx_args_list()
2 participants