Skip to content

Groundwork for MTX folders: shared CSR builder and feature table - #47

Merged
Claptar merged 1 commit into
mainfrom
refactor/mtx-groundwork
Oct 15, 2026
Merged

Claptar merged 1 commit into
mainfrom
refactor/mtx-groundwork

Conversation

@Claptar

@Claptar Claptar commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Part 1 of 3 for #24. No change in behaviour. This is what the MTX import builds on.

  • core/csr_build.py: the bucket stage of the streaming transpose, taken out of recast so that an MTX import can feed it entries in any order. That covers the count, the nnz-balanced bounds, the scratch group and the bucket sort. On the way it fixes two costs that grew with the matrix rather than the block:
    • pass 1 ran bincount over every output row for each block;
    • pass 2 compared each block against every bucket.
  • conversion/features.py: the feature-table half of the 10x HDF5 converter, shared with the MTX one. That is the targets and --split-feature-types, the var names, writing obs and var, and the var → id/name/type mapping on export. tenx.py now imports it; its messages are unchanged and test_tenx.py passes untouched.
  • Staging: only a Zarr store's temporary copy gets a .zarr suffix. An MTX output folder keeps its name, where before it would have been staged as out.adata-tmp.zarr. is_zarr_path moves to util/path.py so that util stays below storage.

Tests: new tests/test_csr_build.py and one new staging test. test_recast.py, test_tenx.py and the recast perf guards pass unchanged.

Followed by #48 (the streaming MTX codec) and #49 (the 10x-mtx format).

🤖 Generated with Claude Code

No change in behaviour; this is what #24's MTX import builds on.

- core/csr_build.py: the bucket stage of the streaming transpose
  (count, nnz-balanced bounds, scratch group, bucket sort), taken out of
  recast so an MTX import can feed it entries in any order. On the way,
  two costs that grew with the matrix rather than the block: pass 1 ran
  bincount over every output row for each block, and pass 2 compared
  each block against every bucket.
- conversion/features.py: the feature-table half of the 10x HDF5
  converter (targets and --split-feature-types, var names, obs/var
  writing, var -> id/name/type on export), shared with the MTX one.
- staging: only a Zarr store's temporary gets a .zarr suffix; an MTX
  output folder keeps its name. is_zarr_path moves to util.path so
  util stays below storage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T18:02:29.458145Z 13c8c8f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (py3.13)

1 292 tests   1 292 ✅  5m 9s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit 13c8c8f.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (py3.12)

1 292 tests   1 292 ✅  5m 26s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit 13c8c8f.

@Claptar
Claptar merged commit 09416d1 into main Oct 15, 2026
6 checks passed
@Claptar
Claptar deleted the refactor/mtx-groundwork branch October 15, 2026 22:26
@Claptar Claptar mentioned this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants