Skip to content

New uted#112

Draft
BadPrograms wants to merge 14 commits into
v3.xfrom
new_uted
Draft

New uted#112
BadPrograms wants to merge 14 commits into
v3.xfrom
new_uted

Conversation

@BadPrograms

@BadPrograms BadPrograms commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Reimagined calculating tree distancces
We have 4 new files:
Approximations: The way to approximate a tree
deltas: the delta to compare trees, serves as a parameter for the approximator
distances: How to compare trees
Comparator: a new object to compare trees, where all previous parts are inserted as parameters ( can be referred to as El Comparator)

  • Also added a new hashing system for LineageTrees

Approximations, deltas and distances contain template classes up for modification.
Also now it is streamlined to do parallel comparisons and plot a clustermap with ease.
important commands:

from lineagetree import LineageTree
from lineagetree.distance.comparator import TreeComparator
from lineagetree.distance.distance_calculator import UnorderedTreeEditDistance
from lineagetree.distance.approximations import ReducedTreeTimed,DownsampledTree, ResampledTree
from lineagetree.distance.delta import delta_binary,delta_normalized_difference
lT = ...

model = TreeComparator(UnorderedTreeEditDistance, ReducedTreeTimed(delta_normalized_difference))

model.compare((lT,6729, None), (lT, 10696, None))

trees = [(lT, root, None) for root in lT.roots if len(lT.get_subtree_nodes(root))>1000 ]

model.p_compare(*trees,n_proccessors=22)

model.plot_clustermap(*trees,norm= "sum")

model.compare_all_trees_that_start_at_t(lT,40)

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.19%. Comparing base (8263d4d) to head (5bea21e).

Additional details and impacted files
@@            Coverage Diff             @@
##             v3.x     #112      +/-   ##
==========================================
+ Coverage   87.16%   87.19%   +0.02%     
==========================================
  Files          20       20              
  Lines        1932     1936       +4     
==========================================
+ Hits         1684     1688       +4     
  Misses        248      248              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BadPrograms BadPrograms requested a review from leoguignard June 16, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant