Skip to content

Commit 50bb2b0

Browse files
authored
ci: download small EBI dataset, use forksafe threadpool for docs (#4514)
1 parent f7211ff commit 50bb2b0

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎src/scanpy/datasets/_ebi_expression_atlas.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def ebi_expression_atlas(
139139
Example
140140
-------
141141
>>> import scanpy as sc
142-
>>> sc.datasets.ebi_expression_atlas("E-MTAB-4888") # doctest: +ELLIPSIS
143-
AnnData object with n_obs × n_vars = 2261 × 23899
144-
obs: 'Sample Characteristic[organism]', 'Sample Characteristic Ontology Term[organism]', ..., 'Factor Value[cell type]', 'Factor Value Ontology Term[cell type]'
142+
>>> sc.datasets.ebi_expression_atlas("E-ENAD-19") # doctest: +ELLIPSIS
143+
AnnData object with n_obs × n_vars = 26 × 3644
144+
obs: 'Sample Characteristic[organism]', 'Sample Characteristic Ontology Term[organism]', ..., 'Factor Value[single cell identifier]', 'Factor Value Ontology Term[single cell identifier]'
145145
layers: None (.X)
146146
147147
"""

‎tests/test_datasets.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ def test_ebi_expression_atlas(monkeypatch: pytest.MonkeyPatch):
8484
from scanpy.datasets import _ebi_expression_atlas as ea_mod
8585

8686
# make sure we use chunks when testing.
87-
# This dataset has <8M entries, so 4M entries/chunk = 2 chunks
87+
# This dataset has ~31k entries, so 20k entries/chunk = 2 chunks
8888
assert hasattr(ea_mod, "CHUNK_SIZE")
89-
monkeypatch.setattr(ea_mod, "CHUNK_SIZE", int(4e6))
89+
monkeypatch.setattr(ea_mod, "CHUNK_SIZE", 20_000)
9090

91-
adata = sc.datasets.ebi_expression_atlas("E-MTAB-4888")
91+
# a tiny dataset (~160kB), since EBI’s downloads can be very slow
92+
adata = sc.datasets.ebi_expression_atlas("E-ENAD-19")
9293
# The shape changes sometimes
93-
assert 2261 <= adata.shape[0] <= 2315
94-
assert 23899 <= adata.shape[1] <= 24051
94+
assert 24 <= adata.shape[0] <= 28
95+
assert 3500 <= adata.shape[1] <= 3800
9596

9697

9798
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)