cranko zenodo preregister

Prepare a new Zenodo deposit to be associated with a release of a project.

Usage

cranko zenodo preregister
  [--force] [-f]
  --metadata=JSON5-FILE
  PROJECT-NAME
  REWRITE-FILES[...]

This command should be run in CI processing of an update to the rc branch, before cranko release-workflow commit.

Example

cranko zenodo preregister --metadata=ci/zenodo.json5 cranko src/main.rs

This will preregister a new Zenodo deposit for the cranko project, using metadata from the file ci/zenodo.json5. Both that file and src/main.rs will be rewritten to contain DOI information generated by the preregistration.

Remarks

See the Zenodo integration documentation for an overview and description of Cranko's support for Zenodo deposition, including the rewrite format used by this command. See Zenodo Metadata Files for a specification of the metadata file used by this command.

This command can be run during pull requests, not just during formal releases. In that case, fake DOIs will be used for the rewrite steps. These are guaranteed to start with the text "xx.xxxx/", unlike real DOIs which always start with 10.. The DOIs should be obviously fake to any user that sees them, but if you have code that embeds or outputs those DOIs, you may wish to add tests that check for these fake values and issue warnings as appropriate.

This command requires that the environment variable ZENODO_TOKEN has been set to a Zenodo API token, during release processing only. During pull request processing, you should make sure not to provide this parameter, so that it is not accessible to malicious submissions. As a precaution, in the latter circumstance, the command will exit with an error if the environment variable is non-empty.

See also