-
Notifications
You must be signed in to change notification settings - Fork 24
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: write-manifest and deploy should recommend rsconnect when using knitr engine #565
Comments
The rsconnect-python package does not understand R content or dependencies. It probably should complain when it is provided content using the Have you seen the From the R console, you should be able to: rsconnect::writeManifest() Assuming you are deploying to Posit Connect, the different deployment options are discussed in the Connect User Guide: https://docs.posit.co/connect/user/quarto/ Please let us know if this guidance doesn't work for your project. |
@JT-39 - Could you share more about your project? I have just tried using rsconnect write-manifest quarto .
#=> Checking arguments... [OK]
#=> Inspecting Quarto project... [ERROR]
#=> Error: The following Quarto engine(s) are not supported: knitr A minimal reproducible example would be really helpful. |
Hi @aronatkins, Sure. So this is a quarto book project. The manifest.json file doesn't works from using
Produces a manifest.json file like this:
The manifest.json file works from using
Let me know if you need any more info. |
@JT-39 - Thanks for the additional context. What about your book project tells you that there are R package dependencies? Are you using executable code blocks? The A couple of things to try: First, update install.packages(c("rsconnect","renv")) Second, could you share what "engines" Quarto believes it is using? We care about the quarto inspect
#=> {
#=> "quarto": {
#=> "version": "1.4.551"
#=> },
#=> "engines": [
#=> "knitr"
#=> ],
#=> ...
#=> } |
Sorry @aronatkins, the R package dependencies were appearing in the manifest.json after running I think the "engines" are listed above, but it looks like its using "markdown". I am happy with using Thanks for continued support. |
@JT-39 Ah. Things are more clear now. Given that you don't have R dependencies, it is correct for the manifest to lack a listing of R packages. There was an issue using an earlier version of rsconnect where it incorrectly included R packages for all Quarto content. It's also fine to use either R or Python tools to produce that manifest, since you're not using either language. From everything you've told me, the manifest produced from the To restate: Because your Quarto project is only Markdown content (no R or Python executable code), you can use either: # from R
rsconnect::writeManifest() # from the terminal using rsconnect-python
rsconnect write-manifest quarto . |
@JT-39 I'm going to close this for now, but please let me know if we've misunderstood what's happening with your project. |
Hi @aronatkins, Unfortunately I am still having trouble with If I use this to create my manifest.json, then try to deploy I get this build error message (In the Get application type section):
I am using rsconnect-python version 1.22.0. I can try and create a reprex tomorrow. |
@JT-39 - Could you also tell me more about the If that's custom code, I do not believe that it should require that |
Hi @aronatkins , apologies for the slow response, been a busy day before the bank holiday weekend. I haven't had a chance to look any further yet, but I will do and it will likely be next week now if thats okay? You are right though, I think it will actually be to do with something on my side with |
@JT-39 - sounds good. I'll keep this open until next week and we can reevaluate once you learn more. |
@aronatkins, hope you had a nice weekend. So I looked into the The Which is then used to determine the deployment type (i.e., if not an R based deployment use the content type and directory path rather than the manifest.json and no directory path): Does this help/ anyway we can not use data["platform"] (I realise this is limited info, so if needed I can check with the owner and see if I can share more). Thanks |
@JT-39 Welcome back. I envy your bank holidays. It sounds like your deployment tools are making some assumptions about the structure of the manifest and which fields are present for different types of content. Make sure that folks understand that the R version is optional and may not appear for Python content, so maybe they want something like: r_version = data.get("platform") R content will also enumerate its set of package requirements: r_packages = data.get("packages") With those code snippets, you'll get If a In case it is helpful, Connect currently believes content requires R when the following holds: def uses_r(data):
app_mode = data.get("metadata",{}).get("appmode")
if app_mode in ["shiny", "rmd-shiny", "rmd-static", "api"]:
return True
if app_mode in ["quarto-shiny", "quarto-static"]:
quarto_engines = data.get("quarto", {}).get("engines", [])
return "knitr" in quarto_engines
return False When code similar to that function returns true, the R version is used to identify the target R installation. Note that these decisions have changed over time as new content types are added and may not be what is needed in your environment. Let us know if you've got additional questions. |
@aronatkins thanks for that detailed reply. I think it is beginning to make sense... I have relayed this info to the developer of the pipeline and can report back what he says. You can likely close this now if you like (if I am still able to comment any updates?). Thanks for all your help :) |
Hi,
I am trying to use rsconnect from the command line to build a manifest.json file for my quarto (book) project.
When I run the following code in the root of my quarto project directory, in powershell:
rsconnect write-manifest quarto .
It creates a manifest.json file but is missing some crucial information within this file. There is no R package information and is missing:
Any help?
Thanks,
Jake
The text was updated successfully, but these errors were encountered: