B4: collect_ica + Collection.plot handover + clean-break collectors shim (#708) - #738
Merged
Conversation
…tors shim (B4, #708) Closes Epic B: ICA collection + the plotting handover + the utils.collectors shim (clean break) + collectors test rewrite. - collect_ica (cellpy/collect/ica.py): per-cell dQ/dV via utils.ica.dqdv, concatenated tidy with cell/group/sub_group keys, same per-cell cycle isolation as collect_cycles. Emits the specced ICA frame (#566): cycle/direction/voltage/capacity/dqdv. Exposed via collect_ica + ica_collector convenience factory. - Collection.plot(): thin adapter to cellpy.plotting.collected_plot -- maps kind -> family_kind, to_pandas, and reconciles the summary family's cycle column (cycle_num -> cycle, which the summary plotter spells "cycle"). Verified rendering for all three families (summary/cycles/ica). - utils/collectors.py: clean-break shim. The legacy BatchCollector family and *_collector functions are removed in 2.1 -- they raise NotImplementedError pointing at their cellpy.collect replacements (warn_once-registered). The shared figure/label/drawing helpers (load_figure & friends, legend_replacer/ remove_markers, collected_plot/_select_direction) stay re-exported; no module-level plotly access (import-without-batch-extra guard preserved). - tests/test_collectors.py: rewritten against the new surface (drops the Epic-B xfail) -- drives summary/cycles/ica collectors + standard_gravimetric end to end, asserts the native curve cols (#540) and specced ICA frame (#566/#591), the clean-break raises, the preserved re-exports, and that drawing bodies live in plotting not collectors. - test_collect.py: the B3 plot->B4 pointer test becomes a real render test. Closes #708 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. |
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.
Epic B, arc B4 (#708) — closes Epic B
ICA collection, the plotting handover, and the
utils.collectorsclean break.collect_ica
cellpy/collect/ica.py— per-cell dQ/dV viautils.ica.dqdv, concatenated tidy withcell/group/sub_groupkeys, same per-cell cycle isolation ascollect_cycles(fixes the cross-cell narrowing bug). Emits the specced ICA frame (#566):cycle, direction, voltage, capacity, dqdv. Exposed ascollect_ica+ theica_collectorconvenience factory.Plotting handover
Collection.plot()is a thin adapter tocellpy.plotting.collected_plot(#657): mapskind → family_kind,to_pandas, and reconciles the summary family's cycle column (cycle_num → cycle, which the summary plotter spellscycle). All three families (summary / cycles / ica) verified rendering plotly figures.Clean break (per decision)
utils/collectors.pybecomes a thin shim. The legacyBatchCollectorfamily and*_collectorfunctions are removed in 2.1 — they raiseNotImplementedErrorpointing at theircellpy.collectreplacements (registered viawarn_once). The shared figure/label/drawing helpers (load_figure& friends,legend_replacer/remove_markers,collected_plot/_select_direction) stay re-exported, and there's no module-level plotly access (the import-without-batch-extra guard is preserved).Tests
tests/test_collectors.pyfully rewritten against the new surface (drops the Epic-Bxfail): drives summary/cycles/ica collectors +standard_gravimetricend to end, asserts the native curve columns (#540) and the specced ICA frame (#566/#591), the clean-break raises, the preserved re-exports, and that drawing bodies live in plotting not collectors. Local:test_collect+test_collectors= 37 passed;test_plotting_packagegreen.Epic B (collectors redesign) complete: B1 foundation (#705) · B2 concat_summaries port (#706) · B3 convenience class (#707) · B4 ICA + plotting + shim (#708).
Closes #708