Define a dataset
A dataset is a table everyone agrees on: the stable shape transforms write into and surfaces read from, whichever source the rows came from.
- Describe the tableA dataclass extending DatasetTable: its name, its primary key, how sensitive it is, and one field per column with its type and unit. The transform and device that made each row are added for you.
tables.py from typing import Annotated from shenas_datasets.core import DatasetTable, Date, Source from shenas_plugins.core.classification import DataClassification from shenas_plugins.core.table import Field class DailyHRV(DatasetTable): class _Meta: name = "daily_hrv" display_name = "HRV" pk = ("date", "transform_id") time_at = "date" classification = DataClassification.SENSITIVE date: Date source: Source = "" rmssd: Annotated[float, Field(db_type="DOUBLE", unit="ms", display_name="RMSSD")] | None = None - Name the unitColumn names carry their unit: duration_s, distance_m, weight_kg. Units are SI unless the service hands data over in others and converting would lose something.
- Keep it stableDataset schemas are versioned. A breaking change needs a new major version, and transforms and surfaces pin to the version they use.
- Register the entry pointDatasets are registered under shenas.datasets. shenas creates the table the first time a transform writes into it.
Datasets that come with shenas
activityA workout or movement session: duration_s, distance_m, sport type, start_at, device_id.
daily_hrvHeart rate variability per day: date, rmssd_ms, sdnn_ms, source.
transactionA financial transaction: date, amount, currency, merchant, category, account.
sleepA night’s sleep: start_at, end_at, total_s, deep_s, rem_s, device_id.
eventA calendar event: title, start_at, end_at, calendar, location.
This list is a sample; the definitions in the repository are the authority. If the one you need is missing, propose it: the bar is stability and SI units.
Working examples are under plugins/datasets/ in the repository: shenas-org/shenas Public mirror (shenas-org/shenas): Last updated 2026-05-23. Treat it as frozen; do not rely on it for current releases.
Other kinds
SourcesBring data in from a service or a local file.dlt
TransformsTurn what came in into shared measures, or write a kind of your own.SQL, geofence, geocode, regex extract, LLM categorize
SurfacesScreens: charts, tables, timelines, anything visual.Lit web components, Arrow IPC
FrontendThe shell around everything is a plugin too: write your own or extend the default.
ThemeStyles everything at once: a stylesheet and a small class.CSS custom properties
AnalysisWays of testing a hypothesis: the operations it may use and how it chooses them.operation vocabulary, recipe strategy