feat(batch): runner + result + store (#700) - #729
Merged
Conversation
Fourth arc of Epic A (batch v3, #696). - result.py: CellResult/BatchResult - "errors are data". Per-cell outcome, timing, source, captured exception; loaded/failed/skipped partitions, raise_if_failed() (strict mode), report() -> tidy polars frame. - store.py: CellStore, a lazy Mapping[str, CellpyCell] with caching, first/ sample/unload and _ipython_key_completions_ for tab completion. Fixes the str.lstrip label-mangling bug (batch_core.py:180: 'xenon_cell'->'enon_cell'). - runner.py: load_cell(spec, policy) -> CellResult mapping a resolved CellSpec onto cellpy.get (source preference AUTO/CELLPY_ONLY/RAW_ONLY), errors captured unless accept_errors=False; run(journal, policy) serial executor with a progress callback (no tqdm/prints in the engine). Process pool is A8. 9 tests: result partitioning/report/raise_if_failed, lazy store + no label mangling, load_cell from a real cellpy file + error capture + re-raise, run over a journal + bad-cell skipping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
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. |
3 tasks
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.
A4 — batch v3:
runner+result+storeFourth arc of Epic A (batch v3, #696), on A3. Per-cell work becomes a pure function; serial vs parallel is a choice of executor, not a 300-line clone. Additive.
result.py— errors are dataCellResult/BatchResult— per-cell outcome, timing, source, captured exception;loaded/failed/skippedpartitions,cells(),raise_if_failed()(strict mode),report()→ tidy polars frame (the dataframe the legacyerrorslist only hinted at).store.py— lazyMapping, no manglingCellStore— lazyMapping[str, CellpyCell]with caching,first/sample/unload, and_ipython_key_completions_forstore["<TAB>"]. Fixes thestr.lstriplabel-mangling bug (batch_core.py:180 turnedxenon_cell→enon_cell) — covered by a regression test.runner.pyload_cell(spec, policy)— maps a resolvedCellSpecontocellpy.get(sourceAUTO/CELLPY_ONLY/RAW_ONLY); errors captured unlessaccept_errors=False. No prints, no journal mutation.run(journal, policy)— serial executor with a progress callback (the engine never imports tqdm/prints). Process pool is A8 (A8: batch v3 — process-pool executor + handover #704).Tests —
tests/test_batch_v3_runner.py(9, all green)Result partitioning/report/
raise_if_failed; lazy store + label-mangling regression;load_cellfrom a real cellpy file + error capture + re-raise;runover a journal + bad-cell skipping. (Full batch-v3 suite: 28 green.)Next: A5 (#701) —
aggregate/qc/outputs. Part of #696.🤖 Generated with Claude Code