Open cmalinmayor opened 2 weeks ago
Attention: Patch coverage is 88.88889%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 92.86%. Comparing base (
eb83bd2
) to head (4ce3048
).
Files with missing lines | Patch % | Lines |
---|---|---|
motile/costs/disappear.py | 80.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The Appear, Disappear, Node Selection, Edge Selection, and Split costs all have an optional weight that defaults to 1, an optional attribute name that defaults to None, and an optional constant that defaults to 1. Appear and Disappear also have an optional ignore_attribute that defaults to None. EdgeDistance has a position attribute (not optional), along with the same weight and constant arguments as all the other costs.
There is a lot of duplicated code, since now all the costs essentially get the indicators for a different variable type, and then do the same things to add a constant and variable costs to the objective. The appear and disappear have some special ignore functionality, but I still think we could abstract this pretty easily into a class hierarchy to avoid the duplication. Not sure it is worth the added complexity. Thoughts @funkey @tlambert03 ?
Closes #100