Skip to content

v0.1.5 - Event Generation & Data Format Improvements (2025-12-02)

What Changed?

This release improves the event generation system by fixing the count limit in the generate command and enhancing random event generation with realistic detector data. All data now uses a consistent format matching actual detector output, making testing and development more reliable.


What's New

Event Generation with Count Limit

What it does: The kazunoko generate command now properly respects the -c (count) option for both random and file-based event sources. Previously, the event loop used while True and only worked correctly for random mode when a count limit was needed.

How to use it:

# Generate 5 random events
uv run kazunoko generate random -c 5

# Load and output 5 events from file
uv run kazunoko generate sample.jsonl -c 5

Enhanced Random Event Generation

What it does: Random event generation now produces events with the same comprehensive format as the sample data file, including detector-specific fields (adc, adc_raw, adc_mv, timestamps, etc.) instead of just basic signal values.

How to use it:

# Generate realistic detector data
uv run kazunoko generate random -c 10 --seed 42

Installation

Quick Start

# Get the release
git checkout vX.Y.Z

# Setup
task env:setup

# Run CLI
uv run kazunoko --help

What's Different from the Last Version?

✅ Added

  • Enhanced random event generation with realistic detector data format

🔧 Changed

  • Event generation now uses for loop with count limit instead of while True
  • Random events now include all detector fields (adc, adc_raw, adc_mv, tmp_c, atm_pa, hmd_pct, uptime_ms, timedelta_us, unix_timestamp)
  • Random event type changed from FIELD_TYPE_MOCK to FIELD_TYPE_DATA for consistency

🐛 Fixed

  • -c count option now works correctly for file-based event generation
  • Event output now matches consistent JSONL format for both random and file sources

Is It Safe to Upgrade?

Backward Compatible: Yes

  • The changes are fully backward compatible
  • Existing CLI commands work as before
  • The improved format makes random data more realistic for testing

Tests Passed

  • ✅ Builds without errors
  • uv run kazunoko generate random -c 5 produces exactly 5 events
  • uv run kazunoko generate sample.jsonl -c 5 produces exactly 5 events
  • ✅ Random event format matches file-based event format
  • ✅ pre-commit hooks pass

Release Details

  • Date: 2025-12-02
  • Version: v0.1.5
  • Files Changed: 2 (cli.py, mock.py)
  • Commits:
  • 46d00ca: fix(cli): honor count limit in generate command event loop
  • 3f93790: feat(mock): enhance random event generation with realistic data format

Next Steps

  • Add unit tests for event generation and data format consistency
  • Implement additional event generation sources (database, streaming, etc.)
  • Add performance benchmarks for event processing pipelines