ontometer_corpus.store.publish¶
The public copy of a tagged corpus version, and recovery of withheld files.
publish uploads only the objects the redistribution policy allows. Every
object of the version stays listed in releases/<tag>/index/objects.parquet
with its licence verdict and source URL, so the public copy is a complete
record even where it cannot carry the file. Release files are add-only; the
dataset card (README.md) is the one file a release replaces.
Attributes¶
Classes¶
PublishReport
dataclass
¶
FetchReport
dataclass
¶
Source code in ontometer_corpus/store/publish.py
Attributes¶
fetched = field(default_factory=list)
class-attribute
instance-attribute
¶
changed = field(default_factory=list)
class-attribute
instance-attribute
¶
failed = field(default_factory=list)
class-attribute
instance-attribute
¶
Methods:¶
__init__(fetched=list(), changed=list(), failed=list())
¶
Functions:¶
data_at_rev(paths, rev, dest)
¶
Copy the tracked data files of git revision rev into dest.
Source code in ontometer_corpus/store/publish.py
dataset_card(current, releases, frame)
¶
The Hugging Face dataset card for a release, listing every release as a config.
Source code in ontometer_corpus/store/publish.py
publish(paths, remote, rev, policy=None)
¶
Publish git tag rev to remote: allowed objects, index, tables, card, tag.
The policy is the one recorded at rev; a different policy is refused.
Raises:
| Type | Description |
|---|---|
ReleaseError
|
the tag's |
StoreError
|
a redistributable object is missing locally or corrupt, or the policy does not match the revision's. |
Source code in ontometer_corpus/store/publish.py
fetch_withheld(paths, entries, policy=None, *, session=None, rev=None)
¶
Download withheld objects from their source URLs, keeping only identical bytes.
Verdicts and URLs come from the corpus at rev (the working tree when None), under its recorded policy unless policy is given. Downloads stream to the staging directory and are hashed on the way.