Publishing a dataset on the hub itself, with a local identifier and no external provider
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-19 13:01:14 +01:00
docs feat: publish on the hub itself, under an identifier of its own (F5-6) 2026-10-24 12:52:35 +02:00
src test: the address comes from the environment and DataCite leaves out a null DOI 2026-11-19 12:17:29 +01:00
.gitignore chore: scaffold splent_feature_local_publication (light) 2026-10-24 12:00:03 +02:00
COPYING chore: scaffold splent_feature_local_publication (light) 2026-10-24 12:00:03 +02:00
COPYING.LESSER chore: scaffold splent_feature_local_publication (light) 2026-10-24 12:00:03 +02:00
MANIFEST.in chore: scaffold splent_feature_local_publication (light) 2026-10-24 12:00:03 +02:00
pyproject.toml chore: release splent_io/splent_feature_local_publication to v0.2.1 2026-11-19 13:01:14 +01:00
README.md docs: why 0.2.0 publishes under the public id and declares no route 2026-10-25 16:26:52 +01:00

splent_feature_local_publication

The local_publication feature of a SPLENT product line.

A SPLENT feature is a Python package that a product composes with others: its models, routes, services, templates and hooks are registered when the product starts. What this feature provides and requires is listed in the [tool.splent.contract] section of pyproject.toml, which splent feature:contract --write keeps in sync with the source.

This one publishes a hub's datasets on the hub itself, for a hub without Zenodo (F5-6 of the OpenHubs plan). It is a publication provider of the dataset feature (dataset's DepositionProvider, 0.10.0 and later), next to zenodo, and owns no table and no route: what it publishes are dataset's rows, at dataset's addresses.

What a publication gives a dataset

  • An identifier of the hub's own, pid_scheme = "local": the dataset's public id (CO-5), the ULID it has had since it was made (26 characters of Crockford's base 32, sorted by the time it was made, that name neither the dataset nor its owner). It is no DOI and never looks like one: a DOI with a prefix nobody registered would be a false one.
  • Its landing at dataset's /records/<public_id>/, which answers what /doi/<doi>/ answers: the page, the FAIR metadata by content negotiation (JSON-LD, Turtle, DataCite), and the tombstone of a withdrawn dataset. The metadata names the landing as the identifier's address, never doi.org, and the pages call it an ID, not a DOI.
  • Its files where hubfile keeps them: nothing is deposited anywhere. Their pages and raw addresses are hubfile's, under the landing (/records/<public_id>/files/<name> and .../files/raw/<name>, hubfile 0.10.0 and later), and /hubfiles/raw/<id>/<name>.

0.1.0 minted an identifier of its own and answered /records/<pid>/ itself, a rule dataset's landing declares too, which the contract check of product:validate counted as a route collision. Since 0.2.0 the identifier is the public id and the landing is dataset's alone. A dataset 0.1.0 published keeps that identifier, and its landing went with the route; only the development data of filehub_splent, which no release ever ran, has any.

API v1's publish answers it with doi null and the identifier in pid, pid_scheme and landing_url. A metadata change needs no sync: the landing reads the dataset as it is.

Use it in a product

splent feature:add splent_feature_local_publication

A product that installs zenodo as well publishes each dataset through one of them: the one the publication asks for, else dataset's DATASET_PUBLICATION_PROVIDER, else the only one installed. A dataset keeps the provider it was published through, its new versions included.

The OpenHubs model gets the node with the change in docs/openhubs_spl.uvl.patch: publicacion becomes a mandatory or-group of zenodo and local_publication, with local_publication => dataset.

Develop

splent feature:test splent_feature_local_publication
splent feature:contract splent_feature_local_publication

uvlhub does not declare it, so its tests run in a neutral app, with the newest releases of dataset and hubfile; filehub_splent declares it, so SPLENT_APP=filehub_splent splent feature:test splent_feature_local_publication runs them in the file hub. Its tests publish a CSV, a file of hubfile's generic type.

Release

splent feature:release splent_feature_local_publication --dry-run --bump patch
splent feature:release splent_feature_local_publication

The first command rehearses the release and changes nothing. The second publishes it to the git forge and to PyPI, and a PyPI version is permanent.