You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of scanpy.
(optional) I have confirmed this bug exists on the master branch of scanpy.
What happened?
When running the tests with pytest<=8, the doctest for scanpy.preprocessing._simple.filter_cells errors in a way I can't quite figure out how to fix.
I think what's happening is that the "error on warning" isn't being overridden correctly when we expect the test to warn. Possibly related to pytest-dev/pytest#11759
@flying-sheep any ideas how to fix? I will just pin pytest for now.
======================================================================================================================= FAILURES =======================================================================================================================
_________________________________________________________________________________________________ [doctest] scanpy.preprocessing._simple.filter_cells __________________________________________________________________________________________________
081 Boolean index mask that does filtering. `True` means that the
082 cell is kept. `False` means the cell is removed.
083 number_per_cell
084 Depending on what was thresholded (`counts` or `genes`),
085 the array stores `n_counts` or `n_cells` per gene.
086
087 Examples
088 --------
089 >>> import scanpy as sc
090 >>> adata = sc.datasets.krumsiek11()
UNEXPECTED EXCEPTION: UserWarning('Observation names are not unique. To make them unique, call `.obs_names_make_unique`.')
Traceback (most recent call last):
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/doctest.py", line 1353, in __runexec(compile(example.source, filename, "single",
File "<doctest scanpy.preprocessing._simple.filter_cells[1]>", line 1, in <module>
File "/mnt/workspace/repos/scanpy/scanpy/datasets/_datasets.py", line 109, in krumsiek11
adata = read(filename, first_column_names=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/legacy_api_wrap/__init__.py", line 80, in fn_compatiblereturn fn(*args_all, **kw)
^^^^^^^^^^^^^^^^^^^
File "/mnt/workspace/repos/scanpy/scanpy/readwrite.py", line 124, in readreturn _read(
^^^^^^
File "/mnt/workspace/repos/scanpy/scanpy/readwrite.py", line 801, in _read
adata = read_text(filename, delimiter, first_column_names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/anndata/_io/read.py", line 360, in read_textreturn _read_text(f, delimiter, first_column_names, dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/anndata/_io/read.py", line 471, in _read_textreturn AnnData(
^^^^^^^^
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/anndata/_core/anndata.py", line 362, in __init__self._init_as_actual(
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/anndata/_core/anndata.py", line 574, in _init_as_actualself._check_uniqueness()
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/anndata/_core/anndata.py", line 1906, in _check_uniqueness
utils.warn_names_duplicates("obs")
File "/mnt/workspace/mambaforge/envs/scanpy-dev/lib/python3.11/site-packages/anndata/utils.py", line 275, in warn_names_duplicates
warnings.warn(
UserWarning: Observation names are not unique. To make them unique, call `.obs_names_make_unique`.
/mnt/workspace/repos/scanpy/scanpy/preprocessing/_simple.py:90: UnexpectedException
Please make sure these conditions are met
What happened?
When running the tests with pytest<=8, the doctest for
scanpy.preprocessing._simple.filter_cells
errors in a way I can't quite figure out how to fix.I think what's happening is that the "error on warning" isn't being overridden correctly when we expect the test to warn. Possibly related to pytest-dev/pytest#11759
@flying-sheep any ideas how to fix? I will just pin pytest for now.
Minimal code sample
Error output
Versions
The text was updated successfully, but these errors were encountered: