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

Rename and tighten type definitions #112

Merged
merged 8 commits into from
Aug 13, 2024
Merged

Rename and tighten type definitions #112

merged 8 commits into from
Aug 13, 2024

Conversation

funkey
Copy link
Member

@funkey funkey commented Jul 29, 2024

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.

Copy link

codecov bot commented Jul 29, 2024

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 ⚠️
motile/track_graph.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            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     

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

@cmalinmayor
Copy link
Contributor

@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
Copy link
Member

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

@cmalinmayor cmalinmayor merged commit 8ad0ffa into main Aug 13, 2024
11 of 13 checks passed
@cmalinmayor cmalinmayor deleted the hyperedges branch August 13, 2024 18:49
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.

3 participants