Skip to content

Feature/poi support - #79

Merged
tombonfert merged 30 commits into
mainfrom
feature/poi_support
Sep 2, 2026
Merged

Feature/poi support#79
tombonfert merged 30 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

@adefabian
adefabian requested a review from tombonfert August 13, 2026 13:09
@adefabian
adefabian force-pushed the feature/poi_support branch 2 times, most recently from 7b92d30 to 328c266 Compare August 13, 2026 13:21
Comment thread docs/impulse/docs/config/configuration.md
Comment thread docs/impulse/docs/data_model/gold_layer_event_normalized.md
Comment thread docs/impulse/docs/data_model/index.md
Comment thread demos/reporting_pipeline.ipynb
Comment thread src/impulse_query_engine/analyze/query/solvers/default_solver.py Outdated
Comment thread src/impulse_query_engine/analyze/query/solvers/default_solver.py Outdated
Comment thread src/impulse_query_engine/analyze/query/solvers/default_solver.py Outdated
@adefabian
adefabian force-pushed the feature/poi_support branch from 59d09ca to a4fd1d6 Compare August 17, 2026 05:59
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.50276% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.06%. Comparing base (a042e3c) to head (3e33ee8).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...query_engine/model/series/points_in_time_series.py 89.47% 6 Missing and 2 partials ⚠️
...ery_engine/analyze/query/solvers/default_solver.py 77.41% 5 Missing and 2 partials ⚠️
..._engine/analyze/metadata/time_series_expression.py 93.93% 1 Missing and 1 partial ⚠️
...mpulse_query_engine/analyze/query/query_builder.py 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   88.99%   89.06%   +0.06%     
==========================================
  Files          61       62       +1     
  Lines        5199     5360     +161     
  Branches      627      648      +21     
==========================================
+ Hits         4627     4774     +147     
- Misses        461      470       +9     
- Partials      111      116       +5     
Flag Coverage Δ
query_engine 85.07% <89.44%> (+0.30%) ⬆️
reporting 94.25% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
..._query_engine/analyze/query/solvers/blob_solver.py 49.09% <100.00%> (ø)
..._query_engine/analyze/query/solvers/empty_cache.py 88.88% <100.00%> (ø)
...query_engine/analyze/query/solvers/series_cache.py 80.00% <100.00%> (ø)
...uery_engine/analyze/query/solvers/solver_config.py 100.00% <100.00%> (ø)
src/impulse_query_engine/measurement_db.py 79.26% <100.00%> (+3.26%) ⬆️
...impulse_query_engine/model/series/sample_series.py 84.80% <100.00%> (+0.13%) ⬆️
...rc/impulse_query_engine/model/series/value_type.py 100.00% <100.00%> (ø)
src/impulse_query_engine/schema.py 100.00% <100.00%> (ø)
src/impulse_reporting/config/config_parser.py 97.19% <100.00%> (+0.01%) ⬆️
..._engine/analyze/metadata/time_series_expression.py 78.91% <93.93%> (+1.46%) ⬆️
... and 3 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adefabian
adefabian marked this pull request as ready for review August 17, 2026 12:47
@adefabian
adefabian requested a review from a team as a code owner August 17, 2026 12:47
Comment thread docs/impulse/docs/references/query_engine/tsal/core_data_model.md Outdated
Comment thread docs/impulse/docs/references/query_engine/tsal/defining_expressions.md Outdated
Comment thread skills/impulse-data-model/SKILL.md Outdated
Comment thread skills/impulse-analyze/SKILL.md Outdated
Comment thread src/impulse_query_engine/analyze/metadata/time_series_expression.py Outdated
Comment thread src/impulse_query_engine/analyze/metadata/time_series_expression.py Outdated
Comment thread src/impulse_query_engine/analyze/query/solvers/default_solver.py Outdated
Comment thread src/impulse_query_engine/model/series/points_in_time_series.py Outdated
@adefabian
adefabian force-pushed the feature/poi_support branch from ad4f324 to 767ac6f Compare August 20, 2026 06:24
Comment thread docs/impulse/docs/references/query_engine/tsal/defining_expressions.md Outdated
@tombonfert
tombonfert merged commit 833bee3 into main Sep 2, 2026
6 checks passed
@tombonfert
tombonfert deleted the feature/poi_support branch September 2, 2026 07:14
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.

2 participants