Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,13 @@ uv run python -m cellpy._deprecation

| Name | Replacement | Introduced | Removal |
| --- | --- | --- | --- |
| `Batch.plot(backend="seaborn")` | `backend="matplotlib"` | 2.0 | 2.1 |
| `cycle_info_plot(interactive=...)` | `backend="plotly"|"matplotlib"` | 2.0 | 2.1 |
| `cycles_plot(interactive=...)` | `backend="plotly"|"matplotlib"` | 2.0 | 2.1 |
| `cycles_plot(xlim=...)` | `cycles_plot(x_range=...)` | 2.0 | 2.1 |
| `cycles_plot(ylim=...)` | `cycles_plot(y_range=...)` | 2.0 | 2.1 |
| `dva_plot(interactive=...)` | `backend="plotly"|"matplotlib"` | 2.0 | 2.1 |
| `ica.Converter` | `cellpy.ica.transform_half_cycle with IcaOptions` | 2.0 | 2.1 |
| `ica.dqdv(cycle=...)` | `cellpy.ica.dqdv(cycles=...)` | 2.0 | 2.1 |
| `ica.dqdv(label_direction=...)` | `the direction column, which the specced frame always carries` | 2.0 | 2.1 |
| `ica.dqdv(split=... / tidy=...)` | `cellpy.ica.dqdv(direction=...) and cellpy.ica.to_wide()` | 2.0 | 2.1 |
| `ica.dqdv_cycle` | `cellpy.ica.dqdv (returns the specced long frame)` | 2.0 | 2.1 |
| `ica.dqdv_cycles` | `cellpy.ica.dqdv (returns the specced long frame)` | 2.0 | 2.1 |
| `ica.dqdv_np` | `cellpy.ica.transform_half_cycle with IcaOptions` | 2.0 | 2.1 |
| `ica_plot(interactive=...)` | `backend="plotly"|"matplotlib"` | 2.0 | 2.1 |
| `legacy header attribute access (headers_normal / _summary / _step_table)` | `c.schema.raw / c.schema.steps / c.schema.summary` | 2.0 | 2.1 |
| `make_new_cell` | `CellpyCell.vacant` | 2.0 | 2.1 |
| `plotutils.summary_plot_legacy` | `cellpy.utils.plotutils.summary_plot (same figures, same options)` | 2.0 | 2.1 |
| `raw_plot(interactive=...)` | `backend="plotly"|"matplotlib"` | 2.0 | 2.1 |
| `summary_plot(interactive=...)` | `backend="plotly"|"matplotlib"` | 2.0 | 2.1 |
| `the 'dq' column of the ica output frame` | `the 'dqdv' column of the same frame` | 2.0 | 2.1 |
60 changes: 2 additions & 58 deletions cellpy/_deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,64 +147,8 @@ def _seed_known_deprecations() -> None:
removal="2.1",
)

# Plotting redesign (#567). The old implementation behind this name was
# unconditionally broken (its first statement unpacked a None); the name
# now delegates to summary_plot and goes away in 2.1.
_register(
"plotutils.summary_plot_legacy",
"cellpy.utils.plotutils.summary_plot (same figures, same options)",
removal="2.1",
)
# Stage 1 (#639): interactive= is a warn_once alias for backend=.
_register(
"summary_plot(interactive=...)",
'backend="plotly"|"matplotlib"',
removal="2.1",
)
# Stage 2 (#646): cycles_plot backend= + range spelling.
_register(
"cycles_plot(interactive=...)",
'backend="plotly"|"matplotlib"',
removal="2.1",
)
_register(
"cycles_plot(xlim=...)",
"cycles_plot(x_range=...)",
removal="2.1",
)
_register(
"cycles_plot(ylim=...)",
"cycles_plot(y_range=...)",
removal="2.1",
)
# Stage 2 (#647): raw_plot / cycle_info_plot backend=.
_register(
"raw_plot(interactive=...)",
'backend="plotly"|"matplotlib"',
removal="2.1",
)
_register(
"cycle_info_plot(interactive=...)",
'backend="plotly"|"matplotlib"',
removal="2.1",
)
# Stage 2 (#648): ica_plot / dva_plot backend=.
_register(
"ica_plot(interactive=...)",
'backend="plotly"|"matplotlib"',
removal="2.1",
)
_register(
"dva_plot(interactive=...)",
'backend="plotly"|"matplotlib"',
removal="2.1",
)
# Stage 3 (#658): Batch.plot backend triage — seaborn alias, bokeh removed.
_register(
'Batch.plot(backend="seaborn")',
'backend="matplotlib"',
removal="2.1",
)
# Plotting shims (interactive=, xlim/ylim, backend="seaborn", summary_plot_legacy)
# were removed in 2.1 (E1, #713) -- no longer registered here.


if __name__ == "__main__":
Expand Down
18 changes: 4 additions & 14 deletions cellpy/plotting/batch_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

Relocated from ``cellpy.utils.batch_tools.batch_plotters`` so ``Batch.plot``
delegates into ``cellpy.plotting``. Public backends: ``plotly`` (primary) and
``matplotlib``. ``seaborn`` is a deprecated alias for ``matplotlib``; ``bokeh``
raises.
``matplotlib``. ``seaborn`` and ``bokeh`` were removed in 2.1 and now raise.
"""

from __future__ import annotations
Expand Down Expand Up @@ -34,22 +33,13 @@


def resolve_batch_plot_backend(backend: Optional[str]) -> str:
"""Normalize Batch.plot backend names (triage for #658)."""
from cellpy._deprecation import warn_once

"""Normalize Batch.plot backend names."""
if backend is None:
backend = getattr(config.batch, "backend", None) or "plotly"
key = str(backend).strip().lower()
if key == "seaborn":
warn_once(
'Batch.plot(backend="seaborn")',
'backend="matplotlib"',
stacklevel=3,
)
key = "matplotlib"
if key == "bokeh":
if key in ("seaborn", "bokeh"):
raise ValueError(
'Batch.plot backend "bokeh" was removed; use backend="plotly" '
f'Batch.plot backend "{key}" was removed; use backend="plotly" '
'or backend="matplotlib".'
)
if key not in SUPPORTED_BATCH_PLOT_BACKENDS:
Expand Down
Loading
Loading