v0.16.0 - Workspace Module (2026-03-04)¶
What Changed?¶
This release adds a new kazunoko.workspace module providing standardized utilities for workspace directory resolution and measurement filename generation.
Example scripts (get_events.py, get_runs.py, get_thresholds.py) have been refactored to use these shared utilities instead of duplicated local helpers.
What's New¶
Main Feature: kazunoko.workspace Module¶
What it does:
Centralizes workspace directory resolution and output filename generation into a reusable module.
The workspace root is controlled by the KAZUNOKO_WORKSPACE environment variable, falling back to the current directory if not set.
How to use it:
from kazunoko import get_workspace, generate_filename
# Resolve workspace root
ws = get_workspace()
# → Path("/path/to/workspace") if KAZUNOKO_WORKSPACE is set
# → Path(".") otherwise
# Generate a standardized output filename
path = generate_filename(mac_address="AA:BB:CC:DD:EE:FF", file_id=0)
# → Path("./20260304/events_aabbccddeeff_2026-03-04_09h48m41s_0000000.jsonl")
Configure workspace with environment variable:
export KAZUNOKO_WORKSPACE=/home/user/data
uv run get_events.py "1:300;2:320;3:310" 1000 --save
# → saves to /home/user/data/20260304/events_<mac>_<timestamp>_0000000.jsonl
Installation¶
Quick Start¶
# Get the release
git checkout v0.16.0
# Setup
uv sync
# Run CLI
uv run kazunoko --help
What's Different from the Last Version?¶
✅ Added¶
kazunoko.workspacemodule withget_workspace()andgenerate_filename()functionsget_workspaceandgenerate_filenameexported fromkazunokotop-level package
🔧 Changed¶
get_events.py,get_runs.py,get_thresholds.py: replaced local_generate_filename()helpers withkazunoko.generate_filenamegenerate_filenameparameter renamed fromrun_idtofile_idfor better generality
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- No changes to existing CLI commands or library API
- Example scripts produce identical output filenames
KAZUNOKO_WORKSPACEenvironment variable was already supported in example scripts; behavior is unchanged
Tests Passed¶
- ✅ Builds without errors
- ✅
uvx ruff check src/passes with no issues - ✅
uvx mypy src/passes with no errors - ✅ Example scripts generate correct filenames with and without
KAZUNOKO_WORKSPACE
Release Details¶
- Date: 2026-03-04
- Version: v0.16.0
- Files Changed: 5
- Commits: eecaf65, 824c880, 06cf7bb, 2e5c9e5, 6e95fc5, e3eb040
Next Steps¶
- Add tests for
kazunoko.workspacefunctions - Consider supporting per-channel workspace configuration