v0.10.2 - Mock Data Type and Timestamp Refinement (2025-12-28)¶
What Changed?¶
This release improves the mock device and event generator to provide clearer data differentiation and more realistic timing.
Mock data is now consistently marked with type="mock" to distinguish it from real device data, while preserving original event timestamps from events.jsonl.
What's New¶
Improved Mock Data Differentiation¶
What it does:
All mock-generated data is now consistently marked with type="mock" (instead of the original type="event"), making it easy to distinguish mock test data from real device data in logs, debugging, and analysis.
How to use it:
# Mock data will have type="mock"
uv run kazunoko generate random --count 5 | jq '.type'
# Output: "mock" (4 times)
# Real device data would have type="event" or type="response"
# This clear differentiation helps identify test vs. production data
Preserved Event Timestamps¶
What it does:
Original detected_us timestamps from events.jsonl are now preserved in generated events, providing more realistic timing relationships and patterns that reflect actual detector behavior.
How to use it:
# Events maintain original detection times from events.jsonl
uv run kazunoko generate random --count 3 | jq '.detected_us'
# Output: Original timestamps preserved (e.g., 1766584357752874)
# Speed control still works - timing is adjusted but relationships preserved
uv run kazunoko generate random --count 5 --speed 2.0 --jitter 0.1
Installation¶
Quick Start¶
# Get the release
git checkout v0.10.2
# Setup
uv sync
# Run CLI
uv run kazunoko --help
What's Different from the Last Version?¶
✅ Added¶
- Enhanced mock data type differentiation for clearer test vs. production data identification
🔧 Changed¶
MockGenerator.get_next_event()now consistently setstype="mock"for all generated events- Type field management consolidated in MockDevice for Device API usage
🐛 Fixed¶
- Mock events now preserve original
detected_ustimestamps fromevents.jsonlinstead of overwriting with current time - Type field handling clarified between MockGenerator (direct usage) and MockDevice (Device API usage)
Is It Safe to Upgrade?¶
Backward Compatible: Yes (with minor output changes)
- Impact: Mock data now has
type="mock"instead oftype="event". This is a breaking change for tests that specifically check fortype="event"in mock data, but aligns with the design goal of differentiating mock from real device data. - Mitigation: If you have code checking mock data types, update to expect
type="mock"instead - Device API: No changes - Device API usage remains fully compatible
Tests Passed¶
- ✅ Builds without errors
- ✅
kazunoko generate randomproduces type="mock" output - ✅ Original
detected_ustimestamps are preserved from events.jsonl - ✅ MockDevice via Device API correctly outputs type="mock"
- ✅ Speed and jitter controls still work correctly
Release Details¶
- Date: 2025-12-28
- Version: v0.10.2
- Files Changed: 6 (
mock.py,__init__.py,pyproject.toml,CHANGELOG.md, etc.) - Commits:
b9598fc- fix(mock): preserve original detected_us from events8cc0b9e- refactor(mock): separate type management between MockGenerator and MockDevice4494056- fix(mock): ensure all mock data hastype="mock"to differentiate from real device5e96551- bump: version 0.10.1 → 0.10.2
Next Steps¶
- Monitor for any compatibility issues with code checking mock data types
- Consider adding comprehensive tests for mock data type differentiation
- Explore additional mock data sources and customization options