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 plugin #482

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Quarto plugin #482

wants to merge 17 commits into from

Conversation

pat-alt
Copy link

@pat-alt pat-alt commented Aug 28, 2024

This adds a new Quarto plugin that can be used to generate package documentation with Quarto and Documenter.jl. I've closely followed the steps outlined by @kellertuer in this blog post and also during our joint JuliaCon presentation earlier this year.

Additions

  • The dictionary in src/plugins/ci.jl (l. 79) gets a HAS_QUARTO field to be used in templates. The HAS_DOCUMENTER field is adjusted.
  • The src/plugins/quarto.jl adds the plugin, which 1) inherits its view from the Readme and Documenter plugins; 2) generates a README.qmd, docs/src/index.qmd, a custom executable make.jl (includes steps for remote rendering) and a _quarto.yml (configs for Quarto).
  • Additions in templates/github/workflows/CI.yml ensure that docs are rendered through Quarto if he plugin is used.
  • There are additional templates in templates/quarto/ for the README.qmd, index.qmd, _quarto.yml and make.jl.

All other changes are due to running JuliaFormatter.format("src").

Doubts and other notes

  • I have not added workflows related to Jupyter (i.e. CondaPkg and caching), because I'd expect that most users will use QuartoNotebookRunner.jl in the future.
  • I'm working on a separate branch to add support for a fixup function (continuing from this stale PR) and accidentally merged some of this here initially (should be all reverted in 3910fe6)
  • I have used the plugin for a new Taija package and it seems to run smoothly, but I'm not sure how to go about properly unit testing things like remote rendering.

@kellertuer might you be able to have a quick look at this and see if you spot any missing pieces?

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 55.96330% with 48 lines in your changes missing coverage. Please review.

Project coverage is 88.13%. Comparing base (a007c9e) to head (3910fe6).

Files Patch % Lines
src/plugins/quarto.jl 0.00% 41 Missing ⚠️
src/interactive.jl 87.50% 2 Missing ⚠️
src/plugins/formatter.jl 0.00% 2 Missing ⚠️
src/plugins/coverage.jl 75.00% 1 Missing ⚠️
src/plugins/documenter.jl 85.71% 1 Missing ⚠️
src/plugins/git.jl 66.66% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (a007c9e) and HEAD (3910fe6). Click for more details.

HEAD has 134 uploads less than BASE
Flag BASE (a007c9e) HEAD (3910fe6)
143 9
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #482      +/-   ##
==========================================
- Coverage   94.33%   88.13%   -6.21%     
==========================================
  Files          24       25       +1     
  Lines         742      784      +42     
==========================================
- Hits          700      691       -9     
- Misses         42       93      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


Arguments
* `--help` - print this help and exit without rendering the documentation
* `--prettyurls` – toggle the prettyurls part to true (which is otherwise only true on CI)

Choose a reason for hiding this comment

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

I think this option is currently not realised? For the rest – one should maybe also make sure the make-jl is excusable for this to work.
But cool, that you found this idea so useful to even provide it here as a template!

Copy link
Author

Choose a reason for hiding this comment

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

Yeh I think you're right about the option and will either remove it or make sure it's realized. As for make.jl being executable, there's this line here and I think this is already working.

I'm going to hold on before doing more work on this due to #478 and also the discussion here #483, but thank you for the review!

Choose a reason for hiding this comment

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

Ah, I did not see that line, that of course makes sure this works as a script.

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.

3 participants