funkelab / motile

Multi-Object Tracker using Integer Linear Equations
https://funkelab.github.io/motile/
MIT License
24 stars 5 forks source link

Rename and tighten type definitions #112

Closed funkey closed 2 months ago

funkey commented 2 months ago

We had conflicting definitions of what a hyperedge is in different parts of code and documentation.

This PR defines a hyperedge as a 2-tuple of tuples (in-nodes, out-nodes). Documentation updated to reflect this.

There is now a TrackGraph.is_hyperedge that can be used to test whether an edge is a hyperedge (should be preferred over manual isinstance calls). This function will also yell if a tuple is neither a normal edge nor a hyperedge as defined above.

Renamed type definitions while at it as well to be shorter and more descriptive.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 91.70%. Comparing base (825a461) to head (fb955bc).

Files Patch % Lines
motile/_types.py 0.00% 5 Missing :warning:
motile/track_graph.py 93.75% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #112 +/- ## ========================================== - Coverage 92.15% 91.70% -0.46% ========================================== Files 30 30 Lines 701 711 +10 ========================================== + Hits 646 652 +6 - Misses 55 59 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cmalinmayor commented 2 months ago

@tlambert03 In your opinion, should we consider this codecov complaint seriously? (I fixed the docs issue and otherwise we are ready to merge, I think)

tlambert03 commented 2 months ago

No, based on the diff, it's just telling you that this code isn't covered (and probably wasn't already before this PR). It's a slight "problem" per se, but not one specific to this PR