quarto-dev / quarto-dev/quarto-cli
Render targets drops selected ipynb files if corresponding qmd exists and is not a target
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
If qmd files exists with other input formats, they MUST be selected in the render list, even if the render lists selects a suitable input file from an alternate input format.
Steps to reproduce
I am using the project: render: targets list to try to select ipython notebooks.
if I make test_nb.qmd and test_nb.ipynb
_quarto.yml:
project:
render:
- test_nb.ipynb
Actual behavior
then render this file or the site, it will fail to find the file. If you then erase test_nb.qmd, it finds the notebook. This behavior is unexpected.
Expected behavior
That the test_nb.ipynb file would be rendered to output
Desired Outcomes
It seems that the render target code is stripping the extension, finding the set of files that are potential input targets, and then processing the render list to include or exclude the extension-free representation of the notebooks.
I would expect that the render list act on a list of files, select and then remove duplicate sources from different input formats, preferring the first file found in the list of duplicates. This way one could use the render target list to prefer notebooks over qmd, when they exist of for a subset of the files. Rendered notebooks with the non-executing behavior provide an alternate means storing frozen notebook computations.
A desired outcome is
_quarto.yml:
project:
render:
- *_nb.ipynb
- *.qmd
to process a website where all files ending with _nb are preferentially rendered from notebooks, otherwise preferring qmd files. Currently this still prefers qmd always, indicating that internally, the extension must be removed during the render list processing, or the duplicates list always prefers one extension and does not honor the order of the render list.
A workaround was tried
_quarto.yml:
project:
render:
- *_nb.ipynb
- !*_nb.qmd
- *.qmd
With the current unexpected behavior, none of _nb.* files is ever rendered, either qmd or ipynb.
Your environment
- OS Linux Debian Bookworm
- quarto -v: 1.7.32
- installed through conda
Quarto check output
[✓] Checking environment information...
Quarto cache location: /home/<>/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
NOTE: Dart Sass version 1.58.3 does not strictly match 1.85.1 and strict checking is enabled. Please use 1.85.1.
Deno version 1.46.3: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.32
Path: /opt/conda/user_conda/lab/py312/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2022
[✓] Checking Chrome Headless....................OK
Chrome: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.10 (Conda)
Path: /opt/conda/user_conda/lab/py312/bin/python
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the project render configuration with matching test_nb.qmd and test_nb.ipynb files, then compare explicit render-target selection with wildcard targets. Trace the render-target processing that handles duplicate source names and extensions; done means an explicitly selected or earlier-listed .ipynb is rendered instead of being dropped or replaced by the .qmd file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100