-
Notifications
You must be signed in to change notification settings - Fork 11
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: Fix get_ranges
for empty channels in Image
#1136
Conversation
fix PARTSEG-TZ
🧙 Sourcery has finished reviewing your pull request! Tips
|
WalkthroughThe changes to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- package/PartSegImage/image.py (1 hunks)
Additional comments not posted (1)
package/PartSegImage/image.py (1)
153-155
: Good safeguard against identical min and max values.The list comprehension ensures that ranges with identical min and max values are adjusted to have a valid span.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1136 +/- ##
===========================================
+ Coverage 92.95% 92.97% +0.01%
===========================================
Files 207 207
Lines 32626 32632 +6
===========================================
+ Hits 30328 30339 +11
+ Misses 2298 2293 -5 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- package/PartSegImage/image.py (24 hunks)
Additional comments not posted (11)
package/PartSegImage/image.py (11)
37-38
: LGTM! Updated type annotations improve readability.The new type annotations for
components
andmax_val
are correct and enhance code readability.
106-111
: LGTM! Updated type annotations improve readability.The new type annotations for
mask
,axes_order
, andshift
are correct and enhance code readability.
157-162
: LGTM! New static method with correct type annotations.The
_adjust_ranges
method is well-defined and the type annotations are appropriate.
164-168
: LGTM! New method integrates well with existing logic.The
_fit_mask
method is well-defined and integrates properly with_prepare_mask
andfit_mask_to_image
.
171-174
: LGTM! Updated type annotations improve readability.The new type annotations for the return type are correct and enhance code readability.
186-187
: LGTM! Updated type annotations improve readability.The new type annotations for the return type are correct and enhance code readability.
198-199
: LGTM! Updated type annotations improve readability.The new type annotations for
data
and the return type are correct and enhance code readability.
222-223
: LGTM! Updated type annotations improve readability.The new type annotations for the parameters and return type are correct and enhance code readability.
365-366
: LGTM! Updated type annotations improve readability.The new type annotations for the parameters are correct and enhance code readability.
386-387
: LGTM! Updated type annotations improve readability.The new type annotations for the return type are correct and enhance code readability.
783-784
: LGTM! Updated type annotations improve readability.The new type annotations for the return type are correct and enhance code readability.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- package/PartSegImage/image.py (24 hunks)
Files skipped from review as they are similar to previous changes (1)
- package/PartSegImage/image.py
Quality Gate passedIssues Measures |
fix PARTSEG-TZ
Summary by CodeRabbit
New Features
Improvements