Feature/poi support - #79
Conversation
7b92d30 to
328c266
Compare
|
|
||
| --- | ||
|
|
||
| ## calculated_channels (optional) |
There was a problem hiding this comment.
why are we deleting the documentation of calculated channels? Please keep it :)
There was a problem hiding this comment.
no need to modify this file
There was a problem hiding this comment.
no need to modify this file
There was a problem hiding this comment.
it seems that your coding agent deleted everything related to calculated channels. I would like to keep the calculated channels example in the demo notebook. Is there a specific reason why this got deleted?
| def __init__(expr, | ||
| uses_alias: bool = False, | ||
| series_type: SeriesType = SeriesType.SAMPLE, | ||
| value_type: PoiValueType = PoiValueType.DOUBLE) |
There was a problem hiding this comment.
I would generalize the value type, maybe we will support in the future also SampleSeries of string type. Therefore, rather than naming the class PoiValueType, lets name it SeriesValueType
| if pd.notna(s[self._te_col].iloc[0]): | ||
| raise ValueError( | ||
| "POI channel series-type mismatch: poi_channel(...) resolved to a SAMPLE " | ||
| "channel (its rows carry a validity interval). Use channel(...) for SAMPLE " | ||
| "channels and poi_channel(...) for POINTS_IN_TIME channels." | ||
| ) |
There was a problem hiding this comment.
This assumption is too strong and I would remove this check (I thought already of having POI channels in the normal channels table with tstart == tend, which would then raise a ValueError here).
| values = values * factor | ||
| return SampleSeries(s[self._ts_col], s[self._te_col], values) | ||
|
|
||
| def _assert_poi_data(self, s, value_type) -> None: |
There was a problem hiding this comment.
Lets move this function into PointsInTimeSeries class and call it from the constructor of POISeries.
| F.col(cfg.poi_timestamp_col).alias(cfg.tstart_col), | ||
| F.lit(None).cast(T.LongType()).alias(cfg.tend_col), | ||
| F.col(cfg.poi_value_double_col).alias(cfg.value_col), | ||
| F.col(cfg.poi_value_string_col).alias(cfg.poi_value_string_col), |
ran update-api-docs
Added missing poi in Source Basemodel
Added missing poi in Source Basemodel
59d09ca to
a4fd1d6
Compare
Moved POI data check to PointsInTimeSeries
Added missing csv for testing Removed dtype column from csvs
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
+ Coverage 88.89% 89.06% +0.17%
==========================================
Files 61 61
Lines 5194 5330 +136
Branches 625 647 +22
==========================================
+ Hits 4617 4747 +130
- Misses 466 468 +2
- Partials 111 115 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
Adds Points-in-Time (POI) series as a first-class silver-layer channel type:
a value defined only at its timestamp (no between-point validity), backed by
PointsInTimeSeries, sitting alongside the existing interval-valuedSampleSeries.The motivating case is ECU Diagnostic Trouble Codes (DTCs) — string-valued fault
events analyzed together with continuous signals ("RPM at the instant
DTC == P0301").Changes
poi_channelssilver table (POI_CHANNELS_SCHEMA); series type isdetermined by table membership (
channels⇒ SAMPLE,poi_channels⇒ POI) — noseries_typecolumn needed.PointsInTimeSeriesgains string-value support —==/!=and samplingfor strings; arithmetic/ordering/reductions raise for strings via a
@_numeric_onlyguard; value-type-aware
dtype().QueryBuilder.poi_channel(dtype=...)(accepts the enum or the plainstring
"double"/"string"); the selector carriesseries_type+value_typeandis the plan-time source of truth for series-type dispatch.
_prepare_channels_joinunionspoi_channelsafter RLE encoding(zero-duration points aren't merged);
TimeSeriesCache.load_blobbuilds the rightseries from the selector; a solve-time assertion rejects a declared-vs-actual mismatch.
poi_channels_uriwired throughMeasurementDBConfig,MeasurementDB.poi_channels(), and the reportingSourceconfig.mix-and-match, declared-vs-actual, backward-compat),
PointsInTimeSeriesstringunits,
poi_channel(dtype=...)coercion units, and a config-passthrough regression.reporting_pipeline.ipynbgains a DTC section — freeze-frame (RPM at eachP0301 misfire), per-recording fault counts, and a ±10 s window histogram around faults.
make update-api-docstarget added.Test Plan
Checklist