The dev team at PumasAI is excited to announce that, after months of work, the quarto project has accepted PR #8645 which adds a new, native Julia engine based on PumasAI’s QuartoNotebookRunner.jl package.
The engine is now available in prereleases Release v1.5.29 · quarto-dev/quarto-cli · GitHub until the release of quarto’s next minor version 1.5.
Quarto is the successor to RMarkdown, and a widely used document authoring and publishing system based on Pandoc.
So far, Julia has been supported in quarto via an IJulia Jupyter kernel, which has a couple drawbacks:
In addition to Julia, it requires a working Python and Jupyter installation, the correct configuration of the Julia kernel in this setup, and the availability of IJulia in the main Julia environment.
Many users have been facing difficulties getting this system to work reliably due to its many moving parts, which in turn hinders adoption.
With our new engine, all that’s needed to get started with Julia and quarto is a working installation of each of those tools.
At first render of a qmd file with the engine: julia setting, quarto will automatically install QuartoNotebookRunner into a separate environment, resulting in a frictionless user experience.
With quarto’s RMarkdown legacy, the R engine is currently the most featureful.
With a native Julia engine, we now have more freedom to shape how exactly qmd files are rendered, and can potentially add features currently only available to R users.
All in all, with this work we are striving for a first-class Julia experience with quarto and we hope it will turn out to be useful for you all.
Thanks for the info; I did not see this. Hm, sad, I was super eager to try this out, because my current Documenter.jl workflow is a bit of a chaotic mess due to python dependencies for running quarto.
And on the other hand the post here read like “just add engine: Julia and it works” which read for me – that it is released and not planned to be released somewhen in summer, but I know see I did not read the post careful enough.
Yes, sorry for not seeing the “on pre-release soon”.
Currently I fear it might take me too much time to convince my brew (local installation) and the CI to use a pre-release (at least I fear that might take me quite some time). So I will probably juts wait. And don’t get me wrong, I subscribed to the PR already when I saw it to keep that in sight – I am really happy this is happening and look forward to trying it
To add to that, since it’s not easily visible in any docs currently, note that you can control the flags passed to workers that run notebooks via the julia.exeflags key in a notebook’s frontmatter, so you can pick the Project.toml used via that rather than having to use the global environment. See new feature: pure-Julia engine by cscheid · Pull Request #1071 · quarto-dev/quarto-web · GitHub I’m sure their docs site will update with those details sometime soon.
An additional comment: By default, QuartoNotebookRunner starts the Julia process that the notebook is executed in with --project=@. (Use `--project=@.` as default environment by devmotion · Pull Request #73 · PumasAI/QuartoNotebookRunner.jl · GitHub), so if you put e.g. a Project.toml file next to the notebook it will be picked up automatically. This is the same behaviour as the default IJulia kernel. You can specify some (other) project environment by adding "--project=myproject" to the list of julia.exeflags or by setting the "JULIA_PROJECT=myproject" environment variable in the julia.env key.
It is always good to have different options to choose from. As I have never used Quarto as a Julia IDE, and I know Pluto quite well, what are the main advantages(disadvantages) of using one or the other? Thanks.
Quarto is not an IDE, you write a plain text notebook format with code fences like
```{julia}
1 + 1
```
and then you render the full notebook through an intermediate markdown representation into tons of formats supported via pandoc. Pluto does not have so many output options because it’s not focused so much on static outputs. For Pluto, I would say the interactive experience is the defining factor.
I would say a large advantage is, that the Quarto notebooks are Markdown with code cells – and that quarto interoperates with pandoc, so you can get the result in your favourite format. For example in markdown to use it in documenter (my use case). If you need an environment, probably the one of the folder is the one to go for
Pluto is the other way around: Code cells where some of them might be markdown. An advantage might be that each Pluto notebook automatically keeps its own environment, automatically, which I love when exchanging code with students for example. A disadvantage is that rendering Pluto to something is not so easy (but that is on het other hand a main feature of Quarto).
To extend on this, what I would love to have is a Pluto ↔ Quarto “translator”, that is probably a pandoc receipt.
I love to sketch and develop something in Pluto. But for longtime or tutorial work I prefer Quarto – so somewhere in between I have to “switch”.
If anyone is interested in a working example with Quarto and IJulia, including appropriate configuration of GitHub CI tools, take a look here: Geospatial Data Science with Julia
We have many issues with Makie.jl integration. Hopefully the new QuartoNotebookRunner.jl will improve the situation.
Sounds nice, though I have not yet understood how to install qvm itself (I am just a poor Mac user with only some terminal knowledge and usually struggle a bit with anything beyond brew)