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

Revise quarto argument #828

Merged
merged 8 commits into from
May 2, 2023
Merged

Revise quarto argument #828

merged 8 commits into from
May 2, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented May 1, 2023

I'm assuming that the previous interface of supplying a path is mostly an accident of history (not a desired UI) and hasn't been used to select between different versions of quarto.

Fixes #658

hadley added 2 commits May 1, 2023 11:49
I'm assuming that the previous interface of supplying a path is mostly an accident of history (not a desired UI) and hasn't been used to select between different versions of quarto.

Fixes #658
@hadley hadley requested a review from aronatkins May 1, 2023 16:50
@aronatkins aronatkins requested review from toph-allen and removed request for aronatkins May 1, 2023 16:50
R/appMetadata-quarto.R Outdated Show resolved Hide resolved
@aronatkins aronatkins self-requested a review May 1, 2023 18:23
Copy link
Contributor

@aronatkins aronatkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toph-allen - do you still have some of the example/testing workflows from when we last adjusted Quarto support?

NEWS.md Show resolved Hide resolved
R/appMetadata.R Outdated Show resolved Hide resolved
@@ -275,6 +274,14 @@ appIsDocument <- function(appMode) {
)
}

appIsQuartoDocument <- function(appMode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Because this might be a single document or a more complicated project; maybe appIsQuartoContent?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Words are hard, eh? Other thoughts: isQuartoContent, appModeIsQuarto, etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just modified from the appIsDocument() above, so while I agree that the name isn't the best, I'll leave it as for this PR.

R/deployApp.R Outdated
@@ -227,6 +231,15 @@ deployApp <- function(appDir = getwd(),
check_file(recordDir)
}

if (!is_string(quarto)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check negated? Warn on an incoming string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh.

R/writeManifest.R Outdated Show resolved Hide resolved
Copy link
Contributor

@toph-allen toph-allen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, assuming fixes to the things @aronatkins pointed out. (And there's a broken test on devel.)

When we introduced Quarto support, we tested using items from https://github.com/rstudio/connect-content. We have a pretty full set of Quarto testing content there. Assuming we want to QA this against Quarto content and non-Quarto content without specifying quarto as TRUE or FALSE, we'd do something like the following, from the connect-content/bundles directory.

library(rsconnect)

# Quarto content
deployApp("quarto-book-none")
deployApp("quarto-doc-none")
deployApp("quarto-multidoc-proj-none")
deployApp("quarto-proj-none")
deployApp("quarto-proj-none-ojs")
deployApp("quarto-proj-py")
deployApp("quarto-proj-r")
deployApp("quarto-proj-r-py")
deployApp("quarto-proj-r-shiny")
deployApp("quarto-website-none")
deployApp("quarto-website-py")
deployApp("quarto-website-r")
deployApp("quarto-website-r-py")
deployApp("quarto-website-r-py-separate-files")

# Non-quarto content
deployApp("rmd-shiny-runtime-shinyrmd-complete")
deployApp("rmd-shiny-runtime-shinyrmd-simple")
deployApp("rmd-site")
deployApp("shinyapp")

R/appMetadata-quarto.R Outdated Show resolved Hide resolved
@@ -275,6 +274,14 @@ appIsDocument <- function(appMode) {
)
}

appIsQuartoDocument <- function(appMode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Words are hard, eh? Other thoughts: isQuartoContent, appModeIsQuarto, etc.

Comment on lines +125 to +131
#' @param quarto Should the deployed content be built by quarto?
#' (`TRUE`, `FALSE`, or `NA`). The default, `NA`, will use quarto if
#' there are `.qmd` files in the bundle, or if there is a
#' `_quarto.yml` and `.Rmd` files.
#'
#' (This option is ignored and quarto will always be used if the
#' `metadata` contains `quarto_version` and `quarto_engines` fields.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully remember why we required a Quarto path originally. I think that @aronatkins and I discussed not wanting to make assumptions that would break existing workflows, so we kept Quarto support gated behind the parameter? At this point, I definitely prefer this approach.

@hadley hadley merged commit d974d04 into main May 2, 2023
@hadley hadley deleted the quarto-option branch May 2, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

writeManifest() assumes a Quarto deployment in the presence of a .qmd
3 participants