Pushes a finished RO-Crate and all its local files to Dataverse, Zenodo or Figshare, or mints a DOI for it on DataCite.
It is the publish step of FAIRSCAPE. To host crates on your own server instead, use fairscape_lite.
pip install git+https://github.com/fairscape/fairscape_publish# Is the crate ready? Nothing is sent over the network.
fairscape-publish check ./my-crate
# Rehearse: print every request, send nothing
fairscape-publish zenodo ./my-crate --token $ZENODO_TOKEN --sandbox --dry-run
# Create the draft
fairscape-publish zenodo ./my-crate --token $ZENODO_TOKEN --sandbox
# After you've reviewed the draft, publish it and write the DOI back into the crate
fairscape-publish zenodo ./my-crate --token $ZENODO_TOKEN --sandbox --resume --publish --write-back| Command | What it does |
|---|---|
check CRATE |
Checks whether the crate is ready for each target, without using the network. |
dataverse CRATE |
Creates a Dataverse dataset and uploads the files, keeping the folder structure. |
zenodo CRATE |
Creates a Zenodo deposit and uploads the files. |
figshare CRATE |
Creates a Figshare article and uploads the files. |
datacite CRATE |
Mints a DOI from the crate metadata. Uploads no files. |
status CRATE |
Shows what has already been deposited from this crate. |
Tokens can come from the environment: DATAVERSE_API_TOKEN, ZENODO_TOKEN,
FIGSHARE_TOKEN, DATACITE_USERNAME / DATACITE_PASSWORD.
- Safe by default. Deposits stay drafts until you pass
--publish.--dry-runsends nothing, and you're asked to confirm before the first upload. - Remote files are skipped.
contentUrls that point tohttps://,ftp://ors3://are listed but never downloaded. - Resumable. Each run writes
.fairscape-publish.jsonbeside the crate.--resumepicks up the same draft and skips files that are already uploaded. - File layout.
--layout zip|preserve|flatsets how the crate's folders appear in the repository. The default iszipfor Zenodo and Figshare andpreservefor Dataverse. - Tests.
pip install -e ".[test]" && pytest. They run fully offline.
Per-target requirements, sandboxes and the metadata mapping:
docs/DETAILS.md and PUBLISH_MAPPING.md.