Writer
timenet.writer ¶source
Serialization of a :class:~timenet.dataset.TimeFDataset to the TimeF on-disk format.
ProgressStage ¶source
Bases: StrEnum
The writer's incremental stages. The writer emits only stages that carry information.
TimeFWriter ¶source
Context manager that serializes a dataset into the TimeF format and commits it atomically.
payload_sources
property
¶source
payload_sources: Mapping[SourceKey, PayloadSource]
The releases that store the payloads this release reuses, pinned to their files.
:meth:write fills it, and the manifest records it as payload_sources.
close ¶source
Write the manifest and atomically publish the staging directory.
An existing version directory is renamed aside to a sibling <version>.old-<uuid> first.
The staging directory then takes its place, and the old directory is deleted. If that
rename fails, the old directory moves back. A hard kill between the two renames leaves the
old release in <version>.old-<uuid>, which no sweep deletes, so it can be renamed back.
The manifest pins the payload source files that :meth:write checked. Before the rename,
the written files are compared with the pins of each release in pinned_by.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If :meth: |
TimeFFormatError
|
If a release in |
OSError
|
If publishing fails and the old release cannot be moved back either. The
error names the |