Open
Conversation
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Member
Author
|
@ilan-gold I didn’t update the docs since your last review, but the rest should be finished now! |
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.
User API design
AdPathinstances by descending into a central accessor constantA:anndata/tests/test_accessors.py
Lines 25 to 42 in 61fc920
AdPathinstance, e.g. to figure out which axes the resulting vector spans:anndata/tests/test_accessors.py
Lines 101 to 107 in 61fc920
AdPathinstance to extract a vector (see 1. for examples)subclassing
… is a direct goal of this, as people should be able to use
AdPathsubclasses. This means thatAdPathAPI is minimal and inspection can be done through.acc(could be even more minimal by just putting it all into a container?):anndata/src/anndata/acc/__init__.py
Lines 56 to 57 in 61fc920
anndata/src/anndata/acc/__init__.py
Lines 63 to 64 in 61fc920
AdAccconstant that produces your ownAdPathsubclass:anndata/src/anndata/acc/__init__.py
Line 415 in 61fc920
VecAcc.__getitem__to get anAdPathor a list of them. In that process,__getitem__callsprocess_idxwhich verifies and simplifies the indexaxes,__repr__, andidx_reprget called too to validate things workAdPathcan be used, which basically just delegates toVecAcc’saxes,__repr__,idx_repr, and__call__So in the end everything except for
__call__is validated, i.e.VecAcc.__getitem__raises exceptions on misuseanndata/src/anndata/acc/__init__.py
Lines 101 to 119 in 61fc920
TODO:
Especially since we already call these accessors! Instance namespaces (
adata.custom) #1869__contains__so it doesn’t try to access the arrayfrom_json/to_json)__dir__)