Two small things in render_quarto_yml_snippet()
In src/quartobot/init_project.py:
1. The project_type argument is dead
def render_quarto_yml_snippet(project_type: str = "manuscript") -> str:
pre_render = "quartobot resolve --from-scan . --id-mode citation-key"
if project_type == "book":
return dedent(...) # body X
return dedent(...) # body identical to X
Both branches return byte-identical strings, so project_type has no effect. Either the book branch was meant to differ (e.g. books commit _freeze/ — see related gitignore issue — or a book may want a different note) or the branch should be removed to avoid implying a difference that isn't there.
2. The snippet hardcodes references.bib, which can mismatch the project
The emitted snippet always says:
bibliography:
- references.bib
- references.resolved.bib
But many projects already have a differently-named bibliography (this one uses bibliography.bib). _seed_bibliography() only writes a seed references.bib when no .bib exists — so for a project with bibliography.bib, following the snippet literally adds a references.bib that doesn't exist, and pandoc then errors on the missing file. The snippet should reference the project's existing .bib (detected) rather than assuming references.bib, or call out that the first entry is a placeholder for "your existing bibliography."
Context
Noticed while merging the init snippet by hand into a Quarto book whose bibliography is bibliography.bib (seandavi/RBiocBook). Current main source.
Two small things in
render_quarto_yml_snippet()In
src/quartobot/init_project.py:1. The
project_typeargument is deadBoth branches return byte-identical strings, so
project_typehas no effect. Either the book branch was meant to differ (e.g. books commit_freeze/— see related gitignore issue — or a book may want a different note) or the branch should be removed to avoid implying a difference that isn't there.2. The snippet hardcodes
references.bib, which can mismatch the projectThe emitted snippet always says:
But many projects already have a differently-named bibliography (this one uses
bibliography.bib)._seed_bibliography()only writes a seedreferences.bibwhen no.bibexists — so for a project withbibliography.bib, following the snippet literally adds areferences.bibthat doesn't exist, and pandoc then errors on the missing file. The snippet should reference the project's existing.bib(detected) rather than assumingreferences.bib, or call out that the first entry is a placeholder for "your existing bibliography."Context
Noticed while merging the init snippet by hand into a Quarto book whose bibliography is
bibliography.bib(seandavi/RBiocBook). Currentmainsource.