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

Build vignettes in install() #1578

Closed
hadley opened this issue Aug 9, 2017 · 8 comments
Closed

Build vignettes in install() #1578

hadley opened this issue Aug 9, 2017 · 8 comments
Labels
feature a feature request or enhancement vignettes 📜
Milestone

Comments

@hadley
Copy link
Member

hadley commented Aug 9, 2017

This should be the default behaviour, once the package installation code has moved to remotes. That way remotes focusses on fast installation and devtools on more accurate simulation of install from CRAN.

@AmundsenJunior
Copy link
Contributor

Looking into this, is there an idea as to how to change default behavior of build_vignettes() with its call to install()?

build_vignettes() has install = TRUE for a param and its default. If the default of install() is changed to build_vignettes = TRUE per this feature request, then calling build_vignettes() would actually build the vignettes twice.

Do I have that logic correct? Would we want build_vignettes() to call install as devtools::install(..., build_vignettes = FALSE) to keep the process the same for that function?

@jimhester
Copy link
Member

@hadley was saying to build vignettes with the install_*() functions by default. So that calling devtools::install_github("repo/xyz") will build them by default.

Now that remotes has support for building packages this should be a matter of calling the remotes functions with remotes::install_github(..., build = TRUE, build_opts = c("--no-resave-data", "--no-manual") (removing the --no-build-vignettes) option which is the default.

I am somewhat undecided if this is worth doing now, it will make maintenance more of a burden.

@DataStrategist
Copy link

So it's clear to me that if I have a package on github (not yet on CRAN), and used use_vignettes() and want to let users to see the vignette when they install from github, we should instruct to
use devtools::install_github(..., build_vignettes = TRUE).

However, this prevents me from displaying my vignette on github per se. The vignette is (kind of by definition) the best way to explain how to use my package and would like to be able to display it to prospective downloaders on github itself. So I have 2 questions:

  1. What is the motivation for .gitignoreing the inst/doc?
  2. How frowny would it be for me to manually remove inst/doc from gitignore so that I can show my vignette from github? Would that screw up install_github()?

@hadley
Copy link
Member Author

hadley commented Jan 24, 2019

@DataStrategist If you want to display live vignettes, the best solution (IMO) is pkgdown. You are welcome to try something else based on not ignoring inst/doc, but you're on your own.

@DataStrategist
Copy link

@hadley So I guess the question (and this is def. a soft question) then becomes "what's the difference between walthroughing your package in pkgdown or in a vignette? Is it appropriate to one walkthrough that takes both forms?

@hadley
Copy link
Member Author

hadley commented Jan 24, 2019

@DataStrategist pkgdown turns your vignettes into a website

@DataStrategist
Copy link

@hadley so it does. I'm going to go into the corner and curl into a ball and cry myself to sleep now... thanks.

@hadley
Copy link
Member Author

hadley commented May 24, 2022

I think we're now unlikely to do this, or if we do, it'll be as a general re-thinking of how we handle vignettes.

@hadley hadley closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement vignettes 📜
Projects
None yet
Development

No branches or pull requests

4 participants