-
Notifications
You must be signed in to change notification settings - Fork 286
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
Improve the file created by use_vignette()
#445
Comments
I like the idea re: populating title (and in the same way in both places 🙄). I sure wish the duplication wasn't necessary. In theory, the tidyverse/r-lib "default house style" is to not have package vignette authors, at least if it just repeats package authors. But, I grant, it's easier to delete a field than add it! Pre-populating with something from DESCRIPTION sounds interesting, but I'm also suspicious the code necessary to do this, in full generality, is worth the maintenance. If you try it, I'd seriously consider using just maintainer, to guarantee it is ONE name. If that's the wrong name, it is easy enough to edit by hand. I believe the vignette file name is already "asciified"? More specifically, it will not contain a space. I suspect this comes down to whether populating the title is worth departing from the very simple approach we currently have, which just delegates to It's great if you want to explore it, but I think it will be a hard sell if it can't stay very simple and easy to maintain. |
Alrighty. It seems that putting in the authors automatically isn't a great idea, wasn't completely sold on it myself anyway. Could maybe change it to I think changing the Then, to make sure this is all working correctly, I'd write a test which should break if there's a change to What do you think? Also you're right about the file name being asciified, I was using an older version of |
What you propose for the title isn't really consistent with usethis practices in general. You're sort of caught between these two things (which also explains why this hasn't been done yet):
I've never looked at all of this hard enough to play it out for the vignette case. Which explains the current state. |
Well then, I guess a new vignette template could be put in Anyway, if you can think of a solution you like, I'm happy to implement it with a PR, if not, I totally understand and won't be at all offended. :-) |
I think someone just needs to try it and see if it can be done in a nice clean way. I'd be happy to review a PR and hope this provided some direction. |
Neat improvement, thanks :-) |
Ordinarily, the output of
use_vignette("Cool thing")
would be a file with the following YAML header:whereas it would be great if the vignette title fields and Author fields were filled in too such that it would be
I also think it would be good to replace the space in the file name, such that it's
Cool-thing.Rmd
.If you agree, I'm happy to implement some or all of this myself with a pull request.
Thanks, I use
usethis
everyday.Rory
The text was updated successfully, but these errors were encountered: