ckanext-zenodo
Publishes large or non-tabular dataset files to Zenodo (sandbox during development, production later) instead of CKAN storage, mapping the dataset's FDF metadata into the Zenodo deposition. The CKAN dataset stays published in the FAIR3R catalogue (full FDF metadata, searchable) with a link to the Zenodo DOI for the actual data, instead of carrying the file itself.
Status
Work in progress, built in staged merge requests. See the implementation plan for the full design (file flow, data model, metadata mapping, anti-abuse hardening, staged delivery order) - ask in the project chat for the current plan reference if you don't have it to hand.
Routing rule (once implemented): a file goes to Zenodo instead of CKAN
storage when it's larger than ckan.max_resource_size, or its format isn't
one ckanext.xloader.formats can read - or whenever the user explicitly
asks for Zenodo regardless of size/format.
Relationship to ckanext-fair3r
Not a declared package dependency (not in pyproject.toml), but FAIR3R is
this plugin's reason to exist, at two different levels:
- Soft Python dependency -
lib/publish_guard.pyimportsckanext.fair3r.lib.fdf.datacite_converter.DataCiteConverterinside atry/except ImportErrorto map a dataset's FDF metadata into the Zenodo deposition's description/creators/keywords/etc. Same patternckanext-citations'helpers.pyalready uses forcompleteness_for_package. Withoutckanext-fair3rinstalled (or on a dataset with nofdf_output_jsonextra), a deposition still gets published - just with minimal metadata (title and the submitting user's name only), never a hard failure. - Operational dependency, not a code one - the actual trigger for
uploading to this plugin's
/zenodo/upload/<package>endpoint lives entirely inckanext-fair3r's ownresource-upload.js(the size/format routing decision and the "force Zenodo" checkbox). Withoutckanext-fair3rinstalled and enabled, nothing in the normal CKAN UI ever calls this plugin's upload endpoint at all - it would need a hand-crafted request. See the implementation plan's staged delivery order for exactly where that wiring lands.
In short: install this plugin on its own and it runs (migrations apply,
the blueprint responds, tests pass), but it's only actually useful
alongside a FAIR3R deployment that also runs ckanext-fair3r.
Sandbox smoke test findings (Stage 8)
Confirmed empirically against the real sandbox.zenodo.org (the current,
InvenioRDM-based Zenodo) - two things the implementation plan flagged as
unverified assumptions, now settled:
metadata.creatorsis required to publish, even though updating a deposition's metadata without it is accepted - omitting it makespublish_depositionfail every time with a 400.metadata_mapper.py'sdatacite_to_zenodonow always setscreators, falling back to the submitter's name when the DataCite metadata has none (e.g. nockanext-fair3r, or no FDF metadata yet).- Setting
metadata.communitiesdoes not associate the record with that community by itself - it only opens a pendingcommunity-inclusionrequest against the record, which stays unaccepted (and invisible under the community) until explicitly accepted, even for the account that owns the community.publish_guard.pynow does this automatically right after a successful publish (_accept_pending_community_inclusion) - best-effort: a failure here is logged but never undoes the publish (the DOI is already minted by that point). - The description HTML sanitizer runs on write, not just on display,
and its real allow-list is now documented directly above
build_zenodo_description_htmlinmetadata_mapper.py(confirmed by round-tripping a probe deposition through every plausible tag and reading back what Zenodo actually stored).
Tests
docker exec -u ckan -it ckan-app pytest --ckan-ini=/plugins/ckanext-zenodo/test.ini /plugins/ckanext-zenodo/ckanext/zenodo/tests
License
Released under the GNU Affero General Public License (AGPL) v3.0. See the
file LICENSE for details.
Metadata
Release files for ckanext-zenodo 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ckanext_zenodo-0.1.10.tar.gz | 45.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ckanext_zenodo-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.5 kB
Release files / ckanext_zenodo-0.1.10.tar.gz
| Download URL | ckanext_zenodo-0.1.10.tar.gz |
|---|---|
| Size | 45.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f553a4a328161eb4a86dcd156729b4273c0aedd52797336d5e47accc486361b
|
|
BLAKE2b-256 checksum How to use checksums |
2321912bf0526330cd4984bd0328cdb7c7dc263ca61c195147a9670fed603f2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / ckanext_zenodo-0.1.10-py3-none-any.whl
| Download URL | ckanext_zenodo-0.1.10-py3-none-any.whl |
|---|---|
| Size | 51.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4580ee26ba9cefc2f11630cf15fe55bfa09b7984237cdeb20f2759f80c2bddff
|
|
BLAKE2b-256 checksum How to use checksums |
7c6291f7ec33620cf48736ed23a7436508b4adf92d24d8816db5029e2137cbbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for ckanext-zenodo 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.