We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a67dcc7 commit 9ab5d45Copy full SHA for 9ab5d45
5 files changed
src/treemapper/diffctx/config/weights.py
@@ -21,8 +21,8 @@ class EdgeWeightConfig:
21
"doc_structure": EdgeWeightConfig(0.30, 0.83),
22
"anchor_link": EdgeWeightConfig(0.55, 0.64),
23
"citation": EdgeWeightConfig(0.25, 1.0),
24
- "python_call": EdgeWeightConfig(0.55, 0.70),
25
- "python_symbol": EdgeWeightConfig(0.60, 0.70),
+ "python_call": EdgeWeightConfig(0.65, 0.70),
+ "python_symbol": EdgeWeightConfig(0.70, 0.70),
26
"python_type": EdgeWeightConfig(0.50, 0.70),
27
"javascript_call": EdgeWeightConfig(0.70, 0.50),
28
"javascript_symbol": EdgeWeightConfig(0.75, 0.50),
@@ -80,7 +80,7 @@ class LangWeights:
80
81
82
LANG_WEIGHTS: dict[str, LangWeights] = {
83
- "python": LangWeights(0.55, 0.60, 0.50, 0.20, 0.35),
+ "python": LangWeights(0.65, 0.70, 0.50, 0.20, 0.35),
84
"javascript": LangWeights(0.50, 0.55, 0.45, 0.25, 0.35),
85
"jsx": LangWeights(0.50, 0.55, 0.45, 0.25, 0.35),
86
"typescript": LangWeights(0.70, 0.75, 0.65, 0.15, 0.25),
src/treemapper/diffctx/edges/structural/sibling.py
@@ -11,6 +11,7 @@
11
class SiblingEdgeBuilder(EdgeBuilder):
12
weight = EDGE_WEIGHTS["sibling"].forward
13
reverse_weight_factor = EDGE_WEIGHTS["sibling"].reverse_factor
14
+ category = "sibling"
15
16
def build(self, fragments: list[Fragment], repo_root: Path | None = None) -> EdgeDict:
17
by_dir = self._group_files_by_dir(fragments)
src/treemapper/diffctx/edges/structural/test.py
@@ -92,6 +92,7 @@ class TestEdgeBuilder(EdgeBuilder):
92
weight_direct = EDGE_WEIGHTS["test_direct"].forward
93
weight_naming = EDGE_WEIGHTS["test_naming"].forward
94
reverse_weight_factor = EDGE_WEIGHTS["test_reverse"].forward / EDGE_WEIGHTS["test_direct"].forward
95
+ category = "test_edge"
96
97
def discover_related_files(
98
self,
src/treemapper/diffctx/graph.py
@@ -79,7 +79,7 @@ def build_graph(fragments: list[Fragment], repo_root: Path | None = None) -> Gra
79
return graph
-_SUPPRESSION_EXEMPT = frozenset({"semantic", "structural", "config", "document"})
+_SUPPRESSION_EXEMPT = frozenset({"semantic", "structural"})
def _apply_hub_suppression(
src/treemapper/diffctx/ppr.py
@@ -106,7 +106,7 @@ def personalized_pagerank(
106
seeds: set[FragmentId],
107
alpha: float = 0.60,
108
tol: float = 1e-4,
109
- lam: float = 0.5,
+ lam: float = 0.4,
110
seed_weights: dict[FragmentId, float] | None = None,
111
) -> dict[FragmentId, float]:
112
if not graph.nodes:
0 commit comments