Coverage for src\sembra\types.py: 100%
37 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-07-26 12:45 +0700
« prev ^ index » next coverage.py v7.15.2, created at 2026-07-26 12:45 +0700
1from __future__ import annotations
3from dataclasses import dataclass, field
4from typing import List
7@dataclass
8class SembraOptions:
9 string_similarity: bool = True
10 string_threshold: float = 0.6
11 number_similarity: bool = True
12 number_threshold: float = 0.8
13 boolean_partial: bool = False
14 array_matching: bool = True
15 array_match_threshold: float = 0.4
16 object_key_rename: bool = True
17 object_rename_threshold: float = 0.65
18 max_depth: int = 16
19 max_array_size: int = 200
20 use_cache: bool = True
21 early_exit: bool = True
22 key_weight_mode: str = "uniform"
25SembraConfig = SembraOptions
28@dataclass
29class MatchInfo:
30 path_a: str
31 path_b: str
32 similarity: float
33 match_type: str
36@dataclass
37class SimilarityResult:
38 score: float
39 matches: List[MatchInfo] = field(default_factory=list)
40 duration_ns: int = 0
43@dataclass
44class PairwiseResult:
45 matrix: List[List[float]]
46 labels_a: List[str]
47 labels_b: List[str]
48 duration_ns: int = 0