actions icon indicating copy to clipboard operation
actions copied to clipboard

Consider installing quarto by default?

Open hadley opened this issue 1 year ago • 1 comments

For our package actions, we might want to consider installing quarto by default to make it easier for folks to use it for vignettes. Quarto bundles pandoc so we might be able to use it to replace the install pandoc step (https://github.com/quarto-dev/quarto-actions/issues/107)

hadley avatar Jun 12 '24 12:06 hadley

Or maybe automatically install it if the R quarto package is a dependency?

hadley avatar Jun 12 '24 13:06 hadley

This will help make this work more easily for usethis users r-lib/usethis#1997 (when the issue is fixed in usethis)

olivroy avatar Jul 08 '24 17:07 olivroy

Or if it finds qmd files somewhere in the repo?

hadley avatar Jul 17 '24 12:07 hadley

@cderv What do you think? How should this work?

gaborcsardi avatar Jul 17 '24 13:07 gaborcsardi

How does it work for Pandoc today ? I believe we added recently the auto installation in setup-r-dependency. Are we happy with this compare to setting explicitly setup-pandoc action ?

Automatic is great, but it could also means more maintenance for you here depending on how you do it. AFAIK (and from personal experience) most of the users or r-lib/actions will use the usethis::use_github_action helpers to create there and have the necessary step. Adding in example used as template quarto-dev/quarto-actions/setup maybe sufficient.

However, it is not necessary to install it always, and it comes with a install cost. So doing it automatically on conditions is probably nicer experience, especially for R users not at ease with Github actions.

I would go with any .qmd found in the repo if possible. This would cover all cases, and not only packages project. However, looking at quarto R Package dependency is more targeted as anyone using vignettes would use it.

Less automated way could also be a first step, like installing install-quarto: true flag as setup-r-dependency configuration. This would also be a similar way for install-tinytex: true as Quarto allows to install TinyTeX from a single command, and we have that flag in quarto-actions/setup

Quarto bundles pandoc so we might be able to use it to replace the install pandoc step (https://github.com/quarto-dev/quarto-actions/issues/107)

That seems a good way, I need to provide that output. This means though no pandoc version choice and using the one bundle.

cderv avatar Jul 17 '24 13:07 cderv

OK, so the plan is to add an input parameter called install-quarto, by default it will be 'auto' which means that if it is not already on the PATH, then we'll look for a .qmd file to check if we need to install it via the quarto setup action.

I'll also add a quarto-version parameter, to select the version to be installed.

gaborcsardi avatar Aug 01 '24 09:08 gaborcsardi

@cderv Now that I am writing this, it occured to me that we could do the same for pandoc, i.e. install it whenever there is an .Rmd file in the repo (within working-directory). Should we do that? Right now we auto-install it for R packages that depend on rmarkdown.

gaborcsardi avatar Aug 01 '24 09:08 gaborcsardi

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

github-actions[bot] avatar Aug 17 '24 01:08 github-actions[bot]