chore(release): v0.24.0 — waveform-shape metrics on events

This commit is contained in:
2026-08-22 06:12:01 +00:00
parent c982512e17
commit ac67e83bcf
4 changed files with 62 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
from __future__ import annotations
import os, sys
from pathlib import Path
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from sfm.database import SeismoDb
from minimateplus.models import Event
SHAPE_COLS = (
"shape_crest_factor",
"shape_near_peak_count",
"shape_sample_count",
"shape_axis",
)
def test_query_events_row_includes_shape_keys(tmp_path: Path):
db = SeismoDb(tmp_path / "s.db")
ev = Event(index=0)
ev._waveform_key = bytes.fromhex("0111abcd")
db.insert_events([ev], serial="BE1")
row = db.query_events(serial="BE1")[0]
for k in SHAPE_COLS:
assert k in row
assert row[k] is None