Skip to content

B4: collect_ica + Collection.plot handover + clean-break collectors shim (#708) - #738

Merged
jepegit merged 1 commit into
masterfrom
708-collect-plotting-ica
Jul 26, 2026
Merged

B4: collect_ica + Collection.plot handover + clean-break collectors shim (#708)#738
jepegit merged 1 commit into
masterfrom
708-collect-plotting-ica

Conversation

@jepegit

@jepegit jepegit commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Epic B, arc B4 (#708) — closes Epic B

ICA collection, the plotting handover, and the utils.collectors clean break.

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 (fixes the cross-cell narrowing bug). Emits the specced ICA frame (#566): cycle, direction, voltage, capacity, dqdv. Exposed as collect_ica + the ica_collector convenience factory.

Plotting handover

Collection.plot() is a thin adapter to cellpy.plotting.collected_plot (#657): maps kind → family_kind, to_pandas, and reconciles the summary family's cycle column (cycle_num → cycle, which the summary plotter spells cycle). All three families (summary / cycles / ica) verified rendering plotly figures.

Clean break (per decision)

utils/collectors.py becomes a thin shim. The legacy BatchCollector family and *_collector functions are removed in 2.1 — they raise NotImplementedError pointing at their cellpy.collect replacements (registered via warn_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.py fully rewritten against the new surface (drops the Epic-B xfail): drives summary/cycles/ica collectors + standard_gravimetric end 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_package green.

Epic B (collectors redesign) complete: B1 foundation (#705) · B2 concat_summaries port (#706) · B3 convenience class (#707) · B4 ICA + plotting + shim (#708).

Closes #708

…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>
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

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.

@jepegit
jepegit enabled auto-merge (squash) July 26, 2026 22:59
@jepegit
jepegit merged commit 0e3860e into master Jul 26, 2026
5 of 6 checks passed
@jepegit
jepegit deleted the 708-collect-plotting-ica branch July 26, 2026 23:01
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.

B4: collectors — plotting handover

1 participant