v0.1.31 - Constant Renaming & Nomenclature Alignment (2025-12-12)¶
What Changed?¶
This release improves code clarity by renaming the FIELD_TYPE_DATA constant to FIELD_TYPE_EVENT across the entire codebase. The change aligns the library's nomenclature with event-based semantics, making it clearer that detection data represents discrete events rather than generic data. All references have been updated throughout the constants, command, and mock modules.
What's New¶
Refactoring: Improved Constant Naming¶
What it does:
Renames FIELD_TYPE_DATA to FIELD_TYPE_EVENT to better reflect the semantic meaning of detection data. Detection events are now clearly distinguished from generic data concepts, improving code readability and maintainability.
How to use it: If you're using the exported constant directly, update your imports:
# Old (v0.1.30 and earlier)
from kazunoko import FIELD_TYPE_DATA
# New (v0.1.31+)
from kazunoko import FIELD_TYPE_EVENT
Code example:
from kazunoko import Command, FIELD_TYPE_EVENT
with device:
cmd = Command(device)
event = cmd.read()
print(event.type) # "event"
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¶
- No new features in this release (refactoring focus)
🔧 Changed¶
- Renamed
FIELD_TYPE_DATAconstant toFIELD_TYPE_EVENTfor improved semantic clarity - Updated all module imports and references to use the new constant name
- Updated docstrings in
Command.read()to reflect event-based nomenclature
🐛 Fixed¶
- No bug fixes in this release
Is It Safe to Upgrade?¶
Backward Compatible: Mostly (with minor breaking changes for direct constant usage)
- If you use the
Commandclass to read events, there are no changes to your code - If you directly imported
FIELD_TYPE_DATA, you'll need to update your imports toFIELD_TYPE_EVENT - All device functionality remains unchanged; this is purely a naming improvement
Tests Passed¶
- ✅ Builds without errors
- ✅ All imports and constant references updated correctly
- ✅ Nomenclature aligned across all modules (constants, command, mock)
Release Details¶
- Date: 2025-12-12
- Version: v0.1.31
- Files Changed: 4
- Commits: dc629f4, a1f3606
Next Steps¶
- Continue monitoring for other nomenclature improvements
- Consider similar refactoring for other constants if semantic clarity can be improved
- Plan for next feature addition based on user feedback