Skip to content

Feature/poi support - #79

Draft
adefabian wants to merge 9 commits into
mainfrom
feature/poi_support
Draft

Feature/poi support#79
adefabian wants to merge 9 commits into
mainfrom
feature/poi_support

Conversation

@adefabian

Copy link
Copy Markdown
Collaborator

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-valued SampleSeries.
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

  • Storage: new poi_channels silver table (POI_CHANNELS_SCHEMA); series type is
    determined by table membership (channels ⇒ SAMPLE, poi_channels ⇒ POI) — no
    series_type column needed.
  • Model: PointsInTimeSeries gains string-value support — == / != and sampling
    for strings; arithmetic/ordering/reductions raise for strings via a @_numeric_only
    guard; value-type-aware dtype().
  • Query API: QueryBuilder.poi_channel(dtype=...) (accepts the enum or the plain
    string "double"/"string"); the selector carries series_type + value_type and
    is the plan-time source of truth for series-type dispatch.
  • Solve stage: _prepare_channels_join unions poi_channels after RLE encoding
    (zero-duration points aren't merged); TimeSeriesCache.load_blob builds the right
    series from the selector; a solve-time assertion rejects a declared-vs-actual mismatch.
  • Config/DB: poi_channels_uri wired through MeasurementDBConfig,
    MeasurementDB.poi_channels(), and the reporting Source config.
  • Tests: POI integration suite (freeze-frame, string equality + op gating,
    mix-and-match, declared-vs-actual, backward-compat), PointsInTimeSeries string
    units, poi_channel(dtype=...) coercion units, and a config-passthrough regression.
  • Demo: reporting_pipeline.ipynb gains a DTC section — freeze-frame (RPM at each
    P0301 misfire), per-recording fault counts, and a ±10 s window histogram around faults.
  • Docs: API reference regenerated; make update-api-docs target added.

Test Plan

  • Unit tests added/updated
  • Manual testing completed
  • Documentation updated (if applicable)

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No new linter warnings introduced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant