Skip to content

Deprecate save parameter of plots #3675

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

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

Conversation

Zethson
Copy link
Member

@Zethson Zethson commented Jun 7, 2025

TODO

  • Discuss what to do with settings.figdir
  • Deprecate there or in savefig_or_show

Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
@Zethson Zethson added this to the 1.12.0 milestone Jun 7, 2025
Copy link

codecov bot commented Jun 7, 2025

❌ 10 Tests Failed:

Tests completed Failed Passed Skipped
2118 10 2108 105
View the top 3 failed test(s) by shortest run time
tests/test_ingest.py::test_ingest_map_embedding_umap
Stack Traces | 0.015s run time
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_ingest_map_embedding_umap#x1B[39;49;00m():#x1B[90m#x1B[39;49;00m
        adata_ref = sc.AnnData(X)#x1B[90m#x1B[39;49;00m
        adata_new = sc.AnnData(T)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        sc.pp.neighbors(#x1B[90m#x1B[39;49;00m
            adata_ref, method=#x1B[33m"#x1B[39;49;00m#x1B[33mumap#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, use_rep=#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, n_neighbors=#x1B[94m4#x1B[39;49;00m, random_state=#x1B[94m0#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
        sc.tl.umap(adata_ref, random_state=#x1B[94m0#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       ing = sc.tl.Ingest(adata_ref)#x1B[90m#x1B[39;49;00m
              ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_ingest.py#x1B[0m:148: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/tools/_ingest.py#x1B[0m:342: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._init_neighbors(adata, neighbors_key)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/tools/_ingest.py#x1B[0m:309: in _init_neighbors
    #x1B[0m#x1B[96mself#x1B[39;49;00m._init_pynndescent(neighbors[#x1B[33m"#x1B[39;49;00m#x1B[33mdistances#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/tools/_ingest.py#x1B[0m:264: in _init_pynndescent
    #x1B[0m#x1B[96mself#x1B[39;49;00m._nnd_idx = NNDescent(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py#x1B[0m:923: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._neighbor_graph = nn_descent(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../numba/core/dispatcher.py#x1B[0m:424: in _compile_for_args
    #x1B[0merror_rewrite(e, #x1B[33m'#x1B[39;49;00m#x1B[33mtyping#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...           init_rp_tree(data, dist, current_graph, leaf_array)\n            ^\n\nDuring: Pass nopython_type_inference')
issue_type = 'typing'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92merror_rewrite#x1B[39;49;00m(e, issue_type):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Rewrite and raise Exception `e` with help supplied based on the#x1B[39;49;00m
    #x1B[33m    specified issue_type.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m config.SHOW_HELP:#x1B[90m#x1B[39;49;00m
            help_msg = errors.error_extras[issue_type]#x1B[90m#x1B[39;49;00m
            e.patch_message(#x1B[33m'#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m.join((#x1B[96mstr#x1B[39;49;00m(e).rstrip(), help_msg)))#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m config.FULL_TRACEBACKS:#x1B[90m#x1B[39;49;00m
            #x1B[94mraise#x1B[39;49;00m e#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m e.with_traceback(#x1B[94mNone#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Invalid use of iternext with parameters (range_state_int64)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: typing of intrinsic-call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (77)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py", line 77:#x1B[0m
#x1B[1m#x1B[31mE           def generate_leaf_updates(leaf_block, dist_thresholds, data, dist):#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE               updates = [[(-1, -1, np.inf)] for i in range(leaf_block.shape[0])]#x1B[0m
#x1B[1m#x1B[31mE               ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function generate_leaf_updates at 0x7fbe396262a0>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (111)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function generate_leaf_updates at 0x7fbe396262a0>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (111)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py", line 111:#x1B[0m
#x1B[1m#x1B[31mE           def init_rp_tree(data, dist, current_graph, leaf_array):#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE                   updates = generate_leaf_updates(leaf_block, dist_thresholds, data, dist)#x1B[0m
#x1B[1m#x1B[31mE                   ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function init_rp_tree at 0x7fbe39626480>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (347)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function init_rp_tree at 0x7fbe39626480>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (347)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py", line 347:#x1B[0m
#x1B[1m#x1B[31mE           def nn_descent(#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE                   if rp_tree_init:#x1B[0m
#x1B[1m#x1B[31mE                       init_rp_tree(data, dist, current_graph, leaf_array)#x1B[0m
#x1B[1m#x1B[31mE                       ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../numba/core/dispatcher.py#x1B[0m:365: TypingError
tests/test_scrublet.py::test_scrublet[True-sparse]
Stack Traces | 0.142s run time
mk_data = <function pbmc200 at 0x7f43e3a849a0>, expected_idx = [13, 138]
expected_scores = [0.149254, 0.149254], use_approx_neighbors = True

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        (#x1B[33m"#x1B[39;49;00m#x1B[33mmk_data#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_idx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mexpected_scores#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        [#x1B[90m#x1B[39;49;00m
            pytest.param(pbmc200, [#x1B[94m13#x1B[39;49;00m, #x1B[94m138#x1B[39;49;00m], [#x1B[94m0.149254#x1B[39;49;00m] * #x1B[94m2#x1B[39;49;00m, #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33msparse#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
            pytest.param(paul500, [#x1B[94m180#x1B[39;49;00m], [#x1B[94m0.219178#x1B[39;49;00m], #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mdense#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
        ],#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33muse_approx_neighbors#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94mTrue#x1B[39;49;00m, #x1B[94mFalse#x1B[39;49;00m, #x1B[94mNone#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_scrublet#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        mk_data: Callable[[], AnnData],#x1B[90m#x1B[39;49;00m
        expected_idx: #x1B[96mlist#x1B[39;49;00m[#x1B[96mint#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        expected_scores: #x1B[96mlist#x1B[39;49;00m[#x1B[96mfloat#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        use_approx_neighbors: #x1B[96mbool#x1B[39;49;00m | #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Check that scrublet runs and detects some doublets."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        adata = mk_data()#x1B[90m#x1B[39;49;00m
>       sc.pp.scrublet(adata, use_approx_neighbors=use_approx_neighbors)#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_scrublet.py#x1B[0m:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../site-packages/legacy_api_wrap/__init__.py#x1B[0m:82: in fn_compatible
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m fn(*args_all, **kw)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../preprocessing/_scrublet/__init__.py#x1B[0m:291: in scrublet
    #x1B[0mscrubbed = _run_scrublet(adata_obs, adata_sim)#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../preprocessing/_scrublet/__init__.py#x1B[0m:234: in _run_scrublet
    #x1B[0mad_obs = _scrublet_call_doublets(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../preprocessing/_scrublet/__init__.py#x1B[0m:450: in _scrublet_call_doublets
    #x1B[0mscrub.calculate_doublet_scores(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../preprocessing/_scrublet/core.py#x1B[0m:302: in calculate_doublet_scores
    #x1B[0m#x1B[96mself#x1B[39;49;00m._nearest_neighbor_classifier(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../preprocessing/_scrublet/core.py#x1B[0m:345: in _nearest_neighbor_classifier
    #x1B[0mknn.compute_neighbors(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/neighbors/__init__.py#x1B[0m:587: in compute_neighbors
    #x1B[0m#x1B[96mself#x1B[39;49;00m._distances = transformer.fit_transform(X)#x1B[90m#x1B[39;49;00m
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../sklearn/utils/_set_output.py#x1B[0m:316: in wrapped
    #x1B[0mdata_to_wrap = f(#x1B[96mself#x1B[39;49;00m, X, *args, **kwargs)#x1B[90m#x1B[39;49;00m
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py#x1B[0m:2256: in fit_transform
    #x1B[0m#x1B[96mself#x1B[39;49;00m.fit(X, compress_index=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py#x1B[0m:2174: in fit
    #x1B[0m#x1B[96mself#x1B[39;49;00m.index_ = NNDescent(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py#x1B[0m:923: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._neighbor_graph = nn_descent(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../numba/core/dispatcher.py#x1B[0m:424: in _compile_for_args
    #x1B[0merror_rewrite(e, #x1B[33m'#x1B[39;49;00m#x1B[33mtyping#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...           init_rp_tree(data, dist, current_graph, leaf_array)\n            ^\n\nDuring: Pass nopython_type_inference')
issue_type = 'typing'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92merror_rewrite#x1B[39;49;00m(e, issue_type):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Rewrite and raise Exception `e` with help supplied based on the#x1B[39;49;00m
    #x1B[33m    specified issue_type.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m config.SHOW_HELP:#x1B[90m#x1B[39;49;00m
            help_msg = errors.error_extras[issue_type]#x1B[90m#x1B[39;49;00m
            e.patch_message(#x1B[33m'#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m.join((#x1B[96mstr#x1B[39;49;00m(e).rstrip(), help_msg)))#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m config.FULL_TRACEBACKS:#x1B[90m#x1B[39;49;00m
            #x1B[94mraise#x1B[39;49;00m e#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m e.with_traceback(#x1B[94mNone#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Invalid use of iternext with parameters (range_state_int64)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: typing of intrinsic-call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py (77)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py", line 77:#x1B[0m
#x1B[1m#x1B[31mE           def generate_leaf_updates(leaf_block, dist_thresholds, data, dist):#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE               updates = [[(-1, -1, np.inf)] for i in range(leaf_block.shape[0])]#x1B[0m
#x1B[1m#x1B[31mE               ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function generate_leaf_updates at 0x7f43e40fd260>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py (111)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function generate_leaf_updates at 0x7f43e40fd260>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py (111)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py", line 111:#x1B[0m
#x1B[1m#x1B[31mE           def init_rp_tree(data, dist, current_graph, leaf_array):#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE                   updates = generate_leaf_updates(leaf_block, dist_thresholds, data, dist)#x1B[0m
#x1B[1m#x1B[31mE                   ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function init_rp_tree at 0x7f43e40fc900>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py (347)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function init_rp_tree at 0x7f43e40fc900>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py (347)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13................................./site-packages/pynndescent/pynndescent_.py", line 347:#x1B[0m
#x1B[1m#x1B[31mE           def nn_descent(#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE                   if rp_tree_init:#x1B[0m
#x1B[1m#x1B[31mE                       init_rp_tree(data, dist, current_graph, leaf_array)#x1B[0m
#x1B[1m#x1B[31mE                       ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../numba/core/dispatcher.py#x1B[0m:365: TypingError
tests/test_ingest.py::test_neighbors
Stack Traces | 0.609s run time
adatas = (AnnData object with n_obs × n_vars = 500 × 765
    obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_scor...pca', 'X_umap'
    varm: 'PCs'
    obsp: 'distances', 'connectivities', AnnData object with n_obs × n_vars = 200 × 765)

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_neighbors#x1B[39;49;00m(adatas):#x1B[90m#x1B[39;49;00m
        adata_ref = adatas[#x1B[94m0#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
        adata_new = adatas[#x1B[94m1#x1B[39;49;00m].copy()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       ing = sc.tl.Ingest(adata_ref)#x1B[90m#x1B[39;49;00m
              ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_ingest.py#x1B[0m:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/tools/_ingest.py#x1B[0m:342: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._init_neighbors(adata, neighbors_key)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/tools/_ingest.py#x1B[0m:309: in _init_neighbors
    #x1B[0m#x1B[96mself#x1B[39;49;00m._init_pynndescent(neighbors[#x1B[33m"#x1B[39;49;00m#x1B[33mdistances#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m])#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/tools/_ingest.py#x1B[0m:264: in _init_pynndescent
    #x1B[0m#x1B[96mself#x1B[39;49;00m._nnd_idx = NNDescent(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py#x1B[0m:923: in __init__
    #x1B[0m#x1B[96mself#x1B[39;49;00m._neighbor_graph = nn_descent(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../numba/core/dispatcher.py#x1B[0m:424: in _compile_for_args
    #x1B[0merror_rewrite(e, #x1B[33m'#x1B[39;49;00m#x1B[33mtyping#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...           init_rp_tree(data, dist, current_graph, leaf_array)\n            ^\n\nDuring: Pass nopython_type_inference')
issue_type = 'typing'

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92merror_rewrite#x1B[39;49;00m(e, issue_type):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
    #x1B[33m    Rewrite and raise Exception `e` with help supplied based on the#x1B[39;49;00m
    #x1B[33m    specified issue_type.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m config.SHOW_HELP:#x1B[90m#x1B[39;49;00m
            help_msg = errors.error_extras[issue_type]#x1B[90m#x1B[39;49;00m
            e.patch_message(#x1B[33m'#x1B[39;49;00m#x1B[33m\n#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m.join((#x1B[96mstr#x1B[39;49;00m(e).rstrip(), help_msg)))#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m config.FULL_TRACEBACKS:#x1B[90m#x1B[39;49;00m
            #x1B[94mraise#x1B[39;49;00m e#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m e.with_traceback(#x1B[94mNone#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Failed in nopython mode pipeline (step: nopython frontend)#x1B[0m
#x1B[1m#x1B[31mE           Invalid use of iternext with parameters (range_state_int64)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: typing of intrinsic-call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (77)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py", line 77:#x1B[0m
#x1B[1m#x1B[31mE           def generate_leaf_updates(leaf_block, dist_thresholds, data, dist):#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE               updates = [[(-1, -1, np.inf)] for i in range(leaf_block.shape[0])]#x1B[0m
#x1B[1m#x1B[31mE               ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function generate_leaf_updates at 0x7fbe396262a0>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (111)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function generate_leaf_updates at 0x7fbe396262a0>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (111)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py", line 111:#x1B[0m
#x1B[1m#x1B[31mE           def init_rp_tree(data, dist, current_graph, leaf_array):#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE                   updates = generate_leaf_updates(leaf_block, dist_thresholds, data, dist)#x1B[0m
#x1B[1m#x1B[31mE                   ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function init_rp_tree at 0x7fbe39626480>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (347)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: resolving callee type: type(CPUDispatcher(<function init_rp_tree at 0x7fbe39626480>))#x1B[0m
#x1B[1m#x1B[31mE           During: typing of call at /home/runner/..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py (347)#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           File "../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.........................../site-packages/pynndescent/pynndescent_.py", line 347:#x1B[0m
#x1B[1m#x1B[31mE           def nn_descent(#x1B[0m
#x1B[1m#x1B[31mE               <source elided>#x1B[0m
#x1B[1m#x1B[31mE                   if rp_tree_init:#x1B[0m
#x1B[1m#x1B[31mE                       init_rp_tree(data, dist, current_graph, leaf_array)#x1B[0m
#x1B[1m#x1B[31mE                       ^#x1B[0m
#x1B[1m#x1B[31mE           #x1B[0m
#x1B[1m#x1B[31mE           During: Pass nopython_type_inference#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.stable/lib/python3.13.../numba/core/dispatcher.py#x1B[0m:365: TypingError

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

Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
Zethson added 2 commits June 7, 2025 09:51
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
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.

Saving plots results in a prefixed filename, regardless of sc.settings.figdir
1 participant