Skip to content

feat: base without X_#4076

Open
flying-sheep wants to merge 13 commits into
mainfrom
naked-base
Open

feat: base without X_#4076
flying-sheep wants to merge 13 commits into
mainfrom
naked-base

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Apr 20, 2026

Copy link
Copy Markdown
Member

TODO:

@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1872 1 1871 931
View the top 1 failed test(s) by shortest run time
tests/test_neighbors_key_added.py::test_neighbors_pca_keys_added_without_previous_pca_run
Stack Traces | 0.045s run time
adata = AnnData object with n_obs × n_vars = 700 × 765
    uns: 'pca'
    obsm: 'X_pca'
    varm: 'PCs'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_neighbors_pca_keys_added_without_previous_pca_run#x1B[39;49;00m(adata: sc.AnnData) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        #x1B[94mdel#x1B[39;49;00m adata.uns[#x1B[33m"#x1B[39;49;00m#x1B[33mpca#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94mdel#x1B[39;49;00m adata.obsm[#x1B[33m"#x1B[39;49;00m#x1B[33mX_pca#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m pytest.warns(#x1B[90m#x1B[39;49;00m
            #x1B[96mUserWarning#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            match=#x1B[33mr#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m.*Falling back to preprocessing with `sc.pp.pca` and default params#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        ):#x1B[90m#x1B[39;49;00m
>           sc.pp.neighbors(adata, n_neighbors=n_neighbors, random_state=#x1B[94m0#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_neighbors_key_added.py#x1B[0m:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/_utils/random.py#x1B[0m:204: in wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/neighbors/__init__.py#x1B[0m:220: in neighbors
    #x1B[0mneighbors_.compute_neighbors(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/_utils/random.py#x1B[0m:204: in wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/neighbors/__init__.py#x1B[0m:638: in compute_neighbors
    #x1B[0mx = _choose_representation(#x1B[96mself#x1B[39;49;00m._adata, use_rep=use_rep, n_pcs=n_pcs)#x1B[90m#x1B[39;49;00m
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/tools/_utils.py#x1B[0m:32: in _choose_representation
    #x1B[0mx = _get_pca_or_small_x(adata, n_pcs)#x1B[90m#x1B[39;49;00m
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/tools/_utils.py#x1B[0m:77: in _get_pca_or_small_x
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m adata.obsm[_pca_keys(adata)[#x1B[94m0#x1B[39;49;00m]]#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = AxisArrays with keys: X_pca
key = AnnData object with n_obs × n_vars = 700 × 765
    uns: 'pca'
    obsm: 'X_pca'
    varm: 'PCs'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__getitem__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, key: #x1B[96mstr#x1B[39;49;00m) -> Value:#x1B[90m#x1B[39;49;00m
>       #x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._data[key]#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       TypeError: cannot use 'anndata._core.anndata.AnnData' as a dict key (unhashable type: 'AnnData')#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../anndata/_core/aligned_mapping.py#x1B[0m:216: TypeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@flying-sheep flying-sheep changed the title WIP base without X_ base without X_ May 11, 2026
@flying-sheep flying-sheep added this to the 1.13.0 milestone May 11, 2026
@flying-sheep flying-sheep marked this pull request as ready for review June 23, 2026 13:32
@flying-sheep flying-sheep requested a review from ilan-gold June 23, 2026 13:33
@flying-sheep flying-sheep changed the title base without X_ feat: base without X_ Jun 23, 2026
@flying-sheep flying-sheep removed the request for review from ilan-gold June 23, 2026 13:57
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.

Don't prepend "X_"

1 participant