Skip to content

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

  • LogLevel type alias in options.py for centralized logging-level type definition

πŸ”§ Changed

  • All type annotations for log_level parameters now use LogLevel instead of Literal["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 Literal imports 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 alias
  • 7af196f - refactor: replace Literal type annotations with LogLevel alias
  • e034494 - refactor(examples): replace Literal type annotations with LogLevel alias
  • fa4e89d - 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.