Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free appear/disappear in first/last frames #118

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bentaculum
Copy link
Collaborator

@bentaculum bentaculum commented Aug 13, 2024

Adresses #115 .

- update solution cost for API test
- update found weights for SSVM tests
- skip ignore_attribute test
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.05%. Comparing base (0bcbbc6) to head (1828c33).

Files Patch % Lines
motile/costs/appear.py 75.00% 1 Missing ⚠️
motile/costs/disappear.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
+ Coverage   91.70%   92.05%   +0.34%     
==========================================
  Files          30       30              
  Lines         711      717       +6     
==========================================
+ Hits          652      660       +8     
+ Misses         59       57       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

continue
if G.nodes[node][G.frame_attribute] == G.get_frames()[1]:
Copy link
Contributor

Choose a reason for hiding this comment

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

The end frame is actually the last present time frame + 1 (to reflect a slice-like range, see here). So, if a graph has nodes in times 0, 1, 2, 3, 4, G.get_frames() returns (0, 5). Given that, I think this check is wrong?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. Fixed it and added a test.

On the way, I also changed the defaults for TrackGraph.t_begin and TrackGraph.t_end to 0 instead of None, that makes for an easier method signature and less overhead for checking for Nones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants