funkelab / motile

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

Add type hints and mypy check #5

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

This adds type hints for most of the library, and adds a mypy check.

For the moment, I have left on allow_untyped_defs=true ... and typing can be added incrementally

You can feel free to relax the type checking later if you want to (do it by either removing mypy from the pre-commit config yaml, or by setting mypy.strict = false in pyproject.toml

codecov-commenter commented 1 year ago

Codecov Report

Merging #5 (81dece1) into main (dccb78d) will decrease coverage by 2.12%. The diff coverage is 85.44%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
- Coverage   87.76%   85.64%   -2.12%     
==========================================
  Files          27       27              
  Lines         523      613      +90     
==========================================
+ Hits          459      525      +66     
- Misses         64       88      +24     
Impacted Files Coverage Δ
motile/utils.py 0.00% <0.00%> (ø)
motile/costs/edge_distance.py 50.00% <62.50%> (+3.33%) :arrow_up:
motile/constraints/constraint.py 77.77% <71.42%> (-2.23%) :arrow_down:
motile/constraints/select_edge_nodes.py 96.00% <80.00%> (-4.00%) :arrow_down:
motile/costs/costs.py 77.77% <80.00%> (-2.23%) :arrow_down:
motile/ssvm.py 80.95% <80.00%> (-1.41%) :arrow_down:
motile/solver.py 91.00% <81.48%> (-3.57%) :arrow_down:
motile/constraints/max_children.py 95.23% <83.33%> (-4.77%) :arrow_down:
motile/constraints/max_parents.py 95.23% <83.33%> (-4.77%) :arrow_down:
motile/costs/appear.py 92.85% <83.33%> (-7.15%) :arrow_down:
... and 16 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.