-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add Quarto support #200
Add Quarto support #200
Conversation
- parse properly Quarto arguments `#| echo:false` - provide Quarto codefence (refactored to separate function) - save files with extension `.qmd` - all functionality tested - updated documentation
Thanks for the PR. Can you drop all the formatting changes? Very difficult to review otherwise. |
This reverts commit fa050c7.
Yes, of course. I've reverted it. I can open a separate PR with JuliaFormatter later. |
Hi @fredrikekre, would you have any thoughts on the PR? |
I'm om vacation but will have a look in a week or two. |
Hi @fredrikekre, I was wondering if you have any thoughts on the PR? My team and I have been using it for several months now, so it seems to work pretty well. |
Hi @fredrikekre, I was wondering if there is anything I can do to get this merged. I've updated to the latest and re-ran tests. All pass, including the additions for the functionality added. Are there any suggestions or concerns that you have about this tweak? |
Is there an easy way to test your proposal (using my own .qmd files)? |
Yeah, very simple. Just add my branch of Literate, eg, in your environment: and then simply My workflow is to have it in the global environment and call it with VSCode tasks. Ie, I simply click on "JL to HTML" when I have my script opened and separate process is spun to produce my Quarto report (while I can keep working in my project) Example tasks.json (in VSCode)
FYI. I think I'll create a fork/package extension to be able to register it and add it like a normal package. |
Co-authored-by: Fredrik Ekre <[email protected]>
Docs checked. Output formats page renders correctly. The question is where we should add also a full example to show the application / make it easier to start |
Thanks, will have a look.
I have been thinking for some time to have a section where I link to real life usage of Literate as inspiration for setups etc. If you have something public let me know and I will get around to write up something. |
Sorry, I forgot to reply. No, I don't have anything public, but I could easily sanitize a few examples to show the different quarto features (to be hosted in Literate.jl) |
I've looked into the Docs failure. It doesn't seem to be related. I've refreshed Manifest.toml and local build works without a problem. Looking at the failure, it's coming from StatsBase and Plots. I suspect it's due to JuliaStats/StatsBase.jl#840 and its removal of type aliases ("ERROR: LoadError: UndefVarError: I'm unsure how to force Github Actions to load more up-to-date deps (I can build locally with StatsBase 0.34 vs StatsBase 0.33.21 in the CI) |
You have to commit the changes then too. I will review and merge this week, I should have some time. Sorry again for slow responses |
Sorry, I didn't make myself clear. To replicate the error, I'd have to explicitly We could force Plots to something higher (1.38), but I'm not sure when the issue was introduced, so we could be overly Would you prefer to be safe and set compat to [email protected]? |
The manifest is commited. |
Oh, I didn't clock that -- that explains the issues. |
@fredrikekre, are you perhaps at JuliaCon? We could meet up and discuss the next steps? |
I wasn't. I think we can merge this. Perhaps in a version 3.0 it make sense to split up the flavors into |
Hi @fredrikekre, would you mind merging this PR? We're considering giving a presentation on benefits of Literate.jl + Quarto, but it would be odd to ask people to install from a fork... Updates:
If people open issues related to the quarto functionality, just tag me. I have a lot of experience debugging it :) Thank you! |
Happy Monday, @fredrikekre! Is there something that I can do to get this merged? Thank you |
src/Literate.jl
Outdated
@@ -75,8 +76,9 @@ function parse(content; allow_continued = true) | |||
if !(chunks[end] isa CodeChunk) | |||
push!(chunks, CodeChunk()) | |||
end | |||
# remove "## " and "##\n" | |||
line = replace(replace(line, r"^(\h*)#(# .*)$" => s"\1\2"), r"^(\h*#)#$" => s"\1") | |||
# remove "## " and "##\n", strip the leading "#" from "## xyz" and "##| xyz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use #|
directly in the source code and make no transformation? Alternatively, I think this transformation should only be done for quarto output.
Hi @fredrikekre , Hope all is well! Is there any chance we could reach a conclusion on the PR? I've responded in August to your comments but haven't heard back. I'm happy to fork into LiterateQuarto.jl, because this is the only useful functionality of Literate for us. Would you prefer we abandon this PR and create a separate package? Thank you in advance for your response. |
I was waiting for #200 (comment) |
Thank you, I havent realized that my explanation wasn’t sufficient. I’ll follow your suggestion and update it within the next few days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, sorry it took a while to get this in.
``` | ||
# --- | ||
# title: "My Report" | ||
# jupyter: julia-1.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this and the installation notes below be updated?
Closes #199
Changes:
#| echo:false
.qmd
All tests are passing
Code formatted with JuliaFormatter (default setting as no specific preference was indicated)