fix: repair CITATION.cff and clarify BAM contig-map comment#73
Merged
Conversation
added 2 commits
June 9, 2026 16:50
Both cff-version and version were left as `version = "26.5.22"` (looks like a sed substitution that grabbed too much), making the file invalid CFF — GitHub's "Cite this repository" widget, cffconvert, and any DOI/Zenodo integration would all reject it. Set them to their intended values: - cff-version: 1.2.0 (the CFF schema version) - version: 26.5.22 (the project version, matches pyproject.toml) Verified with `cffconvert --validate` against schema 1.2.0 and a sample BibTeX render.
The inline comment claimed inv_contig_map "maps simplified names back
to original", but the dict comprehension inverts contig_name_map
({simplified: original}) into {original: simplified} — i.e. the
opposite direction. The runtime usage is correct (it matches
annorefine.bam2hints' contig_map contract: keys are input/BAM contig
names, values are output/hint contig names), but the comment misleads
anyone tracing the BAM hint path.
Replace with an accurate description of why the inversion is needed:
the BAM file references the user's original contig names while
everything downstream uses the simplified names produced by
simplify_headers_drop.
No behavior change.
nextgenusfs
pushed a commit
that referenced
this pull request
Jun 10, 2026
The pre-commit hook auto-updates CITATION.cff whenever pyproject.toml
changes, but two bugs caused it to silently corrupt the file on
macOS/BSD:
1. The version-extraction regex used \s (GNU-only) in grep -E / sed -E.
On BSD this matches a literal 's', so the capture fails and VERSION
falls back to the entire matched line ('version = "X.Y.Z"').
2. The CITATION.cff substitution `s/version: .*/.../` was unanchored,
so it also rewrote the `cff-version:` line.
Together these turned `cff-version: 1.2.0` and `version: X.Y.Z` into
`cff-version: version = "X.Y.Z"` and `version: version = "X.Y.Z"`,
which is invalid CFF (this is what PR #73 had to repair).
Fix both by using POSIX [[:space:]] and anchoring the substitutions
with ^.
nextgenusfs
pushed a commit
that referenced
this pull request
Jun 10, 2026
Release cut after #73. Switches to CalVer (YYYY.M.D) matching the prior v2025.11.1 tag rather than the intermediate YY.M.DD form used in 26.5.22. - pyproject.toml: 26.5.22 -> 2026.6.9 - CITATION.cff: version + date-released for today's tag
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
Two small fixes surfaced during a pre-tag code review:
CITATION.cffis malformed. Bothcff-versionandversionwereset to the literal string
version = "26.5.22"(looks like a sedsubstitution that grabbed too much). The file does not validate as
CFF, so GitHub's "Cite this repository" widget,
cffconvert, and anyDOI/Zenodo integration would reject it.
Fixed to:
cff-version: 1.2.0(CFF schema version)version: 26.5.22(matchespyproject.toml)Verified with
cffconvert --validate(schema 1.2.0) and a sampleBibTeX render.
Misleading comment on
inv_contig_mapinpredict.py. The inlinecomment claimed it "maps simplified names back to original", but the
dict comprehension inverts
{simplified: original}into{original: simplified}— the opposite direction.The runtime usage is correct (it matches
annorefine.bam2hints'contig_mapcontract: keys are input/BAM contig names, values areoutput/hint contig names), but the comment misled anyone tracing the
BAM hint path. Replaced with an accurate description of why the
inversion is needed.
No behavior change in either commit.
Why now
These were flagged as the two blocking items in a pre-tag review of
v2025.11.1..main. With these in, the codebase looks ready for a newtag.
Test plan
pixi run pytest tests/unit— 152 passed, 35 skipped.cffconvert --validate -i CITATION.cff→ "Citation metadata arevalid according to schema version 1.2.0."
cffconvert -i CITATION.cff -f bibtexrenders without errors.