Skip to content

Conversation

@selmanozleyen
Copy link
Member

@selmanozleyen selmanozleyen commented Jun 18, 2025

Fixes #1007.

Hi @timtreis ,

I changed some things compared to your PR: #967 . The things I changed:

  • No error checks for min_counts, min_genes, max_counts, max_genes since all of them can be handled by the call of sc.filter_cells
  • refactored the logic and removed duplicate code

The code from what I understand should be in the following logic.

  • Let the sc.filter_cells filter the tables and update others based on that. If there is no actual filtering I think it would be best because we would assure same behavior with sc.filter_cells

What needs to be done:

  • write tests

Tests fails because scverse/spatialdata#946 needs to be merged first

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 75.26882% with 23 lines in your changes missing coverage. Please review.

Project coverage is 66.80%. Comparing base (d8b8f91) to head (c9e48f9).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/squidpy/pp/_simple.py 75.26% 11 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1011      +/-   ##
==========================================
+ Coverage   66.63%   66.80%   +0.16%     
==========================================
  Files          40       41       +1     
  Lines        6060     6160     +100     
  Branches     1015     1036      +21     
==========================================
+ Hits         4038     4115      +77     
- Misses       1662     1673      +11     
- Partials      360      372      +12     
Files with missing lines Coverage Δ
src/squidpy/pp/_simple.py 75.26% <75.26%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@selmanozleyen selmanozleyen requested a review from timtreis June 30, 2025 12:55
selmanozleyen and others added 19 commits July 9, 2025 13:48
* perf implement rust co-occurrence statistics

* misc: change rust-py deps

* doc: improve the documentation

* add python re-implementation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Clean the tests and dependencies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Optimize memory access pattern & cache kernel

* jit the outer function and parallelize

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix Mypy checking Typing error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Disable the cast typing in jit

* Try fix typing check error by mypy

* Try: fix typing check error by mypy

* Try: fix typing check error by mypy

* removed copy cleanup the code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused "type ignore"

* chore: trigger CI check

---------

Co-authored-by: Daniele Lucarelli <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tim Treis <[email protected]>
Co-authored-by: selmanozleyen <[email protected]>
* dedupe readme

* everything except tox

* tox-uv

* no need to activate

* actually use pre-release flag

* add check for more flexibility for tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* try to move to uv+hatch

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test.yml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* problems of vibe coding :(

* retry

* try out this setting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix2

* remove scanpy specific options

* remove junit

* remove juntxml uplaod

* dont publish debug data and upload test data

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* upload figures

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* just slack the tests for less flaky tests

* update assertion

* update matrix

* update matrix

* update configs

* ofc you can't set os in hatch

* fix hatch

* set notebook to main again

* simplify test.yml

* clean up

* fix the yaml names

* no need for build in test.yml

* undo test change and remove tox.ini

* fix macos dir error

* fix archive filepath problem

* add tolerance for tests/graph/test_ppatterns.py::test_spatial_autocorr_reproducibility[1-moran]

* fix attempt for coverage

* fix the path

* don't specify .xml

* match the versions so they are the same

* undo the tolerance

* update the python versions in hatch

* point to old commit

* replace bash script in CI to avoid .sh'es

* use matrix.os instead of runner.os

* redo scheduled job

* remove unnecessary lines

* remove scripts instead will use uv defaults

* remove set -u

* use hatch matrix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix the bash code

* fix names and where matrix is

* update matrix os

* incorperate the cache again as in old code

* reduce number of versions and conditionally upload coverage

* update docs

* use v5 instead

* the results aren't from version 6

* check if the floating point dep. is related to matrix list

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update yml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add 3.12

* fix the issue finally

* change the versions

* 3.11, 3.12, 3.13 ubuntu and 3.12 macos. bc macos is slow

* check if this is the issue

* pin versions

* no pytest-cov

* undo the version pin testing

* Python source: 'from __future__ imports must occur at the beginning of the file' at line 10

* add tolerance and explain why

* refer to issue instead of commit

* Allow download fail on darwin

* give it as condition expression

* simplify the matrix and get rid of python 3.10 ci test

* mark internet required

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philipp A. <[email protected]>
* change return types and update tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix mypy problems

* fix typing

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
scverse#1045)

* add numerical stability

* simplify unnecessary parameters and arrays

* Update src/squidpy/gr/_sepal.py

Co-authored-by: Philipp A. <[email protected]>

* add documentation

---------

Co-authored-by: Philipp A. <[email protected]>
* init

* add yaml file

* fix tox ini file

* update tox deps

* since the notebooks work add others to test

* remove the tutorials folder as it has too much dependencies

* convert to python

* use uv and hatch for notebooks only

* need to add notebook dependencies now

* add yaml file

* fix tox ini file

* update tox deps

* since the notebooks work add others to test

* remove the tutorials folder as it has too much dependencies

* convert to python

* update with new rebase

* specify path

* remove .run_notebooks

* no need to specify uv anymore

* remove toxini and make sure pyproject is same as main

* add step to setup squidpy kernel

* fix syntax err

* update the notebook commit

* update the nb commit for rendering

* update the home page to add new section
…cverse#978)

* Change niche flavor to cellcharter_simple and default distance = 3

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added warning message

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tim Treis <[email protected]>
Co-authored-by: Tim Treis <[email protected]>
* mvp for function; without testgs

* added option to retain holes

* refactor + 1 test

* added missing import

* renamed test so that a plot would be generated

* added img from runner; cross-os-data-cache

* improved docstring

* added data download script to correct location

* updated hatch commands

* modified coverage combine

* removed superflous combine step

* first download data, then run tests

* attempt to simplify

* aligned testing

* updated toml

* aligned __init__ files

* no uv cache for data download

* removed download step that'd never get hit

* simplify

* parallel

* speed up tests

---------

Co-authored-by: Phil Schaf <[email protected]>
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.7.3](astral-sh/ruff-pre-commit@v0.7.2...v0.7.3)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.9.1](astral-sh/ruff-pre-commit@v0.8.1...v0.9.1)
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](pre-commit/mirrors-mypy@v1.13.0...v1.14.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed mypy

* copied upper limited for dask from sdata

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.3 → v0.9.6](astral-sh/ruff-pre-commit@v0.9.3...v0.9.6)
- [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.15.0](pre-commit/mirrors-mypy@v1.14.1...v1.15.0)

* mypy fixes

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/rbubley/mirrors-prettier: v3.5.3 → v3.6.2](rbubley/mirrors-prettier@v3.5.3...v3.6.2)
- [github.com/astral-sh/ruff-pre-commit: v0.11.7 → v0.14.1](astral-sh/ruff-pre-commit@v0.11.7...v0.14.1)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.18.2](pre-commit/mirrors-mypy@v1.15.0...v1.18.2)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* mypy fix

* mypy fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tim Treis <[email protected]>
Co-authored-by: Tim Treis <[email protected]>
Co-authored-by: Tim Treis <[email protected]>
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.1 → v0.14.2](astral-sh/ruff-pre-commit@v0.14.1...v0.14.2)
- [github.com/asottile/blacken-docs: 1.19.1 → 1.20.0](adamchainz/blacken-docs@1.19.1...1.20.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Function to subset the entire spatialdata object

7 participants