fix: ci's and scanpy 1.13 plot compat - #1253
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1253 +/- ##
==========================================
- Coverage 77.11% 77.08% -0.04%
==========================================
Files 63 63
Lines 9418 9436 +18
Branches 1585 1585
==========================================
+ Hits 7263 7274 +11
- Misses 1554 1561 +7
Partials 601 601
🚀 New features to boost your workflow:
|
| # still visible (and still failing) on its own line, without turning the whole | ||
| # pre-release environment red. The stable environments keep running these tests as part | ||
| # of the suite in the `test` and `coverage` jobs above. | ||
| spatialdata-plot: |
There was a problem hiding this comment.
Well, it's not really out of our hands, I own that repo and all of scverse has merge and release rights 👀 I don't think we need this extra action. The pre-release failures there were the same as for Squidpy and are resolved with the next release. I've so far been holding off on a release because I was hoping that 2 PRs get merged in spatialdata, but that has been dragging on a lot, so I'll probably just go ahead and release that. Then we can just lowerpin sdata-plot whose CI is clean at this point, including pre-release.
| assert out.sizes["c"] == 3 | ||
|
|
||
|
|
||
| class TestStainNormalizationVisual(PlotTester, metaclass=PlotTesterMeta): |
timtreis
left a comment
There was a problem hiding this comment.
We don't need the sdata-plot testing group, we own that repo so we can make sure it's fine upstream. Please reduce to just the scanpy compat layer
For me, that's why it made sense to treat it differently. It's not out of our hand really but the fix is out of squidpy's scope. But I will revert unless you change your mind. |
|
sdata-plot is fairly mature in the niche that it covers, I don't foresee huge dev efforts happening in it unless SpatialData fundamentally changes. So keeping its CI green shouldn't be too much work (unless it's inherited from SpatialData like we had a few months ago, but at that point, Squidpy fails anyway because of the direct sdata dependency) 👌 |
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:
src/squidpy/_compat.pyto use the newscanpy.plotting.legacymodule when available, including fallback logic for older versions. Thedefault_paletteis now also imported via_compat.pyand re-exported for use elsewhere.src/squidpy/im/_container.pyto importdefault_palettefromsquidpy._compatinstead of directly from Scanpy, ensuring consistent palette usage regardless of Scanpy version.Test organization and execution:
tests/experimental/test_stain_normalize.pyto a new file,tests/experimental/plotting/test_stain_normalize.py, and updated imports accordingly. [1] [2] [3] [4]hatch.tomlto skip running the experimental plotting tests in pre-release environments, preventing unrelated failures due to upstream changes inspatialdata-plot.