fix(forward-log): distinguish histograms from missing-report (v1.5.3)
On machines running histogram-mode units (extensions ending in H,
e.g. H907L1R7.PG0H), every forwarded event was logging "no report"
even though histograms never get auto-exported ASCII reports from
Blastware — making the log look like every forward was misconfigured
when in fact things were working correctly.
Three log states now:
- Waveform + paired TXT
→ "+ <txt> attached"
- Waveform without TXT (likely BW config issue)
→ "no report ⚠"
- Histogram (any flavour)
→ "(histogram, no report expected)"
New is_histogram_event() helper classifies by BW filename extension:
4-char ext ending in H = histogram; old-firmware 3-char extensions
default to non-histogram (safe default — we'd rather flag a missing
report than silently suppress the warning on a real waveform event).
Forwarding logic itself is unchanged — this is purely log clarity.
This commit is contained in:
@@ -50,6 +50,17 @@ class TestIsEventBinary(unittest.TestCase):
|
||||
"something.h5", "noise.json"]:
|
||||
self.assertFalse(ef.is_event_binary(name), name)
|
||||
|
||||
def test_is_histogram_event(self):
|
||||
# 4-char extension ending in H = histogram
|
||||
for name in ["H907L1R7.PG0H", "S353L4H0.8S0H", "P036L318.C80H"]:
|
||||
self.assertTrue(ef.is_histogram_event(name), name)
|
||||
# 4-char extension ending in W = waveform
|
||||
for name in ["S353L4H0.3M0W", "M529LKVQ.6S0W", "P036L318.C80W"]:
|
||||
self.assertFalse(ef.is_histogram_event(name), name)
|
||||
# 3-char old-firmware extensions can't be classified — return False
|
||||
for name in ["M529LK44.AB0", "M529LIY6.N00", "M529LJ8V.490"]:
|
||||
self.assertFalse(ef.is_histogram_event(name), name)
|
||||
|
||||
def test_rejects_non_matching_filenames(self):
|
||||
for name in ["", "no_extension",
|
||||
"TooShort.AB0", # stem must be 8 chars
|
||||
|
||||
Reference in New Issue
Block a user