Skip to content

Conversation

@schrf
Copy link

@schrf schrf commented Feb 10, 2026

Description

replaced the drop_partial_windows argument with partial_windows, adding two new options:

  1. "adaptive": adjust window sizes such that all windows have almost the exact same size
  2. "split": recursively split a slide into windows such that they do not exceed a maximum number of cells defined by max_nr_cells.

The old arguments are None and drop now.

How has this been tested?

Tested using imc pancreas and visium datasets, running sliding_windows with different argument combinations and visually inspecting the windows by plotting them.

Closes

closes #908

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 78.68852% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.35%. Comparing base (469a7d0) to head (d579f47).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/squidpy/tl/_sliding_window.py 78.68% 7 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1116      +/-   ##
==========================================
+ Coverage   66.21%   66.35%   +0.13%     
==========================================
  Files          44       44              
  Lines        7163     7207      +44     
  Branches     1217     1230      +13     
==========================================
+ Hits         4743     4782      +39     
- Misses       1943     1945       +2     
- Partials      477      480       +3     
Files with missing lines Coverage Δ
src/squidpy/tl/_sliding_window.py 80.15% <78.68%> (+4.29%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Add parameter to sliding_window to end up with windows of (approximately) same number of cells

1 participant