Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
0d9ef74
updated deps, zarr v3, removed dask, test perf fixes
parashardhapola Jun 24, 2026
e44e575
docstring fixes
parashardhapola Jun 25, 2026
eb4526b
Enhance .gitignore, remove coverage.xml, and update dependencies
parashardhapola Jun 25, 2026
c13d505
Pre-execute vignette notebooks for RTD and fix doc build blockers
parashardhapola Jun 25, 2026
fd50d9b
Update pyproject.toml and uv.lock for Python version compatibility; e…
parashardhapola Jun 25, 2026
a5e54f4
fixes and format
parashardhapola Jun 25, 2026
9d2bc91
Enhance data handling and performance optimizations
parashardhapola Jun 27, 2026
d3cce4b
Add fixture downloading for tests
parashardhapola Jun 27, 2026
51ecb98
Implement fixture creation for 1K PBMC CITE-seq dataset
parashardhapola Jun 27, 2026
36cfb31
removed cmocean
parashardhapola Jun 27, 2026
ac52137
updated docs, tests, misc bug fixes
parashardhapola Jun 28, 2026
0714989
removed stale nbs
parashardhapola Jun 28, 2026
80bbf18
formatted
parashardhapola Jun 28, 2026
2f98505
docs fix
parashardhapola Jun 28, 2026
0264d33
add doublet detection
parashardhapola Jun 28, 2026
263f377
docs and tests and ci updates. py312+ compat
parashardhapola Jun 29, 2026
b5658ef
docs update
parashardhapola Jun 29, 2026
a431225
zarr ci fix
parashardhapola Jun 29, 2026
c1ad415
more version pinning for ci
parashardhapola Jun 29, 2026
46e9465
simplify zarr layout to a single memory-budget rule, unify shard-para…
parashardhapola Jul 1, 2026
29fcfa5
performance improvements, docs update
parashardhapola Jul 2, 2026
a56ba9f
test fix
parashardhapola Jul 2, 2026
8308dbe
Track markers_all_clusters.csv in git for CI.
parashardhapola Jul 2, 2026
1d80788
logging fix
parashardhapola Jul 2, 2026
9fb216b
handling largen features wih blosc
parashardhapola Jul 2, 2026
ff2b4b8
hsnwlib 3.12 fix
parashardhapola Jul 3, 2026
353c5dc
rerun nbs and meld assay fixes
parashardhapola Jul 4, 2026
7b6b668
fix RTD build with cached scATAC outputs
parashardhapola Jul 10, 2026
aa64680
merge improvements
parashardhapola Jul 10, 2026
1a66de0
formatted
parashardhapola Jul 10, 2026
89e86b8
more merge fixes
parashardhapola Jul 10, 2026
7f8bd56
wnn fixes
parashardhapola Jul 11, 2026
f82033a
improved metrics
parashardhapola Jul 11, 2026
d528e78
aaded more tests
parashardhapola Jul 11, 2026
40bd8cc
mapping fixes and added symphony flavour
parashardhapola Jul 11, 2026
f8a2db0
mapping cleanup
parashardhapola Jul 11, 2026
d130cd0
pseudotime fixes
parashardhapola Jul 11, 2026
a39e98b
added modal based remote profiling
parashardhapola Jul 15, 2026
d965ab4
plotting refactor
parashardhapola Jul 15, 2026
958cea1
improved plotting and added profiling results
parashardhapola Jul 16, 2026
ea1fbe6
Refactor test_profiling_skip.py
parashardhapola Jul 16, 2026
2c3391e
test fixes
parashardhapola Jul 16, 2026
eb6ac08
added feature nmajor matrix to make hvg search and marker search faster
parashardhapola Jul 16, 2026
124defc
docs and plots updated
parashardhapola Jul 17, 2026
8c02dce
remove mnist
parashardhapola Jul 17, 2026
dc680f0
notebooks fixes
parashardhapola Jul 17, 2026
fe5191b
plotiting improvements
parashardhapola Jul 17, 2026
cc27946
removed duplicates
parashardhapola Jul 17, 2026
fce0e81
pseudotime fixes
parashardhapola Jul 17, 2026
aabb37f
notebooks fixes
parashardhapola Jul 18, 2026
67aee17
mypy fixes
parashardhapola Jul 18, 2026
be0870a
notebooks fixes
parashardhapola Jul 18, 2026
4e698ac
refactored plotting
parashardhapola Jul 18, 2026
d5a32a3
mypy fixes
parashardhapola Jul 18, 2026
34386ae
profiling fixes
parashardhapola Jul 18, 2026
a46cb10
full code reorg
parashardhapola Jul 20, 2026
65455dd
ci fixes
parashardhapola Jul 20, 2026
1c257b1
local profiling
parashardhapola Jul 20, 2026
825bf66
metrics updated
parashardhapola Jul 20, 2026
280c60d
added fate mapping
parashardhapola Jul 20, 2026
cb2dfbe
profiling checks
parashardhapola Jul 20, 2026
77e75c7
added aucell waggr
parashardhapola Jul 20, 2026
7895d38
lieden profiling
parashardhapola Jul 20, 2026
e81242b
plotting api shim in ds
parashardhapola Jul 21, 2026
0822300
profiling updates
parashardhapola Jul 21, 2026
3d4adf8
osf removed. switched to hf - cytebase
parashardhapola Jul 21, 2026
f9f16c9
docs update
parashardhapola Jul 21, 2026
07c133a
bumped public api.
parashardhapola Jul 21, 2026
fe678b3
h5ad hardening
parashardhapola Jul 22, 2026
5d7e7ff
adaptive avg gene binnning for c_var
parashardhapola Jul 22, 2026
2bd8c92
profiling update
parashardhapola Jul 22, 2026
e224762
native paris, adaptive cut
parashardhapola Jul 23, 2026
298fb20
nitpick fixed
parashardhapola Jul 23, 2026
77edf10
Split make_graph into plan-driven stages, centralize encoded graph pa…
parashardhapola Jul 23, 2026
401b64c
add provenance-backed analysis artifacts
parashardhapola Jul 25, 2026
4b1ec57
ntebooks updated. test fixes
parashardhapola Jul 25, 2026
ba8f6b8
ci fixes
parashardhapola Jul 25, 2026
8f5adde
notebooks updated
parashardhapola Jul 25, 2026
b8c0550
mypy fix
parashardhapola Jul 25, 2026
b6710f5
hf robustness in tests
parashardhapola Jul 25, 2026
714e5c1
writable datastores backed by read-only mounted count matrices.
parashardhapola Jul 26, 2026
043185f
resource optimization
parashardhapola Jul 27, 2026
9e3f1e2
persist pca, remove make graph
parashardhapola Jul 27, 2026
7ac0f24
optimize cell stats calc
parashardhapola Jul 27, 2026
3ad65a9
docs update
parashardhapola Jul 27, 2026
244067f
version fix for 3.12
parashardhapola Jul 27, 2026
96f3c74
docs fix
parashardhapola Jul 27, 2026
039dc18
profiling updates
parashardhapola Jul 28, 2026
e2505de
Swept and cleaned legacy batch_size
parashardhapola Jul 28, 2026
49b7c2e
Centralize streaming on stored geometry and budgeted concurrency for …
parashardhapola Jul 28, 2026
fb04949
log fix
parashardhapola Jul 28, 2026
bf4d23d
shards info in schema
parashardhapola Jul 29, 2026
b97ac8f
find markers oom fixes
parashardhapola Jul 29, 2026
f6699fb
gram pca
parashardhapola Jul 29, 2026
ce50bbc
kmeans and marker speed up
parashardhapola Jul 29, 2026
14681ad
scanpy profiling
parashardhapola Jul 29, 2026
509e4aa
updated pipeline defaults and docs
parashardhapola Jul 30, 2026
ef0c4f7
added callbacks to pipeline
parashardhapola Jul 30, 2026
3e26645
artifact lineages
parashardhapola Jul 30, 2026
dd29603
ruff fixes
parashardhapola Jul 30, 2026
eb9a98d
test fixes
parashardhapola Jul 30, 2026
4148bbf
logging standardization
parashardhapola Jul 30, 2026
0a86100
fix mann-whitney continuity correction and tie-sum overflow
parashardhapola Jul 30, 2026
6c8b92b
hardened H5AD categorical, nullable, and obsm imports, added regressi…
parashardhapola Jul 30, 2026
4ec01fa
plotting improvements
parashardhapola Jul 30, 2026
fc726db
marker FDR/AUC, per-sample MAD QC
parashardhapola Jul 30, 2026
94a54b2
Removed the leftover internal versioning
parashardhapola Jul 31, 2026
3a5a14f
docs and notebooks updated
parashardhapola Jul 31, 2026
91ead8c
formatted
parashardhapola Jul 31, 2026
c5d9c8c
seurat parity in hto demux
parashardhapola Jul 31, 2026
dd6698b
WNN now implements the Hao weighting math correctly
parashardhapola Jul 31, 2026
207f3f9
seurat golden data for hto
parashardhapola Jul 31, 2026
4812ca8
atac fixes
parashardhapola Jul 31, 2026
78513b4
Cluster separability metric
parashardhapola Jul 31, 2026
28ee225
version pin
parashardhapola Jul 31, 2026
013241c
docs update
parashardhapola Jul 31, 2026
eaea875
docs update
parashardhapola Aug 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ignore:
- "scarf/tests/*"
- "tests/*"
- "setup.py"

github_checks: false
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docs

on:
push:
branches:
- master
- development
paths:
- "docs/**"
- "scarf/**"
- "pyproject.toml"
- "uv.lock"
- ".readthedocs.yml"
- ".github/workflows/docs.yml"
pull_request:
branches:
- master
- development
paths:
- "docs/**"
- "scarf/**"
- "pyproject.toml"
- "uv.lock"
- ".readthedocs.yml"
- ".github/workflows/docs.yml"

jobs:
build:
runs-on: ubuntu-24.04
env:
HNSWLIB_NO_NATIVE: "1"
steps:
- uses: actions/checkout@v4
- name: Install system build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libfftw3-dev libmetis-dev
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.14"
- name: Install documentation dependencies
run: uv sync --extra docs --extra test --extra extra
- name: Documentation cache tests
run: uv run pytest -n 0 tests/test_docs_cache.py
- name: Validate committed notebook cache
run: uv run python docs/execute_all_vignettes.py --validate
- name: Sphinx HTML build (nitpicky, warnings as errors)
run: uv run sphinx-build -b html -n -W docs/source docs/build/html
- name: Reference coverage (every public symbol documented exactly once)
run: uv run python docs/check_reference_coverage.py
20 changes: 9 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ on:
jobs:
build:
name: Build distribution
runs-on: ubuntu-22.04
runs-on: ubuntu-26.04

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.11.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel build
python-version: "3.14"
- name: Build a binary wheel and a source tarball
run: python -m build
run: uv build
- name: Smoke-test wheel
run: uv run --no-project python tests/smoke_wheel.py dist/*.whl
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand All @@ -31,12 +29,12 @@ jobs:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-22.04
runs-on: ubuntu-26.04
environment:
name: pypi
url: https://pypi.org/p/scarf
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
Expand Down
75 changes: 63 additions & 12 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,78 @@ on:

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-26.04
env:
HNSWLIB_NO_NATIVE: "1"
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019]
python-version: [3.11.9]
python-version: ["3.12", "3.13", "3.14"]
resolution: [locked]
include:
- python-version: "3.12"
resolution: lowest-direct
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install system build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libfftw3-dev libmetis-dev
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies (locked)
if: matrix.resolution == 'locked'
run: uv sync --group profiling --extra test --extra extra
- name: Install dependencies (lowest-direct)
if: matrix.resolution == 'lowest-direct'
run: uv pip install --resolution lowest-direct -e ".[test,extra]" --group profiling
- name: Lint and check formatting
if: matrix.resolution == 'locked' && matrix.python-version == '3.12'
run: |
uv run ruff check scarf profiling tests
uv run ruff format --check scarf profiling tests
- name: Type check
if: matrix.resolution == 'locked' && matrix.python-version == '3.12'
run: uv run mypy scarf profiling
- name: Download test fixtures
run: |
if [ "${{ matrix.resolution }}" = "lowest-direct" ]; then
uv run --no-sync python -m tests.download_fixtures --with-h5ad
else
uv run python -m tests.download_fixtures --with-h5ad
fi
- name: Test with pytest (parallel)
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_extra.txt
pip install pytest pytest-cov topacedo anndata==0.11.4 pcst_fast
- name: Test with pytest
if [ "${{ matrix.resolution }}" = "lowest-direct" ]; then
uv run --no-sync pytest \
-n auto \
--dist loadfile \
--cov=scarf \
--cov-report=xml \
--cov-report=term
else
uv run pytest \
-n auto \
--dist loadfile \
--cov=scarf \
--cov-report=xml \
--cov-report=term
fi
- name: Compare publication plotting references
if: matrix.resolution == 'locked' && matrix.python-version == '3.12'
env:
MPLBACKEND: Agg
SCARF_RUN_VISUAL_REGRESSION: "1"
run: uv run pytest -n 0 -m visual tests/test_plotting_showcase.py
- name: Build and smoke-test wheel
if: matrix.resolution == 'locked' && matrix.python-version == '3.14'
run: |
pytest --cov=.
uv build
uv run --no-project python tests/smoke_wheel.py dist/*.whl
- name: Upload coverage to Codecov
if: matrix.resolution == 'locked' && matrix.python-version == '3.14'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
45 changes: 43 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,60 @@
__pycache__
build
dist
*.egg-info
scarf.egg-info
scarf_toolkit.egg-info
.venv
.venv*/
.ruff_cache
dask-worker-space
# zarr ":memory:" URL materialized as a local directory by older tests
:memory:
:memory:/
*.ipynb_checkpoints
*.ipynb
!docs/.jupyter_cache/executed/**/base.ipynb
docs/.jupyter_cache/_parallel/
docs/.jupyter_cache.backup/
docs/.jupyter_cache.candidate-*/
docs/.jupyter_cache.lock
docs/.jupyter_cache.resume/
docs/.jupyter_cache.work-*/
docs/.ipython/
docs/source/vignettes/README.md
docs/source/vignettes/scarf_datasets
docs/source/vignettes/dev
docs/source/vignettes/*.txt
docs/source/vignettes/*.mtx
docs/build/
docs/_build/
docs/jupyter_execute
# Downloaded/converted notebook datasets (path depends on CWD during execute)
docs/source/scarf_datasets/
docs/source/tutorials/scarf_datasets/
docs/**/scarf_datasets/
*.zarr/
**/*.zarr/
.coverage
coverage.xml
htmlcov/
.pytest_cache
interrogate_badge.svg
scarf/tests/datasets/*
test_data
tests/datasets/*
!tests/datasets/markers_all_clusters.csv
tests/.env
tests/.env.*
benchmarks/.env
benchmarks/.env.*
!benchmarks/.env.example
profiling/.env
profiling/.env.*
!profiling/.env.example
profiling/config.toml
# Generated / local-only run configs (machine grids). Keep LEARNINGS.md + examples.
profiling/layouts/
test_data
# Generated plotting showcase outputs. Curated references live in tests/visual.
/artifacts/
/plotting_showcase/
tests/visual/showcase/*.json
19 changes: 11 additions & 8 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.12"
jobs:
pre_build:
- uv run python docs/execute_all_vignettes.py --validate

python:
install:
- requirements: requirements.txt
- requirements: requirements_extra.txt
- requirements: docs/source/requirements.txt
- method: pip
path: .
- method: uv
command: sync
extras:
- docs
- extra

sphinx:
configuration: docs/source/conf.py
builder: html
fail_on_warning: false
fail_on_warning: true
29 changes: 10 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
FROM ubuntu:22.04
FROM ubuntu:26.04

RUN apt update -y && apt autoremove -y && apt clean -y && apt autoclean -y && apt upgrade -y
RUN apt install -y wget build-essential git nano
RUN apt install -y wget build-essential git nano curl libfftw3-dev libmetis-dev libtbb-dev

# The following is done to make sure that tzdata package doesnt prompt for timezone during installation
ARG TZ="Europe/Stockholm"
RUN DEBIAN_FRONTEND="noninteractive" TZ=$TZ apt-get -y install tzdata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

#Installing dependencies for sgtsne
RUN apt install -y libmetis-dev libtbb-dev libfftw3-dev lib32gcc-7-dev libflann-dev libcilkrts5
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Installing lastest Miniconda3
RUN wget -O miniconda_inst "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" && \
bash miniconda_inst -b && \
rm miniconda_inst
WORKDIR /workspace
COPY . /workspace

# Exporting PATH and also saving it in bashrc for next session
# /workspace/bin is so that sgtsne can be found
RUN echo "export PATH=$PATH:/root/miniconda3/bin:/workspace/bin" >> /root/.bashrc
ENV PATH=$PATH:/root/miniconda3/bin:/workspace/bin
RUN uv python install 3.14 && uv sync --extra extra
ENV PATH="/workspace/.venv/bin:$PATH"

# Installing numpy and pybind11 beforehand because sometimes they don't install so well from requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -U numpy pybind11

RUN pip install scarf
RUN echo "export PATH=/workspace/.venv/bin:/workspace/bin:$PATH" >> /root/.bashrc
ENV PATH=/workspace/.venv/bin:/workspace/bin:$PATH
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) [2021], [Dhapola P, Karlsson G]
Copyright (c) 2026, Nygen Analytics AB
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 4 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ exclude .readthedocs.yml
exclude Dockerfile
prune scarf_toolkit.egg-info
prune docs
prune scarf/tests
prune tests
prune profiling
prune scripts
prune .circleci
prune .github
include requirements.txt
include requirements_extra.txt
include VERSION
include pypi_README.rst
include README.md
graft bin
Loading
Loading