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

Keep .X when setting filename to None #1724

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

Conversation

eroell
Copy link
Contributor

@eroell eroell commented Oct 21, 2024

Does _to_memory_mode only get called by the filename setter anyways? And are there reasons to not just call to_memory from this setter?

If not worth to go in depths here anymore, the removed _ would fix a bug for now I guess

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.51%. Comparing base (f4fd6a4) to head (6d603d1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1724      +/-   ##
==========================================
- Coverage   87.01%   84.51%   -2.50%     
==========================================
  Files          40       40              
  Lines        6059     6059              
==========================================
- Hits         5272     5121     -151     
- Misses        787      938     +151     
Files with missing lines Coverage Δ
src/anndata/_core/file_backing.py 91.07% <100.00%> (ø)

... and 8 files with indirect coverage changes

@ilan-gold
Copy link
Contributor

@eroell Please add a test to check the behavior is correct of this so we can verify the fix actually works

@eroell
Copy link
Contributor Author

eroell commented Nov 13, 2024

Added a minimal check to verify this behaviour

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.

.X is lost when setting anndata.filename to None
2 participants