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

Suggest Rmd hunks approach for README&vignette? #159

Closed
maelle opened this issue May 14, 2019 · 11 comments
Closed

Suggest Rmd hunks approach for README&vignette? #159

maelle opened this issue May 14, 2019 · 11 comments
Assignees
Milestone

Comments

@maelle
Copy link
Member

maelle commented May 14, 2019

cf https://www.garrickadenbuie.com/blog/dry-vignette-and-readme/

@noamross
Copy link
Contributor

I'm of mixed opinion on this. It needs more real-world testing. I suggest we wait a cycle or two and see how adoption of this or other similar workflows progresses.

@maelle maelle removed this from the 0.3.0 milestone May 16, 2019
@maelle
Copy link
Member Author

maelle commented Jun 10, 2019

So should we even not suggest it at all in the guide? Cf phrasing in #161

@noamross
Copy link
Contributor

I tweaked wording over in #161

@maelle
Copy link
Member Author

maelle commented Jun 18, 2019

Ok, I'll merge, and let this issue open. If we're lucky, by the end-of-the-year release we'll have learnt of other approaches / feedback on this approach. Many thanks @noamross!

@maelle maelle added this to the 0.4.0 milestone Jun 18, 2019
@maelle
Copy link
Member Author

maelle commented Oct 23, 2019

Should we actively ask feedback on the approach (via the forum/Slack) or look into recent repos to see whether anyone uses the approach?

@noamross
Copy link
Contributor

I'd ask if people do it, and see if there are common approaches. But I'm actually not sure this is going to have a lot of uptake, and that may be best. For instance, I think very few people use the roxygen2 tools that allow you to re-use documentation pieces, and the packages that do often have very unhelpful docs, because (1) it's nice for developers to be able to read docs in-source, and (2) you often want subtly different things in different contexts.

@maelle
Copy link
Member Author

maelle commented Oct 24, 2019

Do you know the guide also mentions that roxygen2 functionality? https://devguide.ropensci.org/building.html#documentation "If you prefer not to clutter up code with extensive documentation, place further documentation/examples in files in a man-roxygen folder in the root of your package, and those will be combined into the manual file by the use of @template , for example."

@gadenbuie
Copy link

gadenbuie commented Dec 4, 2019

roxygen2 templates can be particularly helpful when you have a family of functions that all operate on or return a common data type. I found @malcolmbarrett's use of templates in ymlthis to be an elegant example. His templates are also very short and have limited scope, highlighting that they're best used for specific text that you're certain won't change over time or in different function contexts.

@maelle
Copy link
Member Author

maelle commented Dec 4, 2019

Thanks, would you like to make a PR to the dev branch to add a link to this example?

@malcolmbarrett
Copy link

Thanks, @gadenbuie! I picked up a lot about templates from @alexpghayes while working on a broom PR. I think broom has a lot of powerful examples of using templates

maelle added a commit that referenced this issue Jan 30, 2020
@maelle
Copy link
Member Author

maelle commented Jan 30, 2020

I've added suggestions and mentioned the downside. Thanks everyone!

@maelle maelle closed this as completed Jan 30, 2020
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

4 participants