Skip to content

Release v0.13.4: Code Quality & Test Fixes

Choose a tag to compare

@jwesleye jwesleye released this 15 Oct 18:03
· 68 commits to main since this release

v0.13.4 - Code Quality & Test Fixes

This patch release completes the remaining code quality improvements and fixes test compatibility issues.

Code Quality Improvements ✨

Extracted Nested Helper Functions (ME-1)

  • network/http_client.py: Extracted _NoRedirectHandler class to module level for better testability
  • color/conversion.py: Extracted _hue_to_rgb helper function to module level

Enhanced Documentation (ME-2)

  • network/http_client.py: Improved docstring to clearly document HTTP error handling behavior
    • Clarified that 4xx/5xx errors are returned as responses, not raised as exceptions
    • Added comprehensive examples showing both success and error cases

Runtime Security Warnings (LO-3)

  • Added security warnings when optional security features are disabled:
    • xml/parsing.py, xml/transformation.py, xml/validation.py: Warn when defusedxml not installed
    • network/http_client.py: Warn when SSL verification disabled

Test Fixes 🔧

Fixed test suite compatibility with Google ADK standards (no default parameter values):

  • Updated 8 crypto generation tests to provide all required parameters
  • Functions tested: generate_uuid, generate_random_string, generate_random_bytes
  • All 25 crypto generation tests now pass

Files Changed

Code Quality:

  • network/http_client.py (51 lines modified)
  • color/conversion.py (32 lines modified)
  • xml/parsing.py (12 lines added)
  • xml/transformation.py (12 lines added)
  • xml/validation.py (12 lines added)

Tests:

  • tests/crypto/test_generation.py (38 lines modified)

Quality Metrics

  • ✅ 1,406 tests passing
  • ✅ 100% Ruff compliance
  • ✅ MyPy compatible
  • ✅ Google ADK compliant

Previous Release

See v0.13.3 for structured logging and error handling improvements.


Full Changelog: v0.13.3...v0.13.4