v0.1.52 - RTC Synchronization Integration into setup() (2025-12-14)¶
What Changed?¶
This release integrates RTC (real-time clock) synchronization into the Measure.setup() method, simplifying the measurement setup workflow. Device RTC is now automatically synchronized to the PC's current time as part of the setup process, eliminating the need for a separate set_rtc_time() call. The set_rtc_time() method remains available for manual synchronization if needed.
What's New¶
Main Feature: Automatic RTC Synchronization in setup()¶
What it does:
The Measure.setup() method now automatically synchronizes the device's real-time clock (RTC) to the PC's current time as part of the setup process. This ensures accurate event timestamps without requiring a separate step.
How to use it:
Simply call measure.setup() and RTC synchronization happens automatically:
from kazunoko import connect, Measure, MeasureConfig
config = MeasureConfig(thresholds={1: 300, 2: 300, 3: 300})
with connect() as device:
measure = Measure(device, config)
# setup() now includes RTC synchronization automatically
metadata = measure.setup()
# No need for separate set_rtc_time() call
event = measure.read_event()
Benefits:
- Simpler API: One call instead of two
- Guaranteed synchronized timestamps from the start
- Clearer semantic meaning: "setup" encompasses all preparation
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¶
- Automatic RTC synchronization as part of
Measure.setup()
🔧 Changed¶
Measure.setup()now callsset_rtc_time()internally during setup- Updated all documentation and examples to reflect simplified workflow
- Simplified measurement setup: now single
setup()call instead of two
🐛 Fixed¶
- Eliminates common mistake of forgetting to synchronize RTC before measurement
Is It Safe to Upgrade?¶
Backward Compatible: Yes ✅
Measure.setup()method signature unchanged (still returnsMeasureMetadata)set_rtc_time()method still available for manual synchronization if needed- Existing code that calls
measure.setup()followed bymeasure.set_rtc_time()still works (RTC sync called twice, harmless) - All streaming methods (
stream_by_count(),stream_by_time(), etc.) unchanged
Tests Passed¶
- ✅ Builds without errors
- ✅
setup()method signature verified - ✅ RTC synchronization included in setup flow
- ✅
set_rtc_time()method still callable manually - ✅ All documentation examples updated consistently
- ✅ Backward compatibility confirmed
Release Details¶
- Date: 2025-12-14
- Version: v0.1.52
- Files Changed: 6 total
- Source:
src/kazunoko/measure.py - Docs:
docs/releases/v0.1.52.md,docs/releases/v0.1.51.md,docs/api/design.md - README:
README.md - Project:
CLAUDE.md - Key Changes:
- Integrated RTC synchronization into
Measure.setup() - Updated all documentation to reflect simplified workflow
- Maintained full backward compatibility
Next Steps¶
- Gather user feedback on the simplified setup workflow
- Consider adding configuration options if advanced RTC control is needed
- Evaluate other measurement setup steps for similar consolidation