Closed tlambert03 closed 1 year ago
ready for review @funkey
Merging #28 (261df1c) into main (b61f7a1) will decrease coverage by
0.45%
. The diff coverage is75.43%
.
: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 #28 +/- ##
==========================================
- Coverage 77.92% 77.48% -0.45%
==========================================
Files 28 28
Lines 761 755 -6
==========================================
- Hits 593 585 -8
- Misses 168 170 +2
Impacted Files | Coverage Δ | |
---|---|---|
motile/_types.py | 0.00% <0.00%> (ø) |
|
motile/costs/edge_selection.py | 94.11% <ø> (ø) |
|
motile/plot.py | 0.00% <0.00%> (ø) |
|
motile/variables/edge_selected.py | 80.00% <80.00%> (-8.89%) |
:arrow_down: |
motile/variables/node_selected.py | 80.00% <80.00%> (-8.89%) |
:arrow_down: |
motile/track_graph.py | 86.20% <83.33%> (-1.44%) |
:arrow_down: |
motile/variables/node_split.py | 93.54% <85.71%> (-3.33%) |
:arrow_down: |
motile/variables/node_appear.py | 95.45% <88.88%> (-2.33%) |
:arrow_down: |
motile/variables/variable.py | 65.71% <91.66%> (-0.96%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Thanks a lot! :)
This elaborates on the typing of Node and Edge ids, (and the keys that are valid when indexing into a variable).
Couple specific things to pay attention to:
Variable
class becomesclass Variable(ABC, Mapping[_KT, int]):
... by implementingitems
andkeys
, etc...Variable
was close to implementing the Mapping interface. This makes it official, and parametrizes the key type that a variable manages. All a subclass needs to do now is:and then it will be clear why the index type needs to be when someone indexes later after using
get_variables
instantiate_constraints
fromlist
toIterable[ilpy.LinearConstraint]
... Which means thatinstantiate_constraints()
can nowyield
constraints (rather than having to build its own list which will then get iterated again inSolver._add_variables