-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
use roxytypes
and roxylint
packages
#228
Comments
I went ahead and fleshed out the |
There is already a solution for templating and auto populating roxy docs {sinew}. |
This is super cool! I’d be totally fine using something other than what I slapped together- frankly I just went down the rabbit hole exploring the idea. By the time I was satisfied it was very little effort to tie a package shaped bow on it. In |
Thanks a lot @dgkf for putting the options together, and also the first prototype. Also thanks @yonicd for the pointer to sinew! |
Contribution to sinew is always welcome. It certainly makes pkg dev life simpler for users. |
I think we can next try to use |
roxytypes
and roxylint
packages
I've made a couple contributions so far where the vast majority of the review process circles around formatting of params. Admittedly I'm new to this convention, but I'm finding it excessively burdensome and sensitive.
As a newcomer developer to this project the easiest solution is not to document internal functions or to introduce as few supporting functions as possible, which probably means we've incentivized the wrong behaviors.
To help lower the barrier to entry, I'd like to propose a few paths that might lighten this load. In decreasing order of the amount of work it would take to implement:
Roxygen2 Solution
The most idiomatic solution would be to build a supporting package that provides a roxygen2 tag. We could hash out the syntax a bit, but I would propose something like:
Handling it this way, we could expose options that are set in the
DESCRIPTION
to configure behaviors.This would help shift formatting mishaps into documentation errors or warnings to lighten some of the review overhead and would make it much easier to tweak formatting.
If there's interest in having something like this, I don't mind devoting a couple days to fleshing it out. I think it could be a relatively quick win. As much as I'm a skeptic of trying to wrangle R's dynamic typing with hints, I'd be happy to chip away at the burden this introduces by automating some of these mundane formatting concerns.
@eval
SolutionIf we don't want to go off and build a supporting package, an alternative solution would be just to add a little internal helper function. Something as simple as:
or
Would go a long way to enforcing consistency programmatically. The examples above are trivial implementations, but a more comprehensive solution could enforce the casing and punctuation to make compliance a documentation-time warning/error instead of adding manual review overhead.
Less-strict
@params
notationFinally, as a "least-work" solution, just improving consistency and perhaps being a bit less sensitive would go a long way toward easing the developer overhead.
Currently we require a syntax of:
This is a unique mix of markdown, Rd TeX, and tidyverse style with its own unique quirks. As a "least-work" approach, just relaxing these requirements or reducing the uniqueness of it would be a welcome change. I would propose to reduce flavor-mixing by disregarding the
\cr
and adopting thetidyverse
style guide for sentence casing. If we're going to be particular, we could at least try not to be unique.On a related note, I would also lean toward the
tidyverse
convention for titles, which uses sentence-case instead of title-case to reduce the uniqueness of the package conventions.The text was updated successfully, but these errors were encountered: