v1
dataset_scopes record, v1 — canonical aliases.
Consumers and the record registry import from here and never touch the inner
module names, mirroring flow_specs/v1/__init__.py.
Module
Submodules
- bitfount.cache.types.dataset_scopes.v1.migrations - No inbound migration — this is the base version.
- bitfount.cache.types.dataset_scopes.v1.model - Pydantic record for the
dataset_scopescache table (v1). - bitfount.cache.types.dataset_scopes.v1.schema - SQLAlchemy ORM for the
dataset_scopescache table (v1). - bitfount.cache.types.dataset_scopes.v1.store - Each dataset's latest saved scope for a trial (v1).
Classes
Record
class Record(**data: Any):One file in a dataset's latest saved scope for a trial.
Attributes
project_id: The trial (project) the scope was saved for.datasource_task_hash: The dataset's datasource-task hash.file_path: A file in the dataset's selected file list, or""for the one row an empty saved scope is stored as.run_id: The run that saved the scope, if known.saved_at: When the scope was saved, ISO 8601.tags: Arbitrary flat metadata.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Variables
- static
datasource_task_hash : str
- static
file_path : str
- static
model_config
- static
project_id : str
- static
run_id : str | None
- static
saved_at : str
- static
tags : dict[str, typing.Any] | None
ORM
class ORM(**kwargs):SQLAlchemy model for the dataset_scopes cache table.
One row per file in a dataset's latest saved scope for a trial. A dataset's
rows are replaced together; no rows means no scope has been saved for it.
An empty saved scope (the dataset's run selected no file) is one row whose
file_path is "", which the store writes and reads and never returns as
a file.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and
values in kwargs.
Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.
Ancestors
Variables
-
datasource_task_hash : sqlalchemy.orm.base.Mapped[str]
-
file_path : sqlalchemy.orm.base.Mapped[str]
-
project_id : sqlalchemy.orm.base.Mapped[str]
-
run_id : sqlalchemy.orm.base.Mapped[str | None]
-
saved_at : sqlalchemy.orm.base.Mapped[str]
-
tags : sqlalchemy.orm.base.Mapped[dict[str, typing.Any] | None]