Fix bibliography formatting for DOI-only citations - #52
Open
edmundmiller wants to merge 2 commits into
Open
edmundmiller wants to merge 2 commits into
edmundmiller wants to merge 2 commits into
Conversation
formatBibliographyFromData()'s DOI branch dropped the old `title ?: toolName` fallback, so meta.yml entries with a DOI but no publication.title produced anonymous bibliography entries (e.g. `<li>doi: ...</li>`) with no way to tell which tool they referenced. Restore the tool-name fallback in the title position and add a Spock spec covering the DOI-without-title and DOI-only cases. Regenerate the affected citations-on-the-fly and topic-channel-citations validation snapshots to reflect the now-named entries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EvrftaVNPDUPvdubjHepF
…ranches Per maintainer feedback, the meta-schema treats `publication` as all-or-nothing, so the previous `title ?: toolName` fallback was the wrong shape. Key the formatter on publication presence instead: - publication present -> author-led academic reference (Author. (year). title. source. doi: link) - no publication -> identify by tool name (toolName. doi: link) This fixes the original regression (bare-DOI tools rendered anonymously now carry the tool name) without injecting the tool name into entries that already have an author. Lightweight field guards remain so the partial publications still present in some modules degrade cleanly. Update the spec to assert the two-branch contract and the citations-on-the-fly snapshot (only the bare-DOI multiqc entry changes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EvrftaVNPDUPvdubjHepF
edmundmiller
force-pushed
the
claude/beautiful-fermi-silds0
branch
from
June 23, 2026 18:02
3bfecc4 to
a94bd85
Compare
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.
Summary
Fixes bibliography formatting to properly identify DOI-only citation entries by tool name, while preserving author-led formatting for entries with full publication metadata. This addresses the issue raised in PR #51 where DOI-only citations were rendered anonymously.
Changes
Bibliography formatter logic (
NfcoreCitationUtils.formatBibliographyFromData):publicationobject first, rather than DOI presence"Author. (year). title. source. doi: link""toolname. doi: link"or"toolname. url"Test coverage (
NfcoreCitationUtilsTest):"DOI-only entries are named by tool, publication entries are author-led"to verify the two formatting pathsSnapshot updates:
Implementation Details
This change aligns with ADR-0002 (structured citations and MultiQC rendering) by ensuring the interim HTML-string output is correct while the migration to structured CSL-JSON output is underway. The fix ensures that the current bibliography rendering is consistent and unambiguous: entries with full publication metadata follow academic citation style, while entries with only a DOI or homepage are identified by tool name to avoid anonymous references.
https://claude.ai/code/session_015EvrftaVNPDUPvdubjHepF