Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
472d169
Add tiling QC metric for detecting tile-boundary segmentation artifacts
timtreis Apr 10, 2026
8020a1e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
de15686
Increase fixture density, pin spatialdata-plot>=0.3.3
timtreis Apr 10, 2026
c1636a1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
d86fafb
Numba-accelerate collinearity scan, fix progress bar, vectorise helpers
timtreis Apr 10, 2026
801546b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
6bb7f2a
Trim tests to core behavioural + visual, add cardinal alignment visual
timtreis Apr 10, 2026
7613f60
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
4511c7c
Replace joblib with dask.delayed, add affinity-aware cpu_count
timtreis Apr 10, 2026
edbe8df
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
011c9c9
Remove comments that restate what code already says
timtreis Apr 10, 2026
630287e
Default to PowerNorm(gamma=0.5) in tiling QC plot
timtreis Apr 11, 2026
68fdf54
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2026
51db659
Fix ruff C420: use dict.fromkeys for _NAN_SCORES
timtreis Apr 11, 2026
c7a2974
Regenerate visual references with PowerNorm(gamma=0.5)
timtreis Apr 11, 2026
81385e2
Revert PowerNorm — keep linear colour scale for tiling QC plot
timtreis Apr 11, 2026
4ecb3df
Regenerate visual references with linear colour scale
timtreis Apr 11, 2026
1516ba3
Add spatial post-processing to tiling QC (smoothed_cut_score, is_outl…
timtreis Apr 11, 2026
0f8fe54
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2026
2d3ab94
Use jittered-grid cell placement for denser test fixture (625 vs 120 …
timtreis Apr 11, 2026
070a336
Enable colorbar in default tiling QC plot, test with bare defaults
timtreis Apr 11, 2026
be32f07
Dual-gate outlier detection (cut_score + smoothed) with human-friendl…
timtreis Apr 11, 2026
1ce365e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2026
1ccb020
Add visual test for is_outlier boolean flag
timtreis Apr 11, 2026
8642327
Merge branch 'main' into feature/tiling-qc-v2
timtreis Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies = [
# due to https://github.com/scikit-image/scikit-image/issues/6850 breaks rescale ufunc
"scikit-learn>=0.24",
"spatialdata>=0.7.1",
"spatialdata-plot",
"spatialdata-plot>=0.3.3",
"statsmodels>=0.12",
# https://github.com/scverse/squidpy/issues/526
"tifffile!=2022.4.22",
Expand Down
16 changes: 15 additions & 1 deletion src/squidpy/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

import functools
import inspect
import os
import warnings
from collections.abc import Callable, Generator, Hashable, Iterable, Sequence
from contextlib import contextmanager
from enum import Enum
from multiprocessing import Manager, cpu_count
from multiprocessing import Manager
from queue import Queue
from threading import Thread
from typing import TYPE_CHECKING, Any, Literal
Expand Down Expand Up @@ -45,6 +46,19 @@ def wrapper(*args: Any, **kw: Any) -> Any:
NDArrayA = NDArray[Any]


def cpu_count() -> int:
"""Number of CPUs available to this process.

Uses :func:`os.sched_getaffinity` to respect cgroup limits set by
SLURM, Docker, or ``taskset``. Falls back to :func:`os.cpu_count`
on platforms where affinity queries are unavailable (e.g. macOS).
"""
try:
return len(os.sched_getaffinity(0))
except (AttributeError, OSError):
return os.cpu_count() or 1


class SigQueue(Queue["Signal"] if TYPE_CHECKING else Queue): # type: ignore[misc]
"""Signalling queue."""

Expand Down
4 changes: 2 additions & 2 deletions src/squidpy/experimental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

from __future__ import annotations

from . import im, pl
from . import im, pl, tl

__all__ = ["im", "pl"]
__all__ = ["im", "pl", "tl"]
Loading
Loading