-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix get_network_distribution
#67
Conversation
WalkthroughThe changes primarily focus on enhancing the robustness of the Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Files selected for processing (2)
- sleap_roots/networklength.py (2 hunks)
- tests/test_networklength.py (2 hunks)
Files skipped from review due to trivial changes (1)
- tests/test_networklength.py
Additional comments (Suppressed): 2
sleap_roots/networklength.py (2)
5-5: The import statement for
get_root_lengths
has been removed. Please verify that this function is no longer used in the codebase and that removing it doesn't affect any other parts of the system.201-205: The new check ensures that only roots with more than one point are considered for calculations. This is a good practice as it prevents potential errors or inaccuracies when creating LineString objects from single-point roots.
Codecov Report
@@ Coverage Diff @@
## main #67 +/- ##
==========================================
+ Coverage 78.30% 78.45% +0.15%
==========================================
Files 13 13
Lines 802 803 +1
==========================================
+ Hits 628 630 +2
+ Misses 174 173 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
This PR fixes #66. |
get_network_distribution
for roots with less than one pointget_network_distribution
Summary by CodeRabbit
get_network_distribution
function insleap_roots/networklength.py
to handle roots with only one point, ensuring accurate network length calculations.get_network_distribution
intests/test_networklength.py
, covering scenarios including single-point networks, empty arrays, NaN values, and various fraction values. This enhances the robustness of our testing suite.