Skip to content

Fix dependency update and test issues#190

Merged
d33bs merged 3 commits intocytomining:mainfrom
d33bs:fixes
Feb 13, 2026
Merged

Fix dependency update and test issues#190
d33bs merged 3 commits intocytomining:mainfrom
d33bs:fixes

Conversation

@d33bs
Copy link
Member

@d33bs d33bs commented Feb 13, 2026

Description

This PR addresses some issues which came up after merging #189 via dependency and test updates.

What kind of change(s) are included?

  • Documentation (changes docs or other related content)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • These changes pass all pre-commit checks.
  • I have added comments to my code to help provide understanding
  • I have added a test which covers the code changes found within this PR
  • I have deleted all non-relevant text in this pull request template.

Summary by CodeRabbit

  • New Features

    • Support for reconstructing multi-channel image data from OME-Arrow sources.
  • Improvements

    • In-memory conversion path for OME-Arrow with optimized handling and preserved fallbacks.
    • Safer decoding with stricter validation and clearer handling of incomplete or mismatched data.
  • Tests

    • Added a unit test covering multi-channel plane reconstruction.
  • Chores

    • Updated a dev dependency and pre-commit configuration.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

This PR updates project tooling deps (ruff -> v0.15.1, adds httpcore dev dep) and extends CytoDataFrame OME-Arrow handling: adds optional in-memory numpy-based conversions in to_ome_parquet and enhances _extract_array_from_ome_arrow to reconstruct multi-channel arrays; includes a unit test for multichannel reconstruction.

Changes

Cohort / File(s) Summary
Config & deps
\.pre-commit-config.yaml, pyproject.toml
Bumped ruff pre-commit revision to v0.15.1; added dev dependency httpcore (>=0.18,<0.19) with explanatory comment for jupyterlab/httpx compatibility.
OME-Arrow conversion & extraction
src/cytodataframe/frame.py
to_ome_parquet: add conditional import of ome_arrow.from_numpy and attempt in-memory numpy->OMEArrow conversions for specific array shapes (fallback to TIFF path when unavailable). _extract_array_from_ome_arrow: add support for multi-channel (size_c>1) by aggregating per-channel planes, validating presence of all channels, stacking into (size_y,size_x,size_c); improve validation and return None on incomplete/mismatched data. Minor lint/annotation adjustments only.
Tests
tests/test_frame.py
Added test_extract_array_from_ome_arrow_rebuilds_multichannel_planes to verify reconstruction of a (2,2,3) multichannel array from per-channel planes.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped through arrays, three channels in line,
Stitched planes with care so each pixel could shine,
Numpy helped wiggle, OME-Arrow took flight,
Tests gave a nod in the soft morning light,
A carrot for CI — code cozy and bright! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fix dependency update and test issues' is vague and uses non-descriptive terms like 'issues' that don't convey meaningful information about the specific changes made. Consider a more specific title that highlights the primary change, such as 'Add multi-channel OME-Arrow support with httpcore dependency update' or similar to better reflect the main functionality added.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@d33bs d33bs marked this pull request as ready for review February 13, 2026 15:33
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/cytodataframe/frame.py (1)

1294-1360: ⚠️ Potential issue | 🟡 Minor

Remove unused noqa directive from _extract_array_from_ome_arrow

The C901, PLR0911, and PLR0912 noqa codes are no longer triggered after the refactor and should be removed to keep lint clean.

🧹 Suggested cleanup
-    def _extract_array_from_ome_arrow(  # noqa: C901, PLR0911, PLR0912
+    def _extract_array_from_ome_arrow(

Copy link
Member

@jenna-tomkinson jenna-tomkinson left a comment

Choose a reason for hiding this comment

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

LGTM! Just a small recommendation for more code comments if you think it would be helpful :)

Co-Authored-By: Jenna Tomkinson <107513215+jenna-tomkinson@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/cytodataframe/frame.py`:
- Line 1302: The function definition for _extract_array_from_ome_arrow contains
an unused noqa comment ("# noqa: C901, PLR0911, PLR0912") that Ruff flags;
remove the trailing "# noqa: C901, PLR0911, PLR0912" from the def line to clean
up lint warnings and keep the function signature otherwise unchanged.

@d33bs
Copy link
Member Author

d33bs commented Feb 13, 2026

Thanks @jenna-tomkinson ! Merging this in.

@d33bs d33bs merged commit 580e628 into cytomining:main Feb 13, 2026
9 checks passed
@d33bs d33bs deleted the fixes branch February 13, 2026 16:46
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