v0.13.1 - Code Quality Refactoring (2025-12-29)¶
What Changed?¶
This release introduces the LogLevel type definition alias for improved code consistency and maintainability. All logging-related type annotations across the codebase now use a centralized LogLevel type instead of repeating the same Literal union. This refactoring applies to core modules, CLI commands, and all example scripts, with no functional changes.
What's New¶
Code Quality: LogLevel Type Alias¶
What it does:
Introduces a centralized LogLevel type definition that consolidates logging-level type annotations across the entire codebase. Instead of repeating Literal["debug", "info", "success", "warning", "error"] multiple times, all log_level parameters now use the LogLevel alias for consistency and maintainability.
How to use it: The LogLevel alias is automatically used in all logging-related functions. No changes are needed for existing codeβthis is a behind-the-scenes improvement.
Code example:
from kazunoko.options import LogLevel
from kazunoko.log import setup_logger
# LogLevel is now used consistently across the codebase
def my_command(log_level: LogLevel = "error") -> None:
setup_logger(log_level=log_level)
Installation¶
Quick Start¶
# Get the release
git checkout v0.13.1
# Setup
uv sync
# Run CLI
uv run kazunoko --help
What's Different from the Last Version?¶
β Added¶
LogLeveltype alias in options.py for centralized logging-level type definition
π§ Changed¶
- All type annotations for
log_levelparameters now useLogLevelinstead ofLiteral["debug", "info", "success", "warning", "error"] - Updated files:
cli.py,log.py,get_runs.py,get_thresholds.py,monitor.py,get_events.py,fit_thresholds.py - Removed redundant
Literalimports where no longer needed
π Fixed¶
- No bugs fixed; this is a refactoring release for code quality improvement
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- No breaking changes; all existing APIs remain unchanged
- This is a pure refactoring release with no functional changes
- No impact on existing users or applications
Tests Passed¶
- β Builds without errors
- β Pre-commit hooks passed
- β Type checking passed with updated annotations
Release Details¶
- Date: 2025-12-29
- Version: v0.13.1
- Files Changed: 7
- Commits:
7af196f- refactor(options): introduce LogLevel type definition alias7af196f- refactor: replace Literal type annotations with LogLevel aliase034494- refactor(examples): replace Literal type annotations with LogLevel aliasfa4e89d- bump: version 0.13.0 β 0.13.1
Next Steps¶
Continue monitoring code quality and consider additional type definition aliases for other commonly repeated type annotations across the codebase.