Timenet.manifest
timenet.manifest ¶source
The dataset manifest: a frozen :class:Manifest and its JSON codec.
GitSourceMap
module-attribute
¶source
GitSourceMap = dict[PackageName, GitSource]
The commit of each installed TimeNet package, keyed by package name.
OLDEST_READABLE_TIMEF_FORMAT_VERSION
module-attribute
¶source
The oldest TimeF format version that this TimeNet reads.
Version 2 is the format of TimeNet 0.12. Version 1 names layouts used during early development, and no TimeNet reads them.
PackageName
module-attribute
¶source
The name pip installs, for example timenet-connectors (not the import name timenet_connectors).
TIMEF_FORMAT_VERSION
module-attribute
¶source
The maximum TimeF format version this TimeNet package supports, and the version that it writes.
It versions every file of a release except control.duckdb, which
:data:~timenet.format.duckdb.CONTROL_SCHEMA_VERSION versions.
BuildEnvironment ¶source
Bases: TimeFModel
The Python version, the installed packages, and the TimeNet commits that produced a version.
git
instance-attribute
¶source
git: GitSourceMap
The commit of each installed TimeNet package. A package that is not installed is absent.
model_config
class-attribute
instance-attribute
¶source
model_config = ConfigDict(
extra="forbid",
frozen=True,
revalidate_instances="always",
serialize_by_alias=True,
validate_by_name=True,
validate_default=True,
)
packages
instance-attribute
¶source
packages: dict[PackageName, StrictStr]
Each installed package and its version, sorted by name.
capture
classmethod
¶source
capture(git: GitSourceMap) -> Self
Describe this interpreter, with git from TimeNetSnapshot.to_source_map().
FilePart ¶source
Bases: TimeFModel
One data file of a dataset version. It has a path, a checksum, and a byte size in one record.
The path, checksum, and size stay together in one record. A reader does not need to join a file to its digest across two structures. A consumer can verify integrity and plan a download from the manifest alone.
GitSource ¶source
Bases: TimeFModel
The git commit that one TimeNet package was built from.
contains_local_changes
instance-attribute
¶source
Whether the package directory had uncommitted changes, untracked files included.
Manifest ¶source
Bases: TimeFModel
The single source of truth a consumer reads to interpret a dataset version.
build_env
instance-attribute
¶source
build_env: BuildEnvironment
The Python version, the package set, and the TimeNet commits that produced this version.
counts
class-attribute
instance-attribute
¶source
counts: ManifestCounts = Field(
default_factory=ManifestCounts
)
Row and entity counts recorded for quick inspection.
dataset_schema
class-attribute
instance-attribute
¶source
dataset_schema: Annotated[
DatasetSchema, Field(alias=schema)
] = Field(default_factory=DatasetSchema)
Structural schema: time-series specs, annotations, and tasks.
files
instance-attribute
¶source
files: ManifestFiles
Descriptor for every data artifact, grouped by kind.
lineage
class-attribute
instance-attribute
¶source
lineage: tuple[ParentDatasetCard, ...] = ()
Flattened provenance snapshots; never traversed to read data.
model_config
class-attribute
instance-attribute
¶source
model_config = ConfigDict(
extra="forbid",
frozen=True,
revalidate_instances="always",
serialize_by_alias=True,
validate_by_name=True,
validate_default=True,
)
parent_cards
class-attribute
instance-attribute
¶source
Copies of the cards of the declared parents, indexed by parent alias.
payload_sources
class-attribute
instance-attribute
¶source
payload_sources: dict[SourceKeyField, PayloadSource] = (
Field(default_factory=dict)
)
Every release that stores a payload file this release reads, by source key, pinned to those files. The writer flattens them, so a source's own sources are not listed unless this release reads their files too.
timef_format_version
instance-attribute
¶source
timef_format_version: Annotated[
int,
Field(
strict=True,
ge=OLDEST_READABLE_TIMEF_FORMAT_VERSION,
le=TIMEF_FORMAT_VERSION,
),
]
The TimeF format version of the release: every file except control.duckdb, which has its own.
value_encoding
class-attribute
instance-attribute
¶source
spec_type to the values-column encoding used by its shards.
values_backend
class-attribute
instance-attribute
¶source
values_backend: ValuesBackend = ValuesBackend.PARQUET
Storage backend for the time-series values plane.
difference_from ¶source
difference_from(
other: Manifest,
) -> ReleaseDifference | None
Compare this manifest with another one of the same release, ignoring their build environments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Manifest
|
The other manifest. |
required |
Returns:
| Type | Description |
|---|---|
ReleaseDifference | None
|
|
ReleaseDifference | None
|
release. |
ManifestCounts ¶source
Bases: TimeFModel
TimeF entity counts recorded for inspection without opening DuckDB.
annotation_contents
class-attribute
instance-attribute
¶source
Number of reusable annotation content items.
annotation_occurrences
class-attribute
instance-attribute
¶source
Number of annotation attachments across all object types.
model_config
class-attribute
instance-attribute
¶source
model_config = ConfigDict(
extra="forbid",
frozen=True,
revalidate_instances="always",
serialize_by_alias=True,
validate_by_name=True,
validate_default=True,
)
signal_chunks
class-attribute
instance-attribute
¶source
Number of Signal chunk placements in the values plane.
signals_by_spec
class-attribute
instance-attribute
¶source
Signal count keyed by specification type.
ManifestFiles ¶source
Bases: TimeFModel
Descriptors for every TimeF artifact. Readers use this data rather than a file glob.
model_config
class-attribute
instance-attribute
¶source
model_config = ConfigDict(
extra="forbid",
frozen=True,
revalidate_instances="always",
serialize_by_alias=True,
validate_by_name=True,
validate_default=True,
)
payloads
class-attribute
instance-attribute
¶source
Packed large text, string lists, and irregular time offsets.
time_series
class-attribute
instance-attribute
¶source
Parquet shards or files inside the Zarr values store.
PayloadSource ¶source
Bases: TimeFModel
A release whose payload files this release reads, pinned to the files it reuses.
The pins copy the source's own manifest records, so checking that the source is still the release this one was written against needs only the two manifests, no hashing.
files
instance-attribute
¶source
The source's manifest records for the files this release reads, in path order.
parse_manifest ¶source
Parse the JSON text of a stored manifest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str | bytes
|
The JSON text. |
required |
where
|
str
|
The source location to include in errors. |
required |
path
|
Path | None
|
The file of the manifest, or |
None
|
Returns:
| Type | Description |
|---|---|
Manifest
|
The manifest. |
Raises:
| Type | Description |
|---|---|
TimeFFormatVersionError
|
If the manifest uses an older or a newer format than this TimeNet reads. |
TimeNetManifestError
|
If the text is not a valid manifest. |
read_manifest ¶source
Read a manifest.json file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
The file. |
required |
Returns:
| Type | Description |
|---|---|
Manifest
|
The manifest. |
Raises:
| Type | Description |
|---|---|
TimeFFormatError
|
If the file cannot be read. |
TimeFFormatVersionError
|
If the manifest uses an older or a newer format than this TimeNet reads. |
TimeNetManifestError
|
If the file is not a valid manifest. |