Repository navigation
Troutpy v0.1.1
Release Notes: v0.1.1
We are excited to announce the release of troutpy v0.1.1! This release marks a major milestone, introducing our foundational tool, preprocessing, and plotting APIs, alongside critical ecosystem compatibility fixes for spatialdata, dask, and pandas.
Additionally, we have streamlined our dependency tree to make the core installation incredibly lightweight, shifting heavier domain-specific packages to optional extras, and removed several deprecated legacy functions.
🚀 Added
- Core API Foundation: Introduced the basic suite of preprocessing (
pp), tool (tl), and plotting (pl) functions. - Robust Test Suite: Added a comprehensive test suite (
tests/) validating public APIs against a syntheticSpatialDatafixture. - Enhanced CI Testing: Added
troutpy[spatial-stats]to the test environment to guarantee optional integrations (sainsc,squidpy) are continually verified.
🔄 Changed & Streamlined
- Lightweight Core: Trimmed core package requirements to the absolute minimum needed to
import troutpy(added missingnumba, dropped unusedjoblib). - Optional Extras: Moved heavy or specialized dependencies into lazy-imported optional extras. You can now customize your installation depending on your workflow:
pip install troutpy[spatial-stats](forsquidpy,sainsc)pip install troutpy[segmentation-free](forpoints2regions)pip install troutpy[chord](formpl-chord-diagram)pip install troutpy[morphology](forscikit-image)pip install troutpy[factor-analysis](fordrvi)- Or install everything at once:
pip install troutpy[all]
- API Docs: Completely updated
docs/api/*.mdto fully reflect the newly streamlined public API footprint.
🛑 Removed (Deprecations)
- Entirely removed legacy functions superseded by
tl.adaptative_source_scoreandtl.adaptative_source_score_optimized:tl.compute_source_cellstl.distance_to_source_celltl.compute_distant_cells_proportiontl.compute_source_scoretl.characterize_cell_like_structures
🔧 Other Fixes & Optimization
Algorithmic & Vectorization Fixes
tl.adaptative_source_score_optimized: Fixed anAttributeErroroccurring whensdata["table"].Xis a dense array by explicitly converting it viacsr_matrix(...)instead of calling.tocsr().tl.calculate_target_cells: Fixed a critical gene alignment crash underpandas 2.3.xwith aCategoricalIndexby swapping out ajoinfor a robustreindex.
Ecosystem & Compatibility Updates
Dask&SpatialDataCompatibility: Fixed an issue inpp.filter_urnaandpp.aggregate_urnawhere boolean-indexing thetranscriptspoints dataframe dropped crucial.attrs. Also removed an obsolete.compute()call that caused failures on newerdaskversions.- Plotting Key Alignment: Aligned the default
cluster_keyinpl.global_distribution_from_source("kmeans_distribution") to perfectly match the column written bytl.cluster_distribution_from_source. - Dependency Pinning & Workarounds:
- Blocked
anndata==0.13.0rc1to prevent an upstreamNonekey layer allocation from crashingSpatialDatavalidation. - Pinned
setuptools<81in documentation builds to prevent missingpkg_resourceserrors caused by upstream dependencies (xarray_schema).
- Blocked
Documentation & Developer Experience
- Documentation Build Fixes: Resolved ~170 Sphinx
nitpickywarnings by mapping external libraries (seaborn,squidpy) tointersphinx_mapping, cleaning up cross-references, and fixing type aliasing. - Tutorial Improvements: Cleared cell parsing failures in
Basic_tutorial.ipynb(caused by stray leading whitespaces), removed an unusednumpyimport, and corrected library aliases fromtroutpy.pltotp.pl.