v0.1.7 - Enhanced Version Command (2025-12-02)¶
What Changed?¶
This release enhances the version command to fetch and display device firmware version information. When a device is connected, the command queries the kurikintons detector using the GET_VERSION command and displays the response. The command gracefully handles disconnected scenarios by showing only the library version.
What's New¶
Enhanced Version Command¶
What it does:
The version command now connects to the OSECHI detector and retrieves its firmware version using the GET_VERSION command. This provides users with both the library version and device firmware version in a single command.
How to use it:
- Show library version only (no device connection):
kazunoko version
- Show library version and device firmware version:
kazunoko version --port /dev/ttyUSB0
- Enable verbose output to see connection details:
kazunoko version -v
Code example:
# The version command now supports device connection
@app.command()
def version(
port: Optional[str] = typer.Option(None, "--port", "-p", help="Serial port"),
verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose output"),
) -> None:
# Shows library version
console.print(f"kazunoko {__version__}\n")
# Connects to device and sends GET_VERSION command
with connect(port) as device:
response = device.query("GET_VERSION")
# Displays formatted JSON response
Installation¶
Quick Start¶
# Get the release
git checkout v0.1.7
# Setup
uv sync
# Run CLI
kazunoko version
What's Different from the Last Version?¶
✅ Added¶
--portoption toversioncommand for explicit port selection--verboseoption for detailed connection information- Device firmware version retrieval via GET_VERSION command
- Formatted JSON output of device version response
🔧 Changed¶
versioncommand now attempts device connection by defaultversioncommand output now includes device information when available
🐛 Fixed¶
- None in this release
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- Existing
kazunoko versioncalls still work without changes - No breaking changes to API or CLI functionality
- Device connection is attempted but fails gracefully if unavailable
Tests Passed¶
- ✅ Builds without errors
- ✅ Version command shows library version
- ✅ Version command connects to device and displays firmware version
- ✅ Version command gracefully handles missing device
- ✅ Verbose mode shows connection details
Release Details¶
- Date: 2025-12-02
- Version: v0.1.7
- Files Changed: 1 (src/kazunoko/cli.py)
- Commits: d7f0c66 (feat(cli): enhance version command to fetch device firmware version)
Next Steps¶
Future enhancements could include:
- Adding version history tracking in the device
- Extended device information display (hardware revision, serial number, etc.)
- Support for additional diagnostic commands