update_zenodo_json() writes .zenodo.json at the package root. Zenodo
reads this file when a GitHub release is archived and takes the metadata
of the record from it: the resource type (Dataset), the community, the
title, the description, the creators with their ORCID iDs, the license,
the keywords and the version. Without the file, Zenodo files a data
package as Software in no community, because its GitHub integration reads
only a few fields of CITATION.cff.
Nothing in the file is hand edited: to change a value, change its source
and run the function again. Running it twice produces no change.
update_citation() calls it, so the citation files and .zenodo.json are
written in one step and stay in line with each other.
The sources are:
| Key | Source |
| title, version | Title, Version in DESCRIPTION |
| description | Description in DESCRIPTION, followed by a link to the package website when the package has one |
| upload_type | always dataset |
| creators | Authors@R roles aut and cre; ORCID and affiliation from the comment field |
| license | License in DESCRIPTION, as the identifier Zenodo uses (e.g., cc-by-4.0) |
| keywords | X-schema.org-keywords in DESCRIPTION, comma separated |
| communities | Config/washr/zenodo-community in DESCRIPTION: openwashdata for an openwashdata package, none for another organisation until it sets one |
| related_identifiers | the repository from URL in DESCRIPTION, the package website, and the source article DOIs in X-schema.org-isBasedOn in DESCRIPTION |
Details
Zenodo uses .zenodo.json in place of CITATION.cff for the record, and
it reads the file from the release tag. Commit the file before you create
the release, and run the function again whenever DESCRIPTION changes.
Set Config/washr/zenodo-community in DESCRIPTION to file the record in
another community, to several (comma separated), or to none for no
community.
The package website is the url in _pkgdown.yml, or else the entry
of the DESCRIPTION URL field on the pages domain (github.io unless
Config/washr/pages-domain names another). When there is one, the
description becomes HTML, which Zenodo renders: the Description field
as the first paragraph and "Explore the data on a curated website" with
the link as the second. The website is also written as a related
identifier with the relation isDocumentedBy. Without a website the
description is the Description field as it is.
The repository from the URL field is always written as a related
identifier with the relation isSupplementTo, because any related
identifier replaces the link to the release tag on GitHub that Zenodo
adds by default. A source article is written with the relation
isDerivedFrom.
When washr does not know the license, the file carries none. Zenodo then takes the license GitHub detects for the repository, and CC0 1.0 for a dataset when GitHub detects none.
See also
Before: update_description(), which writes the DESCRIPTION fields this reads. update_citation() calls this function. Next: the GitHub release that Zenodo archives.
Other metadata functions:
update_citation(),
update_description(),
update_metadata()
