feat(batch): from_cells() -- build a batch from in-memory cells (#787) - #797
Merged
Conversation
There was no public way to build the batch/journal contract that
collect_summaries / collect_cycles consume from already-loaded CellpyCell
objects (a GUI/notebook holding cells in memory). Add Batch.from_cells
(+ cellpy.batch.from_cells and a cellpy.collect.from_cells re-export):
accepts a {label: cell} mapping or a sequence (labels from cell_name,
de-duplicated), builds the polars pages frame (filename/group/sub_group/
label/selected, optional group_label) and a populated CellStore. Optional
groups/sub_groups/selected/group_labels maps. Returns a Batch ready for
collect_* or batch.plot().
Closes #787
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jepegit
enabled auto-merge (squash)
July 29, 2026 11:42
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No public way existed to build the batch/journal contract
collect_summaries/collect_cyclesconsume from already-loadedCellpyCellobjects (cells a GUI/notebook holds in memory). Adds:Batch.from_cells(cells, *, groups=, sub_groups=, group_labels=, selected=, name=, project=)— canonicalcellpy.batch.from_cells(...)and acellpy.collect.from_cellsre-export (discoverability)Accepts
{label: cell}or a sequence (labels fromcell_name, de-duplicated); builds the polarspagesframe (filename/group/sub_group/label/selected) + a populatedCellStore. Returns aBatchready forcollect_*orbatch.plot().Tests (new file): dict/list forms, label dedupe, groups/selected honoured, all three entry points.
Closes #787
🤖 Generated with Claude Code