Add new component: quarto/partial#12187
Open
fasterius wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new module:
quarto/partial, which aims to add new functionality for Quarto within nf-core. Thequartonotebookalready exists, which can render Quarto/Jupyter/RMarkdown reports into HTML, but it only creates a single, monolithic report and can't be extended. Quarto has various ways of working with sub-reports or extending reports, which is what this new module is all about. The major use case is allowing for more granular reporting flow, dividing work up in arbitrary steps to reduce re-computation (e.g. when iterating over some analysis step or re-running a pipeline with a different set of parameters for only some of the reporting steps) while still allowing for a single output report.There are two major ways of working with sub-reports or extended reports in Quarto: Quarto Projects, and Quarto Partials. Projects do not play well within a workflow manager context, as Quarto then needs to be the arbiter of what gets executed at what time, which depends on the working directory state (which will always be fresh in a Nextflow context). Partials, however, fits more nicely into the workflow manager context: a sub-report is first rendered to markdown (not HTML), which is then referred to in the final report using the
{{< include partial.md >}}notation, and the final report is rendered only once.While the
quartonotebookmodule is already quite flexible, there are several reasons why incorporating partial rendering into it doesn't work well:quartonotebookmodule renders a single Quarto document to HTML, where partials needs to render intermediate markdown documents.--to markdown, which overwrites whatever has been specified in the report. Thequartonotebookmodule doesn't use--toat all, which allows a user to specify the format in the.qmdfile themselves, which might include a custom format in e.g. an extension. Keeping the modules separate here makes it easier to work with both, circumventing having to useext.argsfor every single module use (which would also be more opaque).quartonotebookcan handle, I had some issues there. If somebody is working with partials, it is reasonable to assume a Quarto-centric system, thus removing support of the other formats (.ipynband.rmd) and for the test suite.A lot of the
script:part of the modules remain similar, though, but I believe it's worth it due to the above mentioned things.Should this module be accepted, the existing
quartonotebookmodule would need to be renamed to e.g.quarto/notebook. I'm not sure what the procedure for renaming modules is, but I'm happy to make a PR both to the modules repository for this, as well as for all of the pipelines currently using the module (which is four, at time of writing) after its been updated.PR checklist
topic: versions- See version_topicslabelnf-core modules test <MODULE> --profile dockernf-core modules test <MODULE> --profile singularitynf-core modules test <MODULE> --profile conda