Skip to content

test(plotting): migrate fitted-model tests (#1328)#1361

Merged
Marius1311 merged 1 commit into
mainfrom
claude/pl-tests-fittedmodel
Jun 5, 2026
Merged

test(plotting): migrate fitted-model tests (#1328)#1361
Marius1311 merged 1 commit into
mainfrom
claude/pl-tests-fittedmodel

Conversation

@Marius1311

Copy link
Copy Markdown
Collaborator

The final class of the #1328 image-test refactor. FittedModel.plot returns a Figure (return_fig=True), so the conf-int / cells knobs become real introspection.

TestFittedModel 9 → 9 methods (2 visual, 3 introspection items, 5 smoke)
Image baselines kept 2, down from ~8
  • Introspection: conf_int=True draws a band iff the FittedModel carries conf-int data, otherwise gracefully ignored (parametrized computed/not_computed — this replaces the old image test that asserted nothing); hide_cells=False adds the cell scatter.
  • Smoke (_assert_drawn): weights, the silently-ignored lineage_probability path, and FittedModel routed through gene_trends / cluster_trends / heatmap (those functions' rendering is already visually covered in their own classes — here we just assert the FittedModel path runs and draws non-blank).
  • Uses the Signal API (_ms_signals); removes the old tol=250 cluster-fates knob and the fitted_heatmap baseline dir.

7 orphaned ground-truth figures deleted. Full plotting suite: 312 passed, 7 skipped.

With this, every plotting class is migrated — closing out #1328.

🤖 Generated with Claude Code

Final class of the image-test refactor. FittedModel.plot returns a Figure
(return_fig=True), so the conf-int / cells knobs become real introspection.

- Keep two visual baselines at STRICT_TOL: the plain precomputed-model plot
  and the confidence-band variant.
- Introspection: `conf_int=True` draws a band iff the FittedModel carries
  conf-int data and is otherwise gracefully ignored (parametrized
  computed/not_computed); `hide_cells=False` adds the cell scatter.
- Smoke (_assert_drawn): weights, the silently-ignored lineage_probability
  path, and FittedModel routed through gene_trends / cluster_trends / heatmap
  (those functions' rendering is already visually covered in their own
  classes; here we just assert the FittedModel path runs and draws).

Delete 7 orphaned ground-truth figures (incl. the fitted_heatmap dir) and the
old tol=250 cluster-fates knob. Full plotting suite: 311 passed, 7 skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Marius1311 Marius1311 merged commit 4ab3823 into main Jun 5, 2026
10 checks passed
@Marius1311 Marius1311 deleted the claude/pl-tests-fittedmodel branch June 5, 2026 14:08
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.

1 participant