Skip to content

Latest commit

 

History

History
127 lines (100 loc) · 3.78 KB

File metadata and controls

127 lines (100 loc) · 3.78 KB

Test Fixes Progress

Date: December 16, 2025
Status: 🟡 IN PROGRESS - 7/35 fixed (20%)

✅ Fixed (7 tests) - test_mortgage_example.py

  • test_load_mortgage_config ✅
  • test_parse_mortgage_data ✅
  • test_build_rdf_graph ✅
  • test_processing_report ✅
  • test_serialization_formats ✅
  • test_decimal_transformation ✅
  • test_date_transformation ✅

Key Changes Made:

  • Updated to use v3 config structure (mappings instead of sheets)
  • Added helper function get_v3_mapping_and_source()
  • Fixed IRI templates to match v3 format
  • Removed delimiter parameters that were causing None errors

🔧 Remaining Issues (28 failures)

Category 1: Generator Workflow (4 tests) - HIGH PRIORITY

File: test_generator_workflow.py Issue: Tests expect output with 'as' field, need 'predicate' Fix Required:

# Old assertion
assert "firstName" in columns["fname"]["as"]

# New assertion  
assert "firstName" in columns["fname"]["predicate"]

Category 2: Test Mapping Models (3 tests)

File: test_mapping.py Issue: Uses old SheetMapping/LinkedObject Pydantic models Fix Options:

  1. Import from config_v3 instead of mapping
  2. Skip these tests (testing deprecated models)
  3. Create equivalent tests for v3 models

Category 3: Validation Tests (3 tests)

File: test_validation_guardrails.py Issue: Tests access .columns attribute (v3 uses .properties) Fix Required:

# Old
sheet.columns

# New
mapping.properties

Category 4: RML Generator (1 test)

File: test_rml_generator.py Issue: Expects 'sheets' key in generated output Fix Required: Update to expect v3 format output

Category 5: Matcher Tests (17 tests) - DIFFERENT ISSUE

Files: Various matcher test files Issue: Tests expect 17 matchers but only 5 exist Root Cause: v0.3.0 performance optimization reduced matchers from 17→5 This is NOT a v3 migration issue!

Options: a) Update all tests to expect 5 matchers (recommended) b) Re-enable all 17 matchers (defeats optimization) c) Document as expected behavior change

Affected Tests:

  • test_17_matchers_complete.py (3 tests)
  • test_datatype_matcher.py (2 tests)
  • test_enhanced_semantic_matcher.py (3 tests)
  • test_hierarchy_matcher.py (1 test)
  • test_matcher_pipeline.py (2 tests)
  • test_phase2_integration.py (2 tests)
  • test_validation/test_matching_accuracy.py (4 tests)

📋 Systematic Fix Plan

Phase 1: Generator Workflow Tests (Est: 1 hour)

  1. Update test_generator_workflow.py assertions
  2. Change 'as' → 'predicate' in all assertions
  3. Update 'columns' → 'properties' references
  4. Run and verify

Phase 2: Model Tests (Est: 30 min)

  1. Skip or update test_mapping.py
  2. Either import v3 models or mark as deprecated

Phase 3: Validation Tests (Est: 30 min)

  1. Update test_validation_guardrails.py
  2. Change .columns → .properties
  3. Update sheet references to mapping references

Phase 4: RML Generator (Est: 15 min)

  1. Update test_rml_generator.py
  2. Expect v3 format output

Phase 5: Matcher Count Tests (Est: 2 hours)

  1. Update expected matcher count from 17 → 5
  2. Update evidence/confidence thresholds
  3. Document behavior change

Total Estimated Time: ~4-5 hours

🎯 Current Priorities

  1. Fix Generator Workflow - These are critical for AI mapping functionality
  2. Update Matcher Tests - Most numerous failures
  3. Fix Model/Validation Tests - Quick wins
  4. Document Changes - Update test documentation

📝 Notes

  • Mortgage tests now fully pass ✅
  • v3 core engine is working correctly
  • Most failures are test assertion updates, not actual bugs
  • Matcher count issue predates v3 migration

Last Updated: December 16, 2025
Next Action: Fix generator workflow tests (4 tests) Progress: 20% complete (7/35 tests passing)