Return ID columns in empty feature frames - #53
Conversation
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
=======================================
Coverage ? 95.05%
=======================================
Files ? 17
Lines ? 1658
Branches ? 0
=======================================
Hits ? 1576
Misses ? 82
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
MikeLippincott
left a comment
There was a problem hiding this comment.
LGTM, nice fix to this issue!
What changed
Each feature function returned a bare pandas.DataFrame() with no columns when its loader had no image or no label image. The functions now return an empty frame that has the ID columns. The functions are compute_colocalization, compute_granularity, compute_intensity, compute_neighbors, and compute_texture.
Why
ObjectLoader sets image or label_image to None when its channel or compartment is missing for an image set. The old empty frame had no columns. A downstream merge keyed on an ID column crashed on this frame. The fix gives the merge a key to join on.
Testing
Each function gets a new test. The test passes a loader with no image and no objects, then checks that the frame has the Metadata_Object_ObjectID column and zero rows.