You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's new
Added
MetricSpec.format — optional metadata field for metric value interpretation.
Allowed values: percentage, absolute, ratio, currency, and currency:<CODE> (e.g. currency:USD, currency:EUR). Plain "currency" is valid for monetary metrics with mixed or unspecified currency. Validated at spec load time.
metric_format output column — every compute() result now includes a metric_format column (inserted after metric_name) carrying the spec's format value, or None when format is not set.
hourly period type — period_type="hourly" produces one output row per clock hour. time_window now accepts full ISO datetime strings (e.g. "2024-01-15T08:00:00") for hourly granularity; plain date strings fall back to midnight.
METRIC_FORMAT_VALUES — new constant exported from aitaem: frozenset({'percentage', 'absolute', 'ratio', 'currency'}).
Changed (Breaking)
STANDARD_COLUMNS now has 11 entries. The metric_format column is inserted at index 5 (after metric_name). Code that relies on column position or count must be updated.