aac1c8e06d
The BW ACH ingest path was inserting every event with
record_type="Waveform" regardless of the actual type because
read_blastware_file() had `ev.record_type = "Waveform"` hardcoded, and
the live watcher-forward path parses files from a tmp path (suffix
".bw") that doesn't carry the original extension.
V10.72+ MiniMate Plus firmware encodes the event type as the last
character of the AB0T extension scheme (H=Histogram, W=Waveform,
M=Manual, E=Event, C=Combo). This change:
1. Adds derive_record_type_from_filename() public helper in
minimateplus/event_file_io.py
2. Uses it inside read_blastware_file() so direct callers (the
--dry-run path of scripts/import_bw.py, tests, ad-hoc scripts)
get correct types automatically
3. Overrides ev.record_type in WaveformStore.save_imported_bw()
using the ORIGINAL filename (source_path.name) — required
because the parser sees only the tmp file
Old S338 firmware (3-char extensions ending in `0`) and any
unrecognized suffix fall back to "Waveform".
Existing DB rows ingested before this fix are stuck with
record_type="Waveform" — a one-off SQL backfill would fix them
retroactively if desired. Terra-view's event modal also derives
client-side from the filename, so the UI already shows the correct
type for old events even without the backfill.
Version bumped to 0.16.1 in pyproject.toml, event_file_io.py
TOOL_VERSION, sfm/server.py FastAPI version, and CHANGELOG.md.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
24 lines
588 B
TOML
24 lines
588 B
TOML
[build-system]
|
|
requires = ["setuptools>=68", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "seismo-relay"
|
|
version = "0.16.1"
|
|
description = "Python client and REST server for MiniMate Plus seismographs"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"fastapi>=0.104",
|
|
"uvicorn[standard]>=0.24",
|
|
"pyserial>=3.5",
|
|
"sqlalchemy>=2.0",
|
|
"python-multipart>=0.0.7",
|
|
"h5py>=3.10",
|
|
"numpy>=1.24",
|
|
]
|
|
|
|
[tool.setuptools.packages.find]
|
|
# Auto-discovers minimateplus/, sfm/, bridges/ as packages
|
|
where = ["."]
|
|
include = ["minimateplus*", "sfm*", "bridges*"]
|