Skip to content

v0.4.3 - Example Script Improvements (2025-12-24)

What Changed?

This release enhances the get_events.py example script with structured logging and progress bars for better user experience during measurements. The script now logs all measurement operations to JSON files for debugging and monitoring, and displays visual progress feedback during count-based event collection. All improvements maintain backward compatibility with existing workflows.


What's New

Main Feature: Enhanced Example Script with Logging and Progress Bars

What it does: The get_events.py example script now includes structured logging integration and visual progress bars during count-based event collection. Users receive real-time feedback on measurement progress and all operations are logged to JSON files for post-hoc analysis and debugging.

How to use it: Simply run the get_events.py script as before - all enhancements are transparent:

# Progress bar shown automatically during count-based collection
uv run get_events.py "1:300;2:320;3:310" 100

# Save events with progress feedback
uv run get_events.py "1:300;2:320;3:310" 100 --save

# Verbose mode with detailed logging
uv run get_events.py "1:300;2:320;3:310" 100 -v

# Time-based collection (no progress bar, maintains verbose feedback)
uv run get_events.py "1:300;2:320;3:310" 60 --use-sec

Logs are automatically saved to the platform-specific directory (e.g., ~/Library/Logs/kazunoko/kazunoko.json on macOS) and can be analyzed for measurement troubleshooting.


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

  • Structured logging integration in get_events.py example script
  • Progress bars for count-based event collection in example script
  • PEP 723 script dependencies: loguru, platformdirs
  • JSON logging to platform-specific directories for measurement analysis

🔧 Changed

  • get_events.py now calls setup_logger() for consistent logging behavior
  • Progress bars display on stderr for count-based collection
  • Event streaming loop separated into count-based (with progress) and time-based (verbose mode) paths
  • Example script dependencies documented in PEP 723 spec

🐛 Fixed

  • None (enhancement release)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • All existing functionality preserved
  • Example script maintains same command-line interface
  • Progress bars are automatic and transparent
  • Logging happens in background without affecting workflows
  • No changes to CLI output when piping to files

Tests Passed

  • ✅ Builds without errors
  • ✅ Example script logging initialization verified
  • ✅ Progress bars display correctly in terminal
  • ✅ Pre-commit hooks passed (commitizen check)

Release Details

  • Date: 2025-12-24
  • Version: v0.4.3
  • Files Changed: 2 (examples/get_events.py, pyproject.toml)
  • Commits:
  • 8168ba5 - feat: add structured logging to get_events.py example script
  • a19cf75 - feat: add progress bars to get_events.py example script
  • 4ce2f80 - chore: update PEP 723 script dependencies in get_events.py
  • 6811f0e - bump: version 0.4.2 → 0.4.3

Next Steps

  • Extend logging and progress bars to other example scripts (get_thresholds.py, get_runs.py, etc.)
  • Consider adding elapsed time and ETA to progress bars
  • Gather user feedback on progress bar behavior and logging verbosity
  • Explore dashboard or monitoring tools for analyzing JSON logs