Skip to content

fix: match expression layers before reusing marker statistics - #4531

Merged
flying-sheep merged 3 commits into
scverse:mainfrom
rpinho:fix-filter-ranked-layer-cache
Nov 26, 2026
Merged

flying-sheep merged 3 commits into
scverse:mainfrom
rpinho:fix-filter-ranked-layer-cache

Conversation

@rpinho

@rpinho rpinho commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
  • Closes #
  • Tests included or not required because:
  • Release notes not necessary because:
  • LLM or coding agent used: GPT-6.1 (OpenAI) via Codex wrote the patch and the test; Claude Opus 5.5 via Claude Code reproduced the bug separately and opened this PR
  • If one was used, I, a human, have reviewed, understood and tested every changed line

filter_rank_genes_groups can ignore use and keep markers from the expression matrix used for ranking. Rank genes in X and filter with a layer whose group expression is reversed to reproduce it, both with and without cached fractions. The patch checks the selected layer before reusing fold changes or fractions and recomputes them when the sources differ. The test covers both source directions, same-source controls and both settings of pts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
2666 5 2661 1400
View the top 3 failed test(s) by shortest run time
src/scanpy/tools/_dendrogram.py::scanpy.tools._dendrogram.dendrogram
Stack Traces | 0.064s run time
107 -------
108 Returns a `dict` with dendrogram information if `out=True`, else `None`. Sets the following field:
109 
110 `adata.uns[f'dendrogram_{groupby}' | key_added]` : :class:`dict`
111     Dendrogram information.
112 
113 Examples
114 --------
115 >>> import scanpy as sc
116 >>> adata = sc.datasets.pbmc68k_reduced()
Expected nothing
Got:
    ResourceWarning: unclosed <ssl.SSLSocket [closed] fd=32, family=2, type=1, proto=6>
        obj, end = self.scan_once(s, idx)
    ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
        _warnings.warn(self.warn_message, ResourceWarning)

#x1B[1m#x1B[.../scanpy/tools/_dendrogram.py#x1B[0m:116: DocTestFailure
src/scanpy/datasets/_ebi_expression_atlas.py::scanpy.datasets._ebi_expression_atlas.ebi_expression_atlas
Stack Traces | 0.458s run time
133     labels with a single or :attr:`~anndata.AnnData.n_obs` distinct values.
134 
135 Returns
136 -------
137 Annotated data matrix.
138 
139 Example
140 -------
141 >>> import scanpy as sc
142 >>> sc.datasets.ebi_expression_atlas("E-ENAD-19")  # doctest: +ELLIPSIS
UNEXPECTED EXCEPTION: <HTTPError 403: 'Forbidden'>
Traceback (most recent call last):
  File "<doctest scanpy.datasets._ebi_expression_atlas.ebi_expression_atlas[1]>", line 1, in <module>
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 159, in ebi_expression_atlas
    download_experiment(accession)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File ".../scanpy/datasets/_utils.py", line 22, in wrapper
    return f(*args, **kwargs)
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 48, in download_experiment
    sniff_url(accession)
    ~~~~~~~~~^^^^^^^^^^^
  File ".../scanpy/datasets/_ebi_expression_atlas.py", line 39, in sniff_url
    with urlopen(base_url):  # Check if server up/ dataset exists
         ~~~~~~~^^^^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 187, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 493, in open
    response = meth(req, response)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 602, in http_response
    response = self.parent.error(
        'http', request, response, code, msg, hdrs)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 531, in error
    return self._call_chain(*args)
           ~~~~~~~~~~~~~~~~^^^^^^^
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 464, in _call_chain
    result = func(*args)
  File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py", line 611, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
https://www.ebi.ac..../sc/experiments/E-ENAD-19/
#x1B[1m#x1B[31m.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:142: UnexpectedException
tests/test_datasets.py::test_doc_shape[burczynski06]
Stack Traces | 0.78s run time
+ Exception Group Traceback (most recent call last):
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py", line 361, in from_call
  |     result: TResult | None = func()
  |                              ~~~~^^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py", line 250, in <lambda>
  |     lambda: runtest_hook(item=item, **kwds),
  |             ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_caller.py", line 197, in __call__
  |     return self._hookexec(
  |            ~~~~~~~~~~~~~~^
  |         self.name, self._hookimpls.copy(), call_kwargs, firstresult
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |     )
  |     ^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_manager.py", line 183, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/logging.py", line 878, in pytest_runtest_call
  |     yield
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/capture.py", line 906, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/skipping.py", line 268, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14............/site-packages/_pytest/unraisableexception.py", line 179, in pytest_runtest_call
  |     collect_unraisable(item.config)
  |     ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14............/site-packages/_pytest/unraisableexception.py", line 77, in collect_unraisable
  |     raise ExceptionGroup("multiple unraisable exception warnings", errors)
  | ExceptionGroup: multiple unraisable exception warnings (2 sub-exceptions)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14............/site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x787cdfb9a350>: None
    | 
    +---------------- 2 ----------------
    | Traceback (most recent call last):
    |   File ".../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py", line 538, in __del__
    |     _warnings.warn(self.warn_message, ResourceWarning)
    |     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "................................./home/runner/.local.../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14............/site-packages/_pytest/unraisableexception.py", line 63, in collect_unraisable
    |     warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    |     ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x787cdfb9a350>: None
    | 
    +------------------------------------
tests/test_rank_genes_groups.py::test_mean_in_log_space_does_not_change_ttest[t-test_overestim_var]
Stack Traces | 1.5s run time
self = <tempfile._TemporaryFileCloser object at 0x787ca2e18770>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92m__del__#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
        close_called = #x1B[96mself#x1B[39;49;00m.close_called#x1B[90m#x1B[39;49;00m
        #x1B[96mself#x1B[39;49;00m.cleanup()#x1B[90m#x1B[39;49;00m
        #x1B[94mif#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m close_called:#x1B[90m#x1B[39;49;00m
>           _warnings.warn(#x1B[96mself#x1B[39;49;00m.warn_message, #x1B[96mResourceWarning#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           ResourceWarning: Implicitly cleaning up <HTTPError 403: 'Forbidden'>#x1B[0m

#x1B[1m#x1B[31m../...../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/tempfile.py#x1B[0m:538: ResourceWarning

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x787ca5a6d380>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    #x1B[0m#x1B[37m@classmethod#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mfrom_call#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        #x1B[96mcls#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        func: Callable[[], TResult],#x1B[90m#x1B[39;49;00m
        when: Literal[#x1B[33m"#x1B[39;49;00m#x1B[33mcollect#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33msetup#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcall#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mteardown#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
        reraise: #x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m] | #x1B[96mtuple#x1B[39;49;00m[#x1B[96mtype#x1B[39;49;00m[#x1B[96mBaseException#x1B[39;49;00m], ...] | #x1B[94mNone#x1B[39;49;00m = #x1B[94mNone#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
    ) -> CallInfo[TResult]:#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Call func, wrapping the result in a CallInfo.#x1B[39;49;00m
    #x1B[33m#x1B[39;49;00m
    #x1B[33m    :param func:#x1B[39;49;00m
    #x1B[33m        The function to call. Called without arguments.#x1B[39;49;00m
    #x1B[33m    :type func: Callable[[], _pytest.runner.TResult]#x1B[39;49;00m
    #x1B[33m    :param when:#x1B[39;49;00m
    #x1B[33m        The phase in which the function is called.#x1B[39;49;00m
    #x1B[33m    :param reraise:#x1B[39;49;00m
    #x1B[33m        Exception or exceptions that shall propagate if raised by the#x1B[39;49;00m
    #x1B[33m        function, instead of being wrapped in the CallInfo.#x1B[39;49;00m
    #x1B[33m    """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        excinfo = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        instant = timing.Instant()#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           result: TResult | #x1B[94mNone#x1B[39;49;00m = func()#x1B[90m#x1B[39;49;00m
                                     ^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py#x1B[0m:361: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14....../site-packages/_pytest/runner.py#x1B[0m:250: in <lambda>
    #x1B[0m#x1B[94mlambda#x1B[39;49;00m: runtest_hook(item=item, **kwds),#x1B[90m#x1B[39;49;00m
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_caller.py#x1B[0m:197: in __call__
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._hookexec(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/pluggy/_manager.py#x1B[0m:183: in _hookexec
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._inner_hookexec(hook_name, methods, kwargs, firstresult)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/logging.py#x1B[0m:878: in pytest_runtest_call
    #x1B[0m#x1B[94myield#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/capture.py#x1B[0m:906: in pytest_runtest_call
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14.../site-packages/_pytest/skipping.py#x1B[0m:268: in pytest_runtest_call
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m (#x1B[94myield#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            ^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:179: in pytest_runtest_call
    #x1B[0mcollect_unraisable(item.config)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:75: in collect_unraisable
    #x1B[0m#x1B[94mraise#x1B[39;49;00m errors[#x1B[94m0#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

config = <_pytest.config.Config object at 0x787cdf7482f0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mcollect_unraisable#x1B[39;49;00m(config: Config) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        pop_unraisable = config.stash[unraisable_exceptions].pop#x1B[90m#x1B[39;49;00m
        errors: #x1B[96mlist#x1B[39;49;00m[pytest.PytestUnraisableExceptionWarning | #x1B[96mRuntimeError#x1B[39;49;00m] = []#x1B[90m#x1B[39;49;00m
        meta = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        hook_error = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[94mwhile#x1B[39;49;00m #x1B[94mTrue#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    meta = pop_unraisable()#x1B[90m#x1B[39;49;00m
                #x1B[94mexcept#x1B[39;49;00m #x1B[96mIndexError#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                    #x1B[94mbreak#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m #x1B[96misinstance#x1B[39;49;00m(meta, #x1B[96mBaseException#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                    hook_error = #x1B[96mRuntimeError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mFailed to process unraisable exception#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                    hook_error.__cause__ = meta#x1B[90m#x1B[39;49;00m
                    errors.append(hook_error)#x1B[90m#x1B[39;49;00m
                    #x1B[94mcontinue#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                msg = meta.msg#x1B[90m#x1B[39;49;00m
                #x1B[94mtry#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE                   pytest.PytestUnraisableExceptionWarning: Exception ignored while calling deallocator <function _TemporaryFileCloser.__del__ at 0x787cdfb9a350>: None#x1B[0m

#x1B[1m#x1B[31m../../../..../scanpy/B9PcT7QG/hatch-test.few-extras/lib/python3.14........./site-packages/_pytest/unraisableexception.py#x1B[0m:63: PytestUnraisableExceptionWarning
tests/test_datasets.py::test_ebi_expression_atlas
Stack Traces | 2.05s run time
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x787ca4b980c0>

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.internet#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_ebi_expression_atlas#x1B[39;49;00m(monkeypatch: pytest.MonkeyPatch):#x1B[90m#x1B[39;49;00m
        #x1B[94mfrom#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[04m#x1B[96mscanpy#x1B[39;49;00m#x1B[04m#x1B[96m.#x1B[39;49;00m#x1B[04m#x1B[96mdatasets#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[94mimport#x1B[39;49;00m _ebi_expression_atlas #x1B[94mas#x1B[39;49;00m ea_mod#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# make sure we use chunks when testing.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[90m# This dataset has ~31k entries, so 20k entries/chunk = 2 chunks#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m #x1B[96mhasattr#x1B[39;49;00m(ea_mod, #x1B[33m"#x1B[39;49;00m#x1B[33mCHUNK_SIZE#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        monkeypatch.setattr(ea_mod, #x1B[33m"#x1B[39;49;00m#x1B[33mCHUNK_SIZE#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[94m20_000#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[90m# a tiny dataset (~160kB), since EBI’s downloads can be very slow#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       adata = sc.datasets.ebi_expression_atlas(#x1B[33m"#x1B[39;49;00m#x1B[33mE-ENAD-19#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31mtests/test_datasets.py#x1B[0m:110: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:159: in ebi_expression_atlas
    #x1B[0mdownload_experiment(accession)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_utils.py#x1B[0m:22: in wrapper
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m f(*args, **kwargs)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:48: in download_experiment
    #x1B[0msniff_url(accession)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[.../scanpy/datasets/_ebi_expression_atlas.py#x1B[0m:39: in sniff_url
    #x1B[0m#x1B[94mwith#x1B[39;49;00m urlopen(base_url):  #x1B[90m# Check if server up/ dataset exists#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
         ^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:187: in urlopen
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m opener.open(url, data, timeout)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:493: in open
    #x1B[0mresponse = meth(req, response)#x1B[90m#x1B[39;49;00m
               ^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:602: in http_response
    #x1B[0mresponse = #x1B[96mself#x1B[39;49;00m.parent.error(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:531: in error
    #x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._call_chain(*args)#x1B[90m#x1B[39;49;00m
           ^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:464: in _call_chain
    #x1B[0mresult = func(*args)#x1B[90m#x1B[39;49;00m
             ^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPDefaultErrorHandler object at 0x787ca337d400>
req = <urllib.request.Request object at 0x787ca507b890>
fp = <http.client.HTTPResponse object at 0x787ca3f495d0>, code = 403
msg = 'Forbidden', hdrs = <http.client.HTTPMessage object at 0x787ca30fe120>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mhttp_error_default#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, req, fp, code, msg, hdrs):#x1B[90m#x1B[39;49;00m
>       #x1B[94mraise#x1B[39;49;00m HTTPError(req.full_url, code, msg, hdrs, fp)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       urllib.error.HTTPError: HTTP Error 403: Forbidden#x1B[0m
#x1B[1m#x1B[31mE       https://www.ebi.ac..../sc/experiments/E-ENAD-19/#x1B[0m

#x1B[1m#x1B[31m../..................../_temp/uv-python-dir/cpython-3.14.10-linux-x86_64-gnu/lib/python3.14/urllib/request.py#x1B[0m:611: HTTPError

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

@rpinho

rpinho commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Let me know if you have any thoughts on this one.

@flying-sheep flying-sheep added this to the 1.13.1 milestone Nov 26, 2026
@flying-sheep
flying-sheep merged commit 81c2bf1 into scverse:main Nov 26, 2026
7 of 13 checks passed
@flying-sheep

Copy link
Copy Markdown
Member

thanks! the release note file should be .fix. not .bugfix, otherwise this looks great

flying-sheep pushed a commit that referenced this pull request Nov 26, 2026
…re reusing marker statistics) (#4554)

Co-authored-by: Ricardo Pinho <[email protected]>
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.

2 participants