Skip to content

quarto/notebook: stop Quarto searching above the task directory for a project - #13077

Merged
pinin4fjords merged 1 commit into
nf-core:masterfrom
pinin4fjords:quartonotebook-stop-project-search
Oct 2, 2026
Merged

pinin4fjords merged 1 commit into
nf-core:masterfrom
pinin4fjords:quartonotebook-stop-project-search

Conversation

@pinin4fjords

Copy link
Copy Markdown
Member

What

When the task directory has no _quarto.yml, Quarto walks up the parent directories running its project-type detectors. An unreadable folder counts as "exists" (quarto-dev/quarto-cli#14980), so an ancestor containing an unreadable config/ and a content/ is taken for a Hugo project. Quarto then puts .quarto/ there and the render fails.

We hit this with nf-core/differentialabundance 2.0.0 on Seqera Platform with Fusion 2.5. There, /fusion/s3/config and /fusion/s3/content are other people's buckets, so every report failed with attempt to write a readonly database, including with -profile test. It can happen on any shared filesystem with unreadable entries above the work dir.

This writes project: { type: default } to _quarto.yml in the task directory before rendering, unless one was staged via input_files, so the search stops there.

Checked

  • In the module's container (Quarto 1.7.31, x86_64), rendering a .qmd two levels below a folder with an unreadable config/ and a content/:
    • current script: .quarto is created in that ancestor, and the render fails (exit 1, no HTML);
    • with this change: .quarto is created in the task directory, and the HTML is rendered.
  • nf-core modules test-equivalent nf-test test modules/nf-core/quarto/notebook --profile docker on x86_64: all 7 tests pass on master and on this branch, with snapshots unchanged.
  • The same _quarto.yml workaround, applied through beforeScript, fixed differentialabundance 2.0.0 reports on Fusion 2.5.14.
  • No new nf-test: reproducing needs an unreadable directory above the task's work dir, which the test sandbox can't set up.

PR checklist

  • This comment contains a description of changes (with reason).
  • nf-core modules test quarto/notebook --profile docker
  • --profile singularity / conda: left to CI.

🤖 Generated with Claude Code

… project

Without a _quarto.yml in the task directory, Quarto walks up the parent
directories looking for a project, and an unreadable folder there can make
it pick an ancestor as the project root, so the render fails. Write a
minimal _quarto.yml first (unless one was staged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@heuermh heuermh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch and fix!

@pinin4fjords
pinin4fjords added this pull request to the merge queue Oct 2, 2026
Merged via the queue into nf-core:master with commit 3c53591 Oct 2, 2026
34 checks passed
@pinin4fjords
pinin4fjords deleted the quartonotebook-stop-project-search branch October 2, 2026 19:00
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.

2 participants