Skip to content

Conversation

@AnniekStok
Copy link
Collaborator

Should fix the bug observed in motile-tracker: funkelab/motile_tracker#314, when creating a tracking result with motile.
I will double check tomorrow if this is also true for all imported tracks, especially since force_recompute may be false

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.20%. Comparing base (60e5f46) to head (041e535).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/funtracks/data_model/solution_tracks.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   90.19%   90.20%           
=======================================
  Files          52       52           
  Lines        2652     2654    +2     
=======================================
+ Hits         2392     2394    +2     
  Misses        260      260           

☔ View full report in Codecov by Sentry.
📢 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.

@AnniekStok
Copy link
Collaborator Author

Hmm.. now I am thinking it is actually a bit more complicated. Should we have lineage_attr already on solution tracks (the same way as for track ids)? And should we always recompute the track ids and lineage ids when importing tracks, or do we trust the values we get from external tracks? They may have a different way of calculating the lineage ids, so maybe it is safer to just not import these at all and always recompute?

@cmalinmayor
Copy link
Contributor

cmalinmayor commented Jan 20, 2026

Notes from discussion:

  • Add lineage ID to default conftest graph and update all the tests 🙃 I will handle merging into v2 branch and updating Teun's PR
  • Agreed on only the basic, cheap check to verify the lineage ID. What happens if the lineage IDs are actually wrong? Wherever that messes up (in the update actions?), throw a nice error that suggests recomputing the lineage ID.

@AnniekStok
Copy link
Collaborator Author

Lineage ID is added to Tracks the same way as track ID and tests are updated. I checked that we no longer get a key error in motile tracker when plotting Lineage IDs or adding a lineage to a group. In case we import existing lineage IDs, we check that they are single isolated components (geff check) and that no values are missing. I corrupted the lineage IDs by changing one value to a letter, in that case the user sees an error in the import dialog (invalid literal for int()), so they cannot load it in that corrupt state. And when the lineage IDs are not single isolated connected components, the lineage IDs get relabeled.

@AnniekStok AnniekStok marked this pull request as ready for review January 22, 2026 08:23
Copy link
Contributor

@cmalinmayor cmalinmayor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cmalinmayor cmalinmayor merged commit d0745b8 into main Jan 27, 2026
26 of 27 checks passed
@cmalinmayor cmalinmayor deleted the 314-bug-keyerror-none-when-adding-a-lineage-to-a-group branch January 27, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants