Skip to content

Return ID columns in empty feature frames - #53

Open
d33bs wants to merge 1 commit into
WayScience:mainfrom
d33bs:no-id
Open

Return ID columns in empty feature frames#53
d33bs wants to merge 1 commit into
WayScience:mainfrom
d33bs:no-id

Conversation

@d33bs

@d33bs d33bs commented Aug 24, 2026

Copy link
Copy Markdown
Member

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.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 30 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 93d46fc9-4c8e-420a-b089-5724e842eef4

📥 Commits

Reviewing files that changed from the base of the PR and between 62af460 and 00d7d28.

📒 Files selected for processing (10)
  • src/zedprofiler/featurization/colocalization.py
  • src/zedprofiler/featurization/granularity.py
  • src/zedprofiler/featurization/intensity.py
  • src/zedprofiler/featurization/neighbors.py
  • src/zedprofiler/featurization/texture.py
  • tests/featurization/test_colocalization.py
  • tests/featurization/test_granularity.py
  • tests/featurization/test_intensity.py
  • tests/featurization/test_neighbors.py
  • tests/featurization/test_texture.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@62af460). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@d33bs

d33bs commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@d33bs
d33bs marked this pull request as ready for review August 24, 2026 22:52
@d33bs
d33bs requested a review from MikeLippincott August 24, 2026 22:55

@MikeLippincott MikeLippincott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, nice fix to this issue!

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