Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce reader memory consumption #228

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

marcovarrone
Copy link

It adds a new output_path parameter in a reader's function that allows to save every element of the spatialdata object as soon as it's created.
This frees up part of the memory during the function's execution instead of maintaining the whole spatialdata object in memory and then saving it with sdata.write.

I've done it only for Xenium but if I receive the ok I can implement it for the rest of the readers.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 37.25490% with 32 lines in your changes missing coverage. Please review.

Project coverage is 45.02%. Comparing base (cff4896) to head (43f0d04).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/spatialdata_io/readers/xenium.py 37.25% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
- Coverage   45.50%   45.02%   -0.48%     
==========================================
  Files          22       22              
  Lines        2149     2183      +34     
==========================================
+ Hits          978      983       +5     
- Misses       1171     1200      +29     
Files with missing lines Coverage Δ
src/spatialdata_io/readers/xenium.py 66.18% <37.25%> (-5.61%) ⬇️

@marcovarrone marcovarrone marked this pull request as draft October 28, 2024 08:55
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.

2 participants