Skip to content

Remove spatial interlacement prototype from palette generation#586

Merged
timtreis merged 2 commits intomainfrom
remove-colorspace-prototype
Apr 7, 2026
Merged

Remove spatial interlacement prototype from palette generation#586
timtreis merged 2 commits intomainfrom
remove-colorspace-prototype

Conversation

@timtreis
Copy link
Copy Markdown
Member

@timtreis timtreis commented Apr 7, 2026

Summary

  • Removes the spatial-aware color assignment prototype (KDTree-based interlacement matrix, _spatial_interlacement
  • Keeps all general-purpose contrast maximization: Oklab perceptual distance, CVD simulation, permutation optimizer with uniform weights
  • make_palette_from_data retains category extraction from SpatialData elements and all non-spatial methods (default, contrast, colorblind, protanopia, deuteranopia, tritanopia)

The spatial-aware color assignment (interlacement matrix + KDTree
neighbor weighting) was a prototype that added complexity without
being ready for production use. Remove it and keep the general
contrast maximization methods (Oklab perceptual distance, CVD
simulation, permutation optimizer with uniform weights).

make_palette_from_data retains category extraction from SpatialData
elements and all non-spatial methods (default, contrast, colorblind,
protanopia, deuteranopia, tritanopia).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.22%. Comparing base (0a3f682) to head (c3fe599).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
- Coverage   76.44%   76.22%   -0.23%     
==========================================
  Files          11       11              
  Lines        3261     3188      -73     
  Branches      759      750       -9     
==========================================
- Hits         2493     2430      -63     
+ Misses        466      461       -5     
+ Partials      302      297       -5     
Files with missing lines Coverage Δ
src/spatialdata_plot/pl/_palette.py 84.57% <100.00%> (-0.51%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- _get_labels_from_table now returns only labels (pd.Series), removing
  the instance-key join and index-alignment logic that was only needed
  for coordinate extraction
- Simplify _build_clustered_points_sdata fixture: the specific spatial
  geometry was only meaningful for the removed spatial interlacement
  tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@timtreis timtreis marked this pull request as ready for review April 7, 2026 18:46
@timtreis timtreis merged commit f0f9e96 into main Apr 7, 2026
8 checks passed
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.

2 participants