V1 prep#149
Open
parashardhapola wants to merge 74 commits into
Open
Conversation
- Added entries to .gitignore for *.egg-info, .venv, .ruff_cache, and coverage files. - Removed the coverage.xml file as it is no longer needed. - Updated pyproject.toml to include 'obstore' in optional dependencies. - Modified various files to implement prefetching of blocks for improved performance in data processing. - Introduced a new method in RNAassay for saving normalized data with optional renormalization. - Enhanced data handling in several modules to support new storage options and improve efficiency.
Cache executed myst-nb outputs under docs/.jupyter_cache so Read the Docs can build with nb_execution_mode=cache. Add local execute scripts, replace gensim LSI with TruncatedSVD, fix integrate_assays and get_markers compat, auto-compute norm stats for mapping, and resolve zarr v2 CORAL writes. Co-authored-by: Cursor <cursoragent@cursor.com>
…nhance mypy configuration and add new dependencies for development. Refactor print statements in documentation scripts for improved readability. Clean up notebook code for consistency in string formatting and function calls.
- Updated .gitignore to include test environment files and prevent unnecessary tracking. - Removed 'joblib' dependency from pyproject.toml and uv.lock to streamline requirements. - Introduced a new method in RNAassay for optimized reading of blocks from zarr arrays, improving data access efficiency. - Refactored marker statistics computation in markers.py to utilize Numba for performance gains. - Adjusted plotting functions to handle groupings more effectively and improve visual output. - Enhanced DataStore class to support memory budget configurations for better resource management during data processing.
- Introduced a new script to download bundled test datasets for CI and local development. - Updated the GitHub Actions workflow to include a step for downloading test fixtures before running tests with pytest. - The new script allows for optional downloading of specific datasets, enhancing test setup flexibility.
- Added a new function to build and compress a directory fixture for the 1K PBMC CITE-seq dataset, including matrix and feature files. - Integrated the new fixture creation into the existing download process to ensure availability for tests. - Updated test prefetching to set a resource budget for improved performance during testing.
…llel IO Replace static per-profile chunk/shard tables and one-off prefetch/thread loops with matrix_layout() and shared parallel.py primitives (map_shards, stream_shards), plus staged-normed mirroring to avoid a remote read-back.
The fixture was gitignored, so CI downloaded the stale copy from master and failed after deterministic marker sorting changed tie order. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid live notebook execution on memory-constrained builders and replace broken image substitutions with valid links. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Member
Author
…ths, and drop schema-version gates while keeping master-format compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scarf 1.0 modernizes storage and cloud I/O, improves feature-wise performance, introduces a new plotting API, adds batch-aware reference mapping, and reorganizes the codebase into focused domain packages.
Existing Zarr v2 stores remain supported. No conversion is required.
See the migration notes, tutorials, and API reference for complete examples.
Upgrade checklist
uv.ChunkedArray.scarf.plotting.countsTfor faster feature-wise analysis.Compatibility and breaking changes
Existing stores
countsT.countsunless explicitly upgraded.Removed or replaced APIs
dask.array.Arrayscarf.matrix.ChunkedArrayscarf.plots,DataStore.plot_*scarf.plottingNaboH5Reader,NaboH5ToZarrto_polars_dataframeto_pandas_dataframescarf.harmonyscarf.embeddings.harmonyscarf.chunkedscarf.matrixscarf.mapping_referencescarf.mappingDocumented top-level imports and
DataStoremethods remain the supported compatibility surface. Old private implementation modules no longer have forwarding shims. See the internal import migration table for replacements.Deprecations retained through Scarf 1.x
ZarrMerge->AssayMergemetric_integration->metric_label_concordanceexclude_missing=True->missing_feature_policy="intersection"ref_mu,ref_sigma, andrun_coralmapping argumentsThese emit
DeprecationWarningand may be removed in Scarf 2.0.Dask migration
Custom normalization functions must now accept and return
ChunkedArray.Storage and performance
New Zarr v3 writes provide:
countsTcountsTaccelerates HVG statistics, marker search, and other feature-major reads.Existing stores can optionally be repacked:
uv run python -m scarf.tools.repack_zarr \ old.zarr \ new.zarr \ --profile fast_localSee Zarr internals for storage profiles, budgets, sharding, and
countsT.New plotting API
scarf.plottingreplaces all legacy plotting entry points.The API includes:
embeddingandembedding_rasterunified_embeddingdotplotandmatrixplotcompositionanddistributionPlot functions return
PlotResult, support shared themes and scales, and rasterize large embeddings automatically.Harmony and reference mapping
Harmony now lives alongside PCA and LSI under
scarf.embeddings.Batch-aware mapping references can be persisted and reused:
Mapping references include provenance, batch metadata, corrected coordinates, and ANN contracts. Label-transfer evidence now supports weighted votes, entropy, margins, and conformal prediction sets.
Analysis improvements
Graphs and embeddings
Existing WNN graphs should be rebuilt.
Features and trajectories
countsTscarf.featuresQuality control and metrics
DataStore.run_doublet_detectionInternal architecture
The implementation is now organized into concrete packages:
DataStoreremains the main workflow API. Its methods now delegate to focused operation mixins, while reusable algorithms live in their owning domain packages.Lazy public facades reduce initial import cost and avoid loading optional dependencies until needed.
See the architecture guide for package responsibilities and dependency rules.