Skip to content

fix: ci's and scanpy 1.13 plot compat - #1253

Open
selmanozleyen wants to merge 6 commits into
mainfrom
fix/scanpy-113-plot-compat
Open

fix: ci's and scanpy 1.13 plot compat#1253
selmanozleyen wants to merge 6 commits into
mainfrom
fix/scanpy-113-plot-compat

Conversation

@selmanozleyen

@selmanozleyen selmanozleyen commented Aug 5, 2026

Copy link
Copy Markdown
Member

This pull request improves compatibility with recent Scanpy releases, refactors how plotting palettes are imported, and reorganizes experimental plotting tests. It also adjusts test execution in pre-release environments to avoid failures due to external dependencies.

Scanpy compatibility and palette import refactor:

  • Improved compatibility with Scanpy 1.13+ by updating imports in src/squidpy/_compat.py to use the new scanpy.plotting.legacy module when available, including fallback logic for older versions. The default_palette is now also imported via _compat.py and re-exported for use elsewhere.
  • Updated src/squidpy/im/_container.py to import default_palette from squidpy._compat instead of directly from Scanpy, ensuring consistent palette usage regardless of Scanpy version.

Test organization and execution:

  • Moved the visual regression test for stain normalization from tests/experimental/test_stain_normalize.py to a new file, tests/experimental/plotting/test_stain_normalize.py, and updated imports accordingly. [1] [2] [3] [4]
  • Modified hatch.toml to skip running the experimental plotting tests in pre-release environments, preventing unrelated failures due to upstream changes in spatialdata-plot.

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.21%. Comparing base (ca07e64) to head (f582a64).

Files with missing lines Patch % Lines
src/squidpy/_compat.py 70.83% 7 Missing ⚠️
src/squidpy/pl/_spatial_utils.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
- Coverage   77.24%   77.21%   -0.04%     
==========================================
  Files          63       63              
  Lines        9378     9396      +18     
  Branches     1579     1579              
==========================================
+ Hits         7244     7255      +11     
- Misses       1532     1539       +7     
  Partials      602      602              
Files with missing lines Coverage Δ
src/squidpy/im/_container.py 85.40% <100.00%> (ø)
src/squidpy/pl/_spatial_utils.py 78.66% <66.66%> (-0.05%) ⬇️
src/squidpy/_compat.py 75.00% <70.83%> (-13.24%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@selmanozleyen selmanozleyen changed the title fix: ci's and scanpy 113 plot compat fix: ci's and scanpy 1.13 plot compat Aug 5, 2026
@selmanozleyen
selmanozleyen marked this pull request as ready for review August 5, 2026 10:24
@selmanozleyen
selmanozleyen requested a review from timtreis August 5, 2026 10:36
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