chore: add load_all_aligned but only warn initially#251
Open
selmanozleyen wants to merge 24 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #251 +/- ##
==========================================
- Coverage 93.43% 91.70% -1.74%
==========================================
Files 15 15
Lines 1432 1446 +14
==========================================
- Hits 1338 1326 -12
- Misses 94 120 +26
🚀 New features to boost your workflow:
|
ilan-gold
reviewed
Jul 14, 2026
ilan-gold
reviewed
Jul 14, 2026
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
ilan-gold
reviewed
Jul 14, 2026
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
for more information, see https://pre-commit.ci
ilan-gold
reviewed
Jul 15, 2026
Comment on lines
+289
to
293
| warn_ignored_obs_aligned( | ||
| [f"{elem}/{key}" for elem in ("obsm", "obsp", "layers") if elem in g for key in g[elem]], | ||
| stacklevel=2, | ||
| ) | ||
| var = g["var"] |
Collaborator
There was a problem hiding this comment.
Do we need to keep this here if it's called in _add_adata_unchecked?
Member
Author
There was a problem hiding this comment.
But there are other checks in that function. That function only doesn't check n_obs to avoid sampler.validate.
| return self | ||
|
|
||
| def _add_adata_unchecked(self, adata: ad.AnnData) -> Self: | ||
| warn_ignored_obs_aligned(obs_aligned_extras(adata), stacklevel=3) |
Collaborator
There was a problem hiding this comment.
Any reason not to just move obs_aligned_extras's call of adata into warn_ignored_obs_aligned? IT's in the name of warn_ignored_obs_aligned after all
Member
Author
There was a problem hiding this comment.
I saw it as something to reuse once we have the loading functionality. Can also inline it if you want
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
for more information, see https://pre-commit.ci
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
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.
My goal is to first warn users when their adata has more than
.Xinadd_adata. It will warn saying they should use the old load function if they want to keep the old behavior. Otherwise in next release, we can go on with also yielding obsm and layers.Warning: docstring explanation is written and prettified with AI