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

Quarto Website not deploying as expected #2266

Closed
sagerb opened this issue Sep 11, 2024 · 2 comments · Fixed by #2455
Closed

Quarto Website not deploying as expected #2266

sagerb opened this issue Sep 11, 2024 · 2 comments · Fixed by #2455
Assignees
Milestone

Comments

@sagerb
Copy link
Collaborator

sagerb commented Sep 11, 2024

Update (while trying to reproduce)

While trying to reproduce this issue, found that the work for enabling Quarto scripts (#2424) also helped on Quarto websites, with a couple items still requiring work:

  1. Pre and Post render scripts are not automatically picked up to be added to the configuration on project inspection
  2. Users selecting _quarto.yml as entrypoint would get an undesired outcome (unknown type project). This because quarto inspect does not work on _quarto.yml files but it is understandable that the user picks that file and by doing so the project type is explicit enough already.

Original

From: https://positpbc.slack.com/archives/C05D7NZD52S/p1726064950810009

I have a Quarto website project. I don’t really understand what needs to be considered the “entrypoint” in this context. I’m given my *.qmd files, my *.py pre-render script, and one rendered HTML file, but the _quarto.yml file (which is the closest option in my mental model) isn’t offered.

Image

I want to deploy this project as source (not rendered) and include the files:

  • _quarto.yml
  • requirements.txt
  • index.qmd, visualize-r.qmd, visualize-py.qmd
  • allocation.py
    This project has both R and Python package requirements.

Proceeding with the deployment workflow, it missed the pre-render allocation.py script and did not identify that the project requires R as well as Python.
The Quarto inspect output DOES say that knitr is used:

  "engines": [
    "jupyter",
    "markdown",
    "knitr"
  ],

I tried to guess about the [r] syntax:

[r]
version = '4.3.3'

I got an ugly error (attached).
The TOML was updated with placeholders which also violated the configuration:

[r]
version = '4.3.3'
package_file = ''
package_manager = ''

Image

I tried to package_manager = 'none' and got a complaint when trying to deploy; I was trying to use my standard library, not renv.

Image

😢 The deployed manifest does not indicate that Quarto needs the knitr engine and therefore does not cause Connect to install R packages.

	"quarto": {
		"version": "1.5.57",
		"engines": [
			"jupyter",
			"markdown"
		]
	},

For those following along, I was able to successfully deploy with:

rsconnect::deployApp(server = "rsc.radixu.com", account = "aron", python = file.path(getwd(), "env/bin/python"))

This one is a little awkward because it doesn’t use reticulate. Instead, it uses both the knitr and jupyter engines. rsconnect could do better at detecting the need for Python in this situation.

Note: I still have package_manager = 'none' but renv was required.

See slack link for archive of project, created with:

tar cf mixed.tar --exclude mixed/_site --exclude mixed/env --exclude mixed/renv/library --exclude mixed/.quarto mixed

My Python virtual env was in env.

@marcosnav marcosnav added the discovery Additional discovery is necessary to determine a solution label Sep 11, 2024
@marcosnav marcosnav added this to the v1.1.7 milestone Sep 11, 2024
@aronatkins
Copy link

There are a few different problems here:

  1. The concept of "entrypoint" is vague for a Quarto website, and the _quarto.yml file is not offered.
  2. The knitr engine did not imply the use of R (discovered prior to renv initialization)
  3. r.package_manager = 'none' was not the default and did not appear to be respected.
  4. R dependencies were required and shared in the manifest.json, but quarto.engines lacked knitr.

@dotNomad dotNomad modified the milestones: v1.1.7, v1.2.0 Sep 30, 2024
@sagerb
Copy link
Collaborator Author

sagerb commented Oct 7, 2024

After discussion with Jon, we'd like to try and mimic the behavior that the IDE has for quarto websites in which a subselection of the website or quarto doc is automatically changed to be the entire website or doc. It is at this post-configuration location, that the quarto utilities should be run from, which then should provide the proper functionality. This would remove the issue with Quarto as to the user picking the wrong project entrypoint.

We'll also, obviously, need to allow the selection of the _quarto.yml file as the project entrypoint.

@dotNomad dotNomad removed the discovery Additional discovery is necessary to determine a solution label Oct 10, 2024
@sagerb sagerb modified the milestones: v1.2.0, v1.4.0 Oct 17, 2024
@dotNomad dotNomad modified the milestones: v1.4.0, v1.6.0 Nov 13, 2024
@marcosnav marcosnav self-assigned this Nov 18, 2024
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 a pull request may close this issue.

4 participants