Skip to content

Latest commit

 

History

History
195 lines (141 loc) · 6.74 KB

File metadata and controls

195 lines (141 loc) · 6.74 KB

Release Notes - venturalitica-sdk v0.5.0 "Marie Kondo"

Release Date: February 12, 2026

Overview

Version 0.5.0 is a major code quality release focused on eliminating duplication, reorganizing modules for maintainability, and significantly improving test quality. This release maintains 100% backward compatibility while cleaning up internal architecture.

Major Changes

🏗️ Code Quality Refactoring (Phase 4)

New Focused Modules

We've extracted ~600 lines of duplicated code into 9 new, focused modules:

  • binding.py (45 lines, 98% coverage): Centralized column resolution deduplication

    • resolve_col_names(): Resolve column names against synonyms
    • discover_column(): Discover columns by name, type, or context
    • Unified COLUMN_SYNONYMS dictionary
  • formatting.py (40 lines, 92% coverage): JSON encoder + summary printing

    • VenturalíticaJSONEncoder: Custom JSON encoder for numpy/pandas types
    • print_summary(): Formatted compliance result printing
  • inference.py (280 lines, 97% coverage): ProjectContext helper class

    • ProjectContext: Lazy-loaded context for BOM, code analysis, README
    • Eliminates boilerplate in infer_* functions
  • metrics/metadata.py (1 line, 100% coverage): METRIC_METADATA extraction

Subpackage Reorganizations

  • probes/ subpackage (9 modules, 418 lines):

    • Split from monolithic probes.py
    • Modules: base.py, carbon.py, hardware.py, integrity.py, handshake.py, trace.py, bom.py, artifact.py, __init__.py
    • 100% backward compatible via re-exports
  • assurance/ subpackage (26 modules):

    • Reorganized with clear hierarchy:
      • assurance/causal/ (2 modules)
      • assurance/fairness/ (2 modules)
      • assurance/graph/ (4 modules)
      • assurance/performance/ (2 modules)
      • assurance/privacy/ (2 modules)
      • assurance/quality/ (12 modules)

🧪 Test Quality Improvements

New Test Suites

  • test_binding.py (32 tests, 98% coverage):

    • 14 tests for resolve_col_names()
    • 9 tests for discover_column()
    • 4 tests for COLUMN_SYNONYMS validation
    • 5 edge case tests (unicode, duplicates, large data, empty)
  • test_formatting.py (20 tests, 92% coverage):

    • 10 tests for VenturalíticaJSONEncoder
    • 10 tests for print_summary()
    • Covers numpy types, pandas objects, datetime, nested structures
  • test_probes_edge_cases.py (60+ tests, comprehensive edge cases):

    • CarbonProbe: zero emissions, very small values, large values, multiple cycles
    • HardwareProbe: empty info, missing fields, zero memory
    • IntegrityProbe: nonexistent files, large files, unicode filenames
    • HandshakeProbe: invalid ports, special hostnames
    • BOMProbe: invalid JSON, empty components, large counts
    • TraceProbe: no start time, unicode names, AST failures
  • test_inference_edge_cases.py (80+ tests, comprehensive edge cases):

    • ProjectContext: lazy loading, README discovery, caching, unicode
    • infer_system_description: empty responses, list content, unicode, long responses
    • infer_technical_documentation: data loading analysis, missing prompts
    • infer_risk_classification: markdown blocks, unicode, missing fields

Warning Suppression

Added pytest.ini_options to pyproject.toml:

[tool.pytest.ini_options]
filterwarnings = [
    "ignore::DeprecationWarning:clearml.utilities.pyhocon",
    "ignore::DeprecationWarning:pyparsing",
    "ignore::RuntimeWarning:numpy",
    "ignore::FutureWarning:pandas",
    "default::UserWarning",  # Only show warnings from our code
]

This suppresses 60+ external library warnings while keeping user code warnings visible.

🐛 Bug Fixes

  • binding.py discover_column() bug (line 141): Fixed duplicating same list instead of properly iterating through synonym groups
  • Test fixtures: Fixed ComplianceResult requires metric_key and severity parameters

Metrics

Test Execution

  • Total tests: 529 passed, 1 skipped, 0 failed
  • New tests added: 52 (binding + formatting + edge cases)
  • Code coverage: 73% overall
    • binding.py: 98%
    • formatting.py: 92%
    • inference.py: 97%
  • Warnings: 24 (down from 90+, all external library related)

Code Quality

  • Lines eliminated: ~600 duplicated lines
  • New focused modules: 9
  • Subpackage reorganizations: 2 major hierarchies
  • Ruff linting: 100% clean
  • Regressions: 0
  • Breaking changes: 5 deprecated import paths removed (see Breaking Changes section)
  • Forward compatibility: 100% for non-deprecated imports

Breaking Changes

Removed Deprecated Shim Modules

The following deprecated import paths have been removed:

Old Import (Removed) New Import (Use This)
from venturalitica import causal from venturalitica.assurance.causal import ...
from venturalitica import fairness from venturalitica.assurance.fairness import ...
from venturalitica import performance from venturalitica.assurance.performance import ...
from venturalitica import privacy from venturalitica.assurance.privacy import ...
from venturalitica import quality from venturalitica.assurance.quality import ...

These shim modules provided backward compatibility shortcuts but are no longer needed. Users should update their imports to use the venturalitica.assurance.* namespace directly.

Migration: If you were using deprecated imports, simply update your code:

# Old (no longer works):
from venturalitica import quality

# New (use this):
from venturalitica.assurance.quality import QualityMetrics

Migration Guide

If You Don't Use Deprecated Imports

No changes required. All public APIs remain the same. These imports work exactly as before:

# These all still work:
from venturalitica.binding import resolve_col_names, discover_column
from venturalitica.formatting import VenturalíticaJSONEncoder, print_summary
from venturalitica.inference import ProjectContext, infer_system_description
from venturalitica.probes import CarbonProbe, HardwareProbe, IntegrityProbe

If You Were Using Deprecated Imports

See the Breaking Changes section above for migration instructions.

Dependencies

  • Python >= 3.11 (unchanged)
  • Build system: Hatchling + UV (unchanged)
  • All dependencies unchanged

Known Issues

None at this time.

Future Work

  • Phase 5: Performance optimization pass
  • Phase 6: Documentation enhancement
  • Phase 7: Additional edge case coverage for complex scenarios

Contributors

This release was completed as part of Phase 4 "Marie Kondo" code quality refactoring.

Download

Available on PyPI:

pip install venturalitica==0.5.0

Or with UV:

uv add venturalitica==0.5.0

For detailed commit history, see the git log for this version.