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 that fns are pipe-compatible #203

Open
mpadge opened this issue Jul 5, 2024 · 0 comments
Open

Check that fns are pipe-compatible #203

mpadge opened this issue Jul 5, 2024 · 0 comments

Comments

@mpadge
Copy link
Member

mpadge commented Jul 5, 2024

Idea from @PietrH via internal https://ropensci.slack.com/archives/C05C3GP1CSU/p1719994234029299, to check that

That functions that return objects of the same class as their input, have this input argument in the first position (for pipe compatability)

Or even to ensure that functions return consistent output, also as per tidyverse style guide. Implementing directly would, however, be arguably proscriptive. There may indeed be valid cases for alternative API designs, so this would need to be carefully thought out. Implementation would nevertheless be relatively straighjtforward, and would only require additional typetracer dependency here. @PietrH also happy to further discuss ideas, approaches, and viability here. Thanks for the input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant