-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Describe the Bug
When selecting multiple SPDX identifiers in the License step of cffinit, the GUI concatenates selections as a comma‑separated string (e.g. AGPL‑3.0,CC‑BY‑4.0). However, the downloaded CITATION.cff encodes the licenses as an array:
license:
- AGPL-3.0
- CC-BY-4.0This array is valid according to the CFF 1.2.0 schema and passes both cffinit’s internal validator and cffconvert.
However, Zenodo supports only a subset of CFF, accepting a single string for license. As a result, a repository that validates locally fails Zenodo’s validation during archival.
Steps to Reproduce
- Open cffinit.
- Complete required metadata.
- Select two or more licenses in the License step (e.g. AGPL‑3.0 and CC‑BY‑4.0).
- Download the
CITATION.cff, commit it to a GitHub repository linked to Zenodo. - Create a release and trigger Zenodo import.
Current Behaviour
- cffinit displays “Your CITATION.cff is valid.”
- Zenodo rejects the release with:
Citation metadata load failed
Expected Behaviour
One of the following should occur:
- Restrict license selection to a single SPDX identifier.
- Coerce multiple selections into a comma‑separated string (
"AGPL-3.0,CC-BY-4.0") in the YAML file, which Zenodo accepts. - Emit a warning/error when >1 license is selected, explaining that Zenodo requires a single license string.
Any of these would prevent silent generation of files that pass CFF validation but break common downstream workflows.
Environment
- cffinit commit/version: (current production deployment, 2025‑07‑15)
- Browsers: Safari 17.2, Chrome 125 (identical behaviour)
- Zenodo:
zenodo.org, 2025‑07‑15
Additional Context
The CFF 1.2.0 schema (schema guide, §license) allows arrays (interpreted as OR), but Zenodo’s documentation shows and enforces a single-string value.
See also: cffinit issue #234 (possible duplicate).
Possible Implementation Ideas
- Frontend: Restrict UI to single selection or display a Zenodo compatibility warning badge if >1 is selected.
- Backend: If
licenseis an array of length >1, join as a comma-separated string before serialisation. - CI: Add a regression test validating output against both
cffconvertand Zenodo’s schema (e.g. via their REST API).
Rationale & References
- CFF 1.2.0: Permits license arrays (OR semantics) — see schema guide, §license.
- Zenodo: Accepts only a single string, e.g.
"MIT"— see Zenodo docs.
Bridging this mismatch in cffinit would improve user experience and interoperability for archival workflows.