Closed malcolmbarrett closed 3 years ago
Could you add a file with developer guidelines summarizing how these functions should be used? Along the lines of this file in extendr: https://github.com/extendr/extendr/blob/master/MAINTAINERS_GUIDE.md
@clauswilke what do you think about putting it in a CONTRIBUTING.md
generated by usethis::use_tidy_contributing()
?
We have contributing guidelines over at extendr and they could be adapted: https://github.com/extendr/extendr/blob/master/CONTRIBUTING.md
However, I think that's not the place for documentation that would cover internal coding conventions. I'm not sure where that would go, though. Most projects don't have such documentation and it's often a major problem, as nobody knows how exactly code should be written.
Yeah, agreed. usethis has a helpful document along those lines here: https://github.com/r-lib/usethis/blob/master/principles.md and in fact has a section on communicating with the user
Yes, exactly, something like this.
Ok, I added a principles.md
document that includes details on UI and errors. I'll file an issue to include other items outside the scope of this PR
One more thing that I can't check easily from my phone right now: did you add the principles file to .Rbuildignore?
yes, already done
Is there anything blocking this PR?
Not from my end.
@malcolmbarrett , you should probably merge this.
I can't. I don't have access 😎
@malcolmbarrett, oh shoot, I had no idea, I am sorry. If you think it is ready, I can merge it.
No worries! Yes, I think it is ready
Thanks!
This is the first of two PRs that I plan to submit to address #62. Doesn't quite close that issue.
This PR:
ui_*()
functionsui_*()
functions to pipe throughrlang::inform()
and to use the new internal functionbullet()
to format text via cli.ui_throw()
to simplify its logic and userlang::abort()
to throw an error of classrextendr_error
ui_q()
toui_o()
to be more similar tousethis::ui_todo()
, which is usually how questions are asked in usethisusethis.quiet = FALSE
. I did this to be consistent with usethis, although you may prefer a custom option likerextendr.quiet
.expect_rextendr_error()
to more strictly expect an error thrown by rextendr.use_tidy_description()
🧹 😄Shoutout to @Ilia-Kosenkov who laid the groundwork for this PR!