Skip to content

v1.2.1 Official Release

Choose a tag to compare

@b7binw13 b7binw13 released this 17 Mar 17:37
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.

v1.2.1 – Major Expansion & Core System Refinement

Overview

This release represents a major step forward in the evolution of clevertools.
The library has grown from a compact utility collection into a more structured, extensible, and production-ready toolkit.

The focus of this version lies on expanding the public API, improving internal consistency, strengthening core systems such as file I/O and logging, and significantly increasing test coverage and documentation quality.


What's New

Expanded Core Utilities

  • Introduction of structured file helpers for JSON and TOML
  • Extended default file I/O to support both text and binary workflows
  • Improved validation for unsupported modes and invalid data inputs
  • Consistent handling of missing files, directories, and edge cases

Logging System Overhaul

  • Refactored logging into modular building blocks
  • Introduction of:
    • CleverToolsFormatter
    • Console and file handler builders
    • Centralized logger option resolver
  • Clean handler reset logic to prevent duplicate logs
  • Built-in format presets and improved configurability
  • Shared global logger instance (log) exposed via package root

Public API Expansion

  • Significantly broader top-level API exposure
  • Direct access to:
    • Configuration helpers
    • Logging utilities
    • Structured file handlers (JSON/TOML)
    • Formatter and handler tools
    • Extended exception hierarchy
  • Reduced need for deep internal imports

File Handling Improvements

  • Unified raw I/O layer with clearer behavior definitions
  • Explicit support for:
    • Binary reads/writes
    • Safer type handling
  • New structured helpers:
    • read_json, write_json
    • read_toml, write_toml
  • Features include:
    • Automatic file creation
    • Parse validation
    • Configurable fallback behavior

Error Handling Expansion

  • Massive extension of the exception hierarchy
  • New categorized error domains, including:
    • Validation & parsing
    • Filesystem & storage
    • Runtime & setup
    • API & integration
    • Worker, scheduler, metrics, tracing
  • More expressive and scalable error modeling

Internal Model Cleanup

  • static.py renamed to models.py
  • Consolidation of:
    • Defaults and literals
    • Logger presets and configurations
    • Write modes and internal mappings
  • Improved internal structure and maintainability

Masking Enhancements

  • Improved validation of invalid inputs
  • Integration into shared error policy system
  • More predictable fallback behavior
  • Safer handling of:
    • Empty values
    • Invalid visibility configurations
    • Incorrect mask characters

Documentation Overhaul

  • Complete restructuring of documentation
  • New sections introduced:
    • Concepts
    • Tools
    • Quickstart
    • Installation
  • Expanded README and improved accessibility
  • Dedicated pages for new utilities, including:
    • Logging system components
    • JSON/TOML helpers
    • Formatter and handler tools

Packaging & Requirements

  • Version upgrade to v1.2.1
  • Minimum Python version raised to 3.11
  • Updated dependencies and tooling:
    • ruff
    • mypy
    • faker
    • tomli_w
  • Improved packaging metadata and project configuration

Testing & Quality

  • Significant increase in automated test coverage
  • New tests for:
    • Configuration handling
    • Structured file I/O (JSON/TOML)
    • Logging behavior and formatting
    • Edge cases in default I/O
    • Masking logic
  • Addition of debug utilities and structured test runners

Public API (Highlights)

  • mask
  • read, write
  • read_json, write_json
  • read_toml, write_toml
  • configure
  • configure_logger
  • get_logger
  • log
  • build_console_handler
  • build_file_handler
  • reset_handlers
  • CleverToolsFormatter
  • resolve_logger_options

Release Notes

This release transforms clevertools from a simple helper library into a more complete and scalable utility framework.

The system is now more modular, better structured, and easier to integrate into real-world projects.
At the same time, stronger validation, improved error handling, and expanded test coverage ensure more predictable and reliable behavior.

Note: Running the test suite may require additional dependencies such as faker and tomli_w.