Skip to content

Add Zenodo concept DOI and date-released to CITATION.cff - #284

Merged
medley56 merged 3 commits into
mainfrom
280-add-doi-to-citation-cff
Sep 17, 2026
Merged

medley56 merged 3 commits into
mainfrom
280-add-doi-to-citation-cff

Conversation

@medley56

Copy link
Copy Markdown
Member

Summary

CITATION.cff declared no persistent identifier, so GitHub's "Cite this repository" widget and cffconvert produced citations carrying only the repository URL.

This adds the Zenodo concept DOI (10.5281/zenodo.7735001) via an identifiers: block, and adds date-released so generated citations carry a year.

Closes #280

Why the concept DOI and not a version DOI

A version DOI was deliberately rejected. The ordering of the release process makes it unusable:

  1. Release checklist step 3 hand-edits CITATION.cff.
  2. Release checklist step 6 pushes the tag.
  3. Zenodo mints the version DOI only after it archives the tagged release — i.e. after step 6.

So at the moment CITATION.cff is edited, the version DOI for the release being prepared does not exist yet. A top-level doi: key would therefore routinely ship pointing at the previous release — a persistent identifier that resolves to the wrong software, which is worse than no DOI at all.

The concept DOI is version-agnostic, always resolves to the newest release, and requires no maintenance. It is the same DOI already linked from the README badge.

date-released and keeping it fresh

Without date-released, the BibTeX/APA exports have no year, and the year is not derivable from anything else in the file. A citation with a DOI but no year is still defective.

The value is quoted (date-released: "2026-09-13") on purpose: the CFF 1.2.0 schema types date-released as {"type": "string", "format": "date"}. Unquoted, YAML parses 2026-09-13 into a date object, which fails strict validation.

To stop it going stale, release-checklist step 3 in docs/source/developers.md — which already required a manual edit of CITATION.cff — has been widened to cover the new field. This adds no new step to the release process, only a wider existing one.

Known residual risk, stated plainly: scripts/check_metadata.py does not validate date-released. It reads only title, description, version, license, authors, and maintainers. So a forgotten date-released will go stale silently — nothing in CI will catch it. This was judged acceptable for a date (a minor inaccuracy in a citation year) but would not have been acceptable for a DOI, which is a second reason the version DOI was rejected.

Note for reviewers: pre-existing CFF schema violations (not introduced here)

While verifying this change against the published CFF 1.2.0 schema I found that CITATION.cff does not currently validate, and did not before this PR either. Validating the unmodified file from main produces the identical errors:

  • root key description is not a valid CFF 1.2.0 key (the CFF field is abstract, which the file also has)
  • root key maintainers is not a valid CFF 1.2.0 key (the CFF analogue is contact)
  • orcid values must be full https://orcid.org/… URIs, not bare identifiers
  • the required message key is absent

Consequence: cffconvert refuses to convert the file at all, so the DOI added here will not reach a cffconvert BibTeX export until those are fixed. (GitHub's own widget is more lenient.)

I confirmed the additions in this PR are themselves schema-correct by validating a scratch copy with only the pre-existing offenders corrected — that copy validates cleanly and its BibTeX contains both doi = {10.5281/zenodo.7735001} and year = {2026}.

I did not fix those pre-existing issues here, because they are out of scope for #280 and, more importantly, they are coupled to tooling: scripts/check_metadata.py reads the description and maintainers keys directly, so removing or renaming them would break the check-space-packet-parser-metadata hook. That deserves its own PR that changes both files together. Happy to open a follow-up issue.

Verification

  • pre-commit run --all-files — all hooks pass (prettier does not process .cff and left the file untouched)
  • pre-commit run check-space-packet-parser-metadata --all-files — passes
  • date-released confirmed to parse as str, not datetime.date
  • Docs build (make html) succeeds
  • No version bumps; ships under ## [Unreleased]

🤖 Generated with Claude Code

Copy link
Copy Markdown
Member Author

Two follow-ups on this branch since the PR was opened:

1. The pre-existing CFF validity problem now has a ticket: #285.

To be explicit about what is and isn't in this PR: CITATION.cff does not validate against the CFF
1.2.0 schema, and did not before this change either — the unmodified file from main fails
identically with Additional properties are not allowed ('description', 'maintainers' were unexpected). That is out of scope here because fixing it requires changing scripts/check_metadata.py
in the same commit (it reads both of those keys, and the check-space-packet-parser-metadata hook
runs with always_run: true). #285 has the details.

2. Softened the CHANGELOG entry (bdb783c).

The original entry said the DOI would now appear in cffconvert's BibTeX/APA exports. That is not
true today — cffconvert rejects the document outright for the reasons above, so it emits nothing at
all. The entry now claims only what actually happens: the metadata carries the identifier and the
release year, and GitHub's "Cite this repository" widget reads both. The cffconvert half becomes
true once #285 lands.

The DOI itself is verified correct: validating a corrected scratch copy of the file produces
doi = {10.5281/zenodo.7735001} and year = {2026} in the BibTeX output, so the additions in this PR
are schema-correct — they are just sitting in a document that has other problems.

🤖 Generated with Claude Code

Copilot AI 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.

🟡 Changes recommended

Clarify the changelog claim about cffconvert exports.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds Zenodo citation metadata and documents the release-date update process.

Changes:

  • Adds the Zenodo concept DOI and quoted date-released.
  • Updates release checklist guidance.
  • Documents the change in CHANGELOG.md.
File summaries
File Summary
docs/source/developers.md Updates release checklist instructions.
CITATION.cff Adds DOI and release date metadata.
CHANGELOG.md Records the citation metadata change; scope the converter-export claim appropriately.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CHANGELOG.md Outdated
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (c55e513) to head (5dbc3c1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #284   +/-   ##
=======================================
  Coverage   94.62%   94.62%           
=======================================
  Files          49       49           
  Lines        4203     4203           
=======================================
  Hits         3977     3977           
  Misses        226      226           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI 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.

🟢 Approval recommended

No unresolved blocking issues were identified.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

medley56 and others added 2 commits September 16, 2026 23:56
CITATION.cff declared no persistent identifier, so GitHub's "Cite this
repository" widget and cffconvert produced citations carrying only the
repository URL.

Add the Zenodo CONCEPT DOI (10.5281/zenodo.7735001) via an identifiers:
block rather than a top-level doi: with a version DOI. A version DOI only
exists on Zenodo after a release is archived, which happens after the tag
is pushed -- and the tag push comes after the point in the release process
where CITATION.cff is hand-edited (step 3 of the release checklist). That
ordering means a version DOI could never be filled in accurately at the
time the file is edited, so it would routinely ship pointing at the
PREVIOUS release: worse than no DOI at all. The concept DOI is
version-agnostic, always resolves to the newest release, and needs no
maintenance.

Also add date-released so the generated BibTeX/APA citations carry a year,
which is not derivable from anything else in the file. The value is quoted
because the CFF 1.2.0 schema types date-released as a string; unquoted,
YAML would parse it as a date and fail strict validation. Widen the
existing release-checklist step that already hand-edits CITATION.cff to
cover the new field so it does not go stale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
cffconvert cannot read CITATION.cff at all: the file has pre-existing
CFF 1.2.0 violations (root-level 'description' and 'maintainers' are not
valid CFF keys, 'orcid' needs a full URI, and 'message' is missing) that
are unrelated to this change and are left for a follow-up. Claiming the
BibTeX/APA exports now carry the DOI would be true only after that fix.
GitHub's widget is more lenient and does read the DOI today.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@medley56
medley56 force-pushed the 280-add-doi-to-citation-cff branch from bdb783c to fd647fa Compare September 16, 2026 23:58
- Set date-released in Step 4 alongside the three version bumps,
  using the actual tag date rather than branch-creation date
- Note that check_metadata.py only cross-checks version fields, not
  date-released, so a stale value goes uncaught
- Add a pre-tag check in Step 7 to catch drift if the release branch
  sat open for days between Step 4 and tagging

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@medley56
medley56 merged commit ae1338f into main Sep 17, 2026
21 checks passed
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.

CITATION.cff has no DOI, so generated citations omit the archived record

2 participants