Created
June 20, 2025 21:28
-
-
Save samuela/9d01523251e55920816518fcdb7706bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nixpkgs on samuela/scanpy | |
| ❯ nix-build -A python3Packages.anndata | |
| this derivation will be built: | |
| /nix/store/kgligwzymlzjy7wvlb9jc9wv0wl3i198-python3.12-anndata-0.11.4.drv | |
| building '/nix/store/kgligwzymlzjy7wvlb9jc9wv0wl3i198-python3.12-anndata-0.11.4.drv'... | |
| Sourcing python-remove-tests-dir-hook | |
| Sourcing python-catch-conflicts-hook.sh | |
| Sourcing python-remove-bin-bytecode-hook.sh | |
| Sourcing pypa-build-hook | |
| Using pypaBuildPhase | |
| Sourcing python-runtime-deps-check-hook | |
| Using pythonRuntimeDepsCheckHook | |
| Sourcing pypa-install-hook | |
| Using pypaInstallPhase | |
| Sourcing python-imports-check-hook.sh | |
| Using pythonImportsCheckPhase | |
| Sourcing python-namespaces-hook | |
| Sourcing python-catch-conflicts-hook.sh | |
| Sourcing pytest-check-hook | |
| Using pytestCheckPhase | |
| Running phase: unpackPhase | |
| unpacking source archive /nix/store/wdby4rb7pmhjlxp92j9w7al7p7l0cckh-source | |
| source root is source | |
| setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/tests/test_x.py" | |
| Running phase: patchPhase | |
| Running phase: updateAutotoolsGnuConfigScriptsPhase | |
| Running phase: configurePhase | |
| no configure script, doing nothing | |
| Running phase: buildPhase | |
| Executing pypaBuildPhase | |
| Setting SETUPTOOLS_SCM_PRETEND_VERSION to 0.11.4 | |
| Including all tracked files automatically | |
| Creating a wheel... | |
| pypa build flags: --no-isolation --outdir dist/ --wheel | |
| * Getting build dependencies for wheel... | |
| * Building wheel... | |
| Successfully built anndata-0.11.4-py3-none-any.whl | |
| Finished creating a wheel... | |
| Finished executing pypaBuildPhase | |
| Running phase: pythonRuntimeDepsCheckHook | |
| Executing pythonRuntimeDepsCheck | |
| Checking runtime dependencies for anndata-0.11.4-py3-none-any.whl | |
| Finished executing pythonRuntimeDepsCheck | |
| Running phase: installPhase | |
| Executing pypaInstallPhase | |
| Successfully installed anndata-0.11.4-py3-none-any.whl | |
| Finished executing pypaInstallPhase | |
| Running phase: pythonOutputDistPhase | |
| Executing pythonOutputDistPhase | |
| Finished executing pythonOutputDistPhase | |
| Running phase: fixupPhase | |
| shrinking RPATHs of ELF executables and libraries in /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4 | |
| checking for references to /build/ in /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4... | |
| patching script interpreter paths in /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4 | |
| stripping (with command strip and flags -S -p) in /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib | |
| shrinking RPATHs of ELF executables and libraries in /nix/store/l091smj9gs60jy1qlrfgk9pababj7bqx-python3.12-anndata-0.11.4-dist | |
| checking for references to /build/ in /nix/store/l091smj9gs60jy1qlrfgk9pababj7bqx-python3.12-anndata-0.11.4-dist... | |
| patching script interpreter paths in /nix/store/l091smj9gs60jy1qlrfgk9pababj7bqx-python3.12-anndata-0.11.4-dist | |
| Executing pythonRemoveTestsDir | |
| Finished executing pythonRemoveTestsDir | |
| Running phase: installCheckPhase | |
| no Makefile or custom installCheckPhase, doing nothing | |
| Running phase: pythonCatchConflictsPhase | |
| Running phase: pythonRemoveBinBytecodePhase | |
| Running phase: pythonImportsCheckPhase | |
| Executing pythonImportsCheckPhase | |
| Check whether the following modules can be imported: anndata | |
| Running phase: pytestCheckPhase | |
| Executing pytestCheckPhase | |
| pytest flags: -m pytest --ignore-glob=src/anndata/_core/anndata.py --ignore-glob=src/anndata/_core/merge.py --ignore-glob=src/anndata/_core/sparse_dataset.py --ignore-glob=src/anndata/_io/specs/registry.py --ignore-glob=src/anndata/_io/utils.py --ignore-glob=src/anndata/_warnings.py --ignore-glob=src/anndata/experimental/merge.py --ignore-glob=src/anndata/experimental/multi_files/_anncollection.py --ignore-glob=src/anndata/utils.py -k not\ \(concatenation.rst\)\ and\ not\ \(test_adata_raw_gpu\)\ and\ not\ \(test_as_cupy_dask\)\ and\ not\ \(test_as_dask_functions\)\ and\ not\ \(test_concat_different_types_dask\)\ and\ not\ \(test_concatenate_layers\)\ and\ not\ \(test_concatenate_layers_misaligned\)\ and\ not\ \(test_concatenate_layers_outer\)\ and\ not\ \(test_concatenate_roundtrip\)\ and\ not\ \(test_concat_on_var_outer_join\)\ and\ not\ \(test_dask_to_memory_unbacked\)\ and\ not\ \(test_ellipsis_index\)\ and\ not\ \(test_error_on_mixed_device\)\ and\ not\ \(test_gpu\)\ and\ not\ \(test_io_spec_cupy\)\ and\ not\ \(test_modify_view_component\)\ and\ not\ \(test_nan_merge\)\ and\ not\ \(test_pairwise_concat\)\ and\ not\ \(test_raw_gpu\)\ and\ not\ \(test_set_scalar_subset_X\)\ and\ not\ \(test_transposed_concat\)\ and\ not\ \(test_view_different_type_indices\)\ and\ not\ \(test_view_of_view\) -o addopts= | |
| ============================= test session starts ============================== | |
| platform linux -- Python 3.12.10, pytest-8.3.5, pluggy-1.5.0 | |
| rootdir: /build/source | |
| configfile: pyproject.toml | |
| testpaths: anndata, ./tests, ./ci/scripts, ./docs/concatenation.rst | |
| collected 5063 items / 1697 deselected / 1 skipped / 3366 selected | |
| tests/test_anncollection.py ..... [ 0%] | |
| tests/test_annot.py ...... [ 0%] | |
| tests/test_awkward.py .................................................. [ 1%] | |
| ...................... [ 2%] | |
| tests/test_backed_dense.py .................. [ 3%] | |
| tests/test_backed_hdf5.py ...........................x........x..x..x..x [ 4%] | |
| ..x..x..x..............................................................x [ 6%] | |
| ........x..x..x..x..x..x..x..x........x..x..x..x..x..x..x..x........x..x [ 8%] | |
| ..x..x..x..x..x..x........x..x..x..x..x..x..x..x........x..x..x..x..x..x [ 10%] | |
| ..x..x........x..x..x..x..x..x..x..x........x..x..x..x..x..x..x......... [ 12%] | |
| . [ 12%] | |
| tests/test_backed_sparse.py ............................................ [ 14%] | |
| ........................................................................ [ 16%] | |
| ........................................................................ [ 18%] | |
| ..............................EEEEEEEEEE................................ [ 20%] | |
| ........................................................................ [ 22%] | |
| .................................ss [ 23%] | |
| tests/test_base.py ..................................................... [ 25%] | |
| ......................... [ 26%] | |
| tests/test_concatenate.py .............................................. [ 27%] | |
| ........................................................................ [ 29%] | |
| ........................................................................ [ 31%] | |
| ........................................................................ [ 33%] | |
| ...................................................................x.x.. [ 36%] | |
| .x..................FFFFF [ 36%] | |
| tests/test_concatenate_disk.py ......................................... [ 38%] | |
| ............................................................... [ 39%] | |
| tests/test_dask.py ...........EEEEEEEEEE................................ [ 41%] | |
| . [ 41%] | |
| tests/test_deprecations.py ..................... [ 42%] | |
| tests/test_get_vector.py . [ 42%] | |
| tests/test_helpers.py ................................... [ 43%] | |
| tests/test_inplace_subset.py ........................................... [ 44%] | |
| ........................................................................ [ 46%] | |
| ......................... [ 47%] | |
| tests/test_io_backwards_compat.py .... [ 47%] | |
| tests/test_io_conversion.py ................... [ 48%] | |
| tests/test_io_dispatched.py ..... [ 48%] | |
| tests/test_io_elementwise.py ........................................... [ 49%] | |
| .......................................EE............................... [ 51%] | |
| ............FF....................................... [ 53%] | |
| tests/test_io_partial.py ....ss [ 53%] | |
| tests/test_io_utils.py ......... [ 53%] | |
| tests/test_io_warnings.py s. [ 53%] | |
| tests/test_layers.py .......s... [ 54%] | |
| tests/test_obsmvarm.py ....... [ 54%] | |
| tests/test_obspvarp.py ......... [ 54%] | |
| tests/test_raw.py ......xx.... [ 54%] | |
| tests/test_readwrite.py ..................FFFF....FFFF......FF.......... [ 56%] | |
| ............sssssssss........x............................sssssss....... [ 58%] | |
| ...... [ 58%] | |
| tests/test_repr.py ......... [ 58%] | |
| tests/test_settings.py ................... [ 59%] | |
| tests/test_structured_arrays.py .... [ 59%] | |
| tests/test_transpose.py .............. [ 59%] | |
| tests/test_uns.py . [ 60%] | |
| tests/test_utils.py .. [ 60%] | |
| tests/test_views.py .................................................... [ 61%] | |
| ........................................................................ [ 63%] | |
| ........................................................................ [ 65%] | |
| ........................................................................ [ 68%] | |
| ........................................................................ [ 70%] | |
| ........................................................................ [ 72%] | |
| ........................................................................ [ 74%] | |
| ........................................................................ [ 76%] | |
| ........................................................................ [ 78%] | |
| ........................................................................ [ 80%] | |
| ........................................................................ [ 83%] | |
| ........................................................................ [ 85%] | |
| ........................................................................ [ 87%] | |
| ........................................................................ [ 89%] | |
| ........................................................................ [ 91%] | |
| ........................................................................ [ 93%] | |
| ........................................................................ [ 95%] | |
| ....................... [ 96%] | |
| tests/test_x.py ........................................................ [ 98%] | |
| ........................x....x....x....x..................... [100%] | |
| ==================================== ERRORS ==================================== | |
| ___________ ERROR at setup of test_consecutive_bool[h5ad-randomized] ___________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| _________ ERROR at setup of test_consecutive_bool[h5ad-alternating_15] _________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| _________ ERROR at setup of test_consecutive_bool[h5ad-alternating_5] __________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| ___________ ERROR at setup of test_consecutive_bool[h5ad-one_group] ____________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| ____________ ERROR at setup of test_consecutive_bool[h5ad-one_elem] ____________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| ___________ ERROR at setup of test_consecutive_bool[zarr-randomized] ___________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| _________ ERROR at setup of test_consecutive_bool[zarr-alternating_15] _________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| _________ ERROR at setup of test_consecutive_bool[zarr-alternating_5] __________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| ___________ ERROR at setup of test_consecutive_bool[zarr-one_group] ____________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| ____________ ERROR at setup of test_consecutive_bool[zarr-one_elem] ____________ | |
| file /build/source/tests/test_backed_sparse.py, line 180 | |
| @pytest.mark.parametrize( | |
| ("make_bool_mask", "should_trigger_optimization"), | |
| [ | |
| (make_randomized_mask, None), | |
| (make_alternating_mask_15, True), | |
| (make_alternating_mask_5, False), | |
| (make_one_group_mask, True), | |
| (make_one_elem_mask, False), | |
| ], | |
| ids=["randomized", "alternating_15", "alternating_5", "one_group", "one_elem"], | |
| ) | |
| def test_consecutive_bool( | |
| E fixture 'mocker' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, ondisk_equivalent_adata, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subset_func, subset_func2, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/test_backed_sparse.py:180 | |
| __________ ERROR at setup of test_dask_distributed_write[h5ad-sizes0] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[h5ad-sizes1] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[h5ad-sizes2] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[h5ad-sizes3] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[h5ad-sizes4] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[zarr-sizes0] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[zarr-sizes1] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[zarr-sizes2] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[zarr-sizes3] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| __________ ERROR at setup of test_dask_distributed_write[zarr-sizes4] __________ | |
| file /build/source/tests/test_dask.py, line 113 | |
| @pytest.mark.xdist_group("dask") | |
| def test_dask_distributed_write( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: adata, backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sizes, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| _______________ ERROR at setup of test_read_lazy_h5_cluster[csr] _______________ | |
| file /build/source/tests/test_io_elementwise.py, line 348 | |
| @pytest.mark.xdist_group("dask") | |
| def test_read_lazy_h5_cluster( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sparse_format, store, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| _______________ ERROR at setup of test_read_lazy_h5_cluster[csc] _______________ | |
| file /build/source/tests/test_io_elementwise.py, line 348 | |
| @pytest.mark.xdist_group("dask") | |
| def test_read_lazy_h5_cluster( | |
| file /build/source/tests/conftest.py, line 81 | |
| @pytest.fixture(scope="session") | |
| def local_cluster_addr( | |
| E fixture 'worker_id' not found | |
| > available fixtures: backing_h5ad, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, diskfmt, doctest_namespace, ellipsis_index, ellipsis_index_with_equivalent, equivalent_ellipsis_index, local_cluster_addr, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, sparse_format, store, subset_func, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory | |
| > use 'pytest --fixtures [testpath]' for help on them. | |
| /build/source/tests/conftest.py:81 | |
| =================================== FAILURES =================================== | |
| ______________ test_concat_dask_sparse_matches_memory[outer-None] ______________ | |
| join_type = 'outer', merge_strategy = None | |
| def test_concat_dask_sparse_matches_memory(join_type, merge_strategy): | |
| import dask.array as da | |
| X = sparse.random(50, 20, density=0.5, format="csr") | |
| X_dask = da.from_array(X, chunks=(5, 20)) | |
| var_names_1 = [f"gene_{i}" for i in range(20)] | |
| var_names_2 = [f"gene_{i}{'_foo' if (i % 2) else ''}" for i in range(20, 40)] | |
| ad1 = AnnData(X=X, var=pd.DataFrame(index=var_names_1)) | |
| ad2 = AnnData(X=X, var=pd.DataFrame(index=var_names_2)) | |
| ad1_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_1)) | |
| ad2_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_2)) | |
| res_in_memory = concat([ad1, ad2], join=join_type, merge=merge_strategy) | |
| res_dask = concat([ad1_dask, ad2_dask], join=join_type, merge=merge_strategy) | |
| > assert_equal(res_in_memory, res_dask) | |
| tests/test_concatenate.py:1698: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:763: in assert_adata_equal | |
| assert_equal( | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:603: in assert_equal_sparse | |
| assert_equal(b, a, exact, elem_name=elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:626: in assert_equal_dask_array | |
| assert_equal(b, a.compute(), exact, elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| a = array([[0. , 0.31147147, 0.07804689, ..., 0. , 0. , | |
| 0.97761109], | |
| [0. , 0. ... ], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| b = array([[0. , 0.31147147, 0.07804689, ..., 0. , 0. , | |
| 0.97761109], | |
| [0. , 0. ...46234], | |
| [0.14042709, 0.14042709, 0.14042709, ..., 0.14042709, 0.14042709, | |
| 0.14042709]], shape=(100, 40)) | |
| exact = False, elem_name = 'X' | |
| @assert_equal.register(np.ndarray) | |
| def assert_equal_ndarray(a, b, exact=False, elem_name=None): | |
| b = asarray(b) | |
| if not exact and is_numeric_dtype(a) and is_numeric_dtype(b): | |
| assert a.shape == b.shape, format_msg(elem_name) | |
| > np.testing.assert_allclose(a, b, equal_nan=True, err_msg=format_msg(elem_name)) | |
| E AssertionError: | |
| E Not equal to tolerance rtol=1e-07, atol=0 | |
| E Error raised from element 'X'. | |
| E Mismatched elements: 880 / 4000 (22%) | |
| E Max absolute difference among violations: 0.95548829 | |
| E Max relative difference among violations: 1. | |
| E ACTUAL: array([[0. , 0.311471, 0.078047, ..., 0. , 0. , 0.977611], | |
| E [0. , 0. , 0.863563, ..., 0. , 0. , 0. ], | |
| E [0.59661 , 0. , 0. , ..., 0. , 0. , 0.324186],... | |
| E DESIRED: array([[0. , 0.311471, 0.078047, ..., 0. , 0. , 0.977611], | |
| E [0. , 0. , 0.863563, ..., 0. , 0. , 0. ], | |
| E [0.59661 , 0. , 0. , ..., 0. , 0. , 0.324186],... | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:577: AssertionError | |
| ______________ test_concat_dask_sparse_matches_memory[outer-same] ______________ | |
| join_type = 'outer', merge_strategy = 'same' | |
| def test_concat_dask_sparse_matches_memory(join_type, merge_strategy): | |
| import dask.array as da | |
| X = sparse.random(50, 20, density=0.5, format="csr") | |
| X_dask = da.from_array(X, chunks=(5, 20)) | |
| var_names_1 = [f"gene_{i}" for i in range(20)] | |
| var_names_2 = [f"gene_{i}{'_foo' if (i % 2) else ''}" for i in range(20, 40)] | |
| ad1 = AnnData(X=X, var=pd.DataFrame(index=var_names_1)) | |
| ad2 = AnnData(X=X, var=pd.DataFrame(index=var_names_2)) | |
| ad1_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_1)) | |
| ad2_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_2)) | |
| res_in_memory = concat([ad1, ad2], join=join_type, merge=merge_strategy) | |
| res_dask = concat([ad1_dask, ad2_dask], join=join_type, merge=merge_strategy) | |
| > assert_equal(res_in_memory, res_dask) | |
| tests/test_concatenate.py:1698: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:763: in assert_adata_equal | |
| assert_equal( | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:603: in assert_equal_sparse | |
| assert_equal(b, a, exact, elem_name=elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:626: in assert_equal_dask_array | |
| assert_equal(b, a.compute(), exact, elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| a = array([[0.70666451, 0.9810538 , 0.81099848, ..., 0. , 0. , | |
| 0.39215538], | |
| [0. , 0.80... ], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| b = array([[0.70666451, 0.9810538 , 0.81099848, ..., 0. , 0. , | |
| 0.39215538], | |
| [0. , 0.80...70356], | |
| [0.20455613, 0.20455613, 0.20455613, ..., 0.20455613, 0.20455613, | |
| 0.20455613]], shape=(100, 40)) | |
| exact = False, elem_name = 'X' | |
| @assert_equal.register(np.ndarray) | |
| def assert_equal_ndarray(a, b, exact=False, elem_name=None): | |
| b = asarray(b) | |
| if not exact and is_numeric_dtype(a) and is_numeric_dtype(b): | |
| assert a.shape == b.shape, format_msg(elem_name) | |
| > np.testing.assert_allclose(a, b, equal_nan=True, err_msg=format_msg(elem_name)) | |
| E AssertionError: | |
| E Not equal to tolerance rtol=1e-07, atol=0 | |
| E Error raised from element 'X'. | |
| E Mismatched elements: 920 / 4000 (23%) | |
| E Max absolute difference among violations: 0.99341873 | |
| E Max relative difference among violations: 1. | |
| E ACTUAL: array([[0.706665, 0.981054, 0.810998, ..., 0. , 0. , 0.392155], | |
| E [0. , 0.800075, 0.320862, ..., 0.405274, 0.468094, 0. ], | |
| E [0.720801, 0. , 0. , ..., 0. , 0.500157, 0. ],... | |
| E DESIRED: array([[0.706665, 0.981054, 0.810998, ..., 0. , 0. , 0.392155], | |
| E [0. , 0.800075, 0.320862, ..., 0.405274, 0.468094, 0. ], | |
| E [0.720801, 0. , 0. , ..., 0. , 0.500157, 0. ],... | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:577: AssertionError | |
| _____________ test_concat_dask_sparse_matches_memory[outer-unique] _____________ | |
| join_type = 'outer', merge_strategy = 'unique' | |
| def test_concat_dask_sparse_matches_memory(join_type, merge_strategy): | |
| import dask.array as da | |
| X = sparse.random(50, 20, density=0.5, format="csr") | |
| X_dask = da.from_array(X, chunks=(5, 20)) | |
| var_names_1 = [f"gene_{i}" for i in range(20)] | |
| var_names_2 = [f"gene_{i}{'_foo' if (i % 2) else ''}" for i in range(20, 40)] | |
| ad1 = AnnData(X=X, var=pd.DataFrame(index=var_names_1)) | |
| ad2 = AnnData(X=X, var=pd.DataFrame(index=var_names_2)) | |
| ad1_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_1)) | |
| ad2_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_2)) | |
| res_in_memory = concat([ad1, ad2], join=join_type, merge=merge_strategy) | |
| res_dask = concat([ad1_dask, ad2_dask], join=join_type, merge=merge_strategy) | |
| > assert_equal(res_in_memory, res_dask) | |
| tests/test_concatenate.py:1698: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:763: in assert_adata_equal | |
| assert_equal( | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:603: in assert_equal_sparse | |
| assert_equal(b, a, exact, elem_name=elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:626: in assert_equal_dask_array | |
| assert_equal(b, a.compute(), exact, elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| a = array([[0.41639268, 0. , 0.03259961, ..., 0. , 0. , | |
| 0. ], | |
| [0. , 0. ... ], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| b = array([[0.41639268, 0. , 0.03259961, ..., 0. , 0. , | |
| 0. ], | |
| [0. , 0. ...20978], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| exact = False, elem_name = 'X' | |
| @assert_equal.register(np.ndarray) | |
| def assert_equal_ndarray(a, b, exact=False, elem_name=None): | |
| b = asarray(b) | |
| if not exact and is_numeric_dtype(a) and is_numeric_dtype(b): | |
| assert a.shape == b.shape, format_msg(elem_name) | |
| > np.testing.assert_allclose(a, b, equal_nan=True, err_msg=format_msg(elem_name)) | |
| E AssertionError: | |
| E Not equal to tolerance rtol=1e-07, atol=0 | |
| E Error raised from element 'X'. | |
| E Mismatched elements: 1160 / 4000 (29%) | |
| E Max absolute difference among violations: 0.99650923 | |
| E Max relative difference among violations: 1. | |
| E ACTUAL: array([[0.416393, 0. , 0.0326 , ..., 0. , 0. , 0. ], | |
| E [0. , 0. , 0. , ..., 0. , 0. , 0.991663], | |
| E [0. , 0.394503, 0.99507 , ..., 0. , 0. , 0. ],... | |
| E DESIRED: array([[0.416393, 0. , 0.0326 , ..., 0. , 0. , 0. ], | |
| E [0. , 0. , 0. , ..., 0. , 0. , 0.991663], | |
| E [0. , 0.394503, 0.99507 , ..., 0. , 0. , 0. ],... | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:577: AssertionError | |
| _____________ test_concat_dask_sparse_matches_memory[outer-first] ______________ | |
| join_type = 'outer', merge_strategy = 'first' | |
| def test_concat_dask_sparse_matches_memory(join_type, merge_strategy): | |
| import dask.array as da | |
| X = sparse.random(50, 20, density=0.5, format="csr") | |
| X_dask = da.from_array(X, chunks=(5, 20)) | |
| var_names_1 = [f"gene_{i}" for i in range(20)] | |
| var_names_2 = [f"gene_{i}{'_foo' if (i % 2) else ''}" for i in range(20, 40)] | |
| ad1 = AnnData(X=X, var=pd.DataFrame(index=var_names_1)) | |
| ad2 = AnnData(X=X, var=pd.DataFrame(index=var_names_2)) | |
| ad1_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_1)) | |
| ad2_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_2)) | |
| res_in_memory = concat([ad1, ad2], join=join_type, merge=merge_strategy) | |
| res_dask = concat([ad1_dask, ad2_dask], join=join_type, merge=merge_strategy) | |
| > assert_equal(res_in_memory, res_dask) | |
| tests/test_concatenate.py:1698: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:763: in assert_adata_equal | |
| assert_equal( | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:603: in assert_equal_sparse | |
| assert_equal(b, a, exact, elem_name=elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:626: in assert_equal_dask_array | |
| assert_equal(b, a.compute(), exact, elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| a = array([[0. , 0. , 0. , ..., 0.18323909, 0. , | |
| 0. ], | |
| [0.23802404, 0. ... ], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| b = array([[0. , 0. , 0. , ..., 0.18323909, 0. , | |
| 0. ], | |
| [0.23802404, 0. ...90483], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| exact = False, elem_name = 'X' | |
| @assert_equal.register(np.ndarray) | |
| def assert_equal_ndarray(a, b, exact=False, elem_name=None): | |
| b = asarray(b) | |
| if not exact and is_numeric_dtype(a) and is_numeric_dtype(b): | |
| assert a.shape == b.shape, format_msg(elem_name) | |
| > np.testing.assert_allclose(a, b, equal_nan=True, err_msg=format_msg(elem_name)) | |
| E AssertionError: | |
| E Not equal to tolerance rtol=1e-07, atol=0 | |
| E Error raised from element 'X'. | |
| E Mismatched elements: 1240 / 4000 (31%) | |
| E Max absolute difference among violations: 0.98815086 | |
| E Max relative difference among violations: 1. | |
| E ACTUAL: array([[0. , 0. , 0. , ..., 0.183239, 0. , 0. ], | |
| E [0.238024, 0. , 0. , ..., 0.529747, 0. , 0.761065], | |
| E [0. , 0.205438, 0.723672, ..., 0. , 0. , 0. ],... | |
| E DESIRED: array([[0. , 0. , 0. , ..., 0.183239, 0. , 0. ], | |
| E [0.238024, 0. , 0. , ..., 0.529747, 0. , 0.761065], | |
| E [0. , 0.205438, 0.723672, ..., 0. , 0. , 0. ],... | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:577: AssertionError | |
| ______________ test_concat_dask_sparse_matches_memory[outer-only] ______________ | |
| join_type = 'outer', merge_strategy = 'only' | |
| def test_concat_dask_sparse_matches_memory(join_type, merge_strategy): | |
| import dask.array as da | |
| X = sparse.random(50, 20, density=0.5, format="csr") | |
| X_dask = da.from_array(X, chunks=(5, 20)) | |
| var_names_1 = [f"gene_{i}" for i in range(20)] | |
| var_names_2 = [f"gene_{i}{'_foo' if (i % 2) else ''}" for i in range(20, 40)] | |
| ad1 = AnnData(X=X, var=pd.DataFrame(index=var_names_1)) | |
| ad2 = AnnData(X=X, var=pd.DataFrame(index=var_names_2)) | |
| ad1_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_1)) | |
| ad2_dask = AnnData(X=X_dask, var=pd.DataFrame(index=var_names_2)) | |
| res_in_memory = concat([ad1, ad2], join=join_type, merge=merge_strategy) | |
| res_dask = concat([ad1_dask, ad2_dask], join=join_type, merge=merge_strategy) | |
| > assert_equal(res_in_memory, res_dask) | |
| tests/test_concatenate.py:1698: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:763: in assert_adata_equal | |
| assert_equal( | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:603: in assert_equal_sparse | |
| assert_equal(b, a, exact, elem_name=elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:626: in assert_equal_dask_array | |
| assert_equal(b, a.compute(), exact, elem_name) | |
| /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/lib/python3.12/functools.py:912: in wrapper | |
| return dispatch(args[0].__class__)(*args, **kw) | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| a = array([[0.55364538, 0.41274351, 0. , ..., 0. , 0.72269803, | |
| 0. ], | |
| [0.07384858, 0. ... ], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| b = array([[0.55364538, 0.41274351, 0. , ..., 0. , 0.72269803, | |
| 0. ], | |
| [0.07384858, 0. ...29171], | |
| [0. , 0. , 0. , ..., 0. , 0. , | |
| 0. ]], shape=(100, 40)) | |
| exact = False, elem_name = 'X' | |
| @assert_equal.register(np.ndarray) | |
| def assert_equal_ndarray(a, b, exact=False, elem_name=None): | |
| b = asarray(b) | |
| if not exact and is_numeric_dtype(a) and is_numeric_dtype(b): | |
| assert a.shape == b.shape, format_msg(elem_name) | |
| > np.testing.assert_allclose(a, b, equal_nan=True, err_msg=format_msg(elem_name)) | |
| E AssertionError: | |
| E Not equal to tolerance rtol=1e-07, atol=0 | |
| E Error raised from element 'X'. | |
| E Mismatched elements: 880 / 4000 (22%) | |
| E Max absolute difference among violations: 0.88265018 | |
| E Max relative difference among violations: 1. | |
| E ACTUAL: array([[0.553645, 0.412744, 0. , ..., 0. , 0.722698, 0. ], | |
| E [0.073849, 0. , 0. , ..., 0. , 0.492596, 0.527854], | |
| E [0. , 0. , 0. , ..., 0.822827, 0.68172 , 0. ],... | |
| E DESIRED: array([[0.553645, 0.412744, 0. , ..., 0. , 0.722698, 0. ], | |
| E [0.073849, 0. , 0. , ..., 0. , 0.492596, 0.527854], | |
| E [0. , 0. , 0. , ..., 0.822827, 0.68172 , 0. ],... | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/tests/helpers.py:577: AssertionError | |
| _____________________ test_write_nullable_string_error[h5] _____________________ | |
| store = <HDF5 group "/" (1 members)> | |
| def test_write_nullable_string_error(store): | |
| > with pytest.raises(RuntimeError, match=r"allow_write_nullable_strings.*is False"): | |
| E Failed: DID NOT RAISE <class 'RuntimeError'> | |
| tests/test_io_elementwise.py:496: Failed | |
| ____________________ test_write_nullable_string_error[zarr] ____________________ | |
| store = <zarr.hierarchy.Group '/'> | |
| def test_write_nullable_string_error(store): | |
| > with pytest.raises(RuntimeError, match=r"allow_write_nullable_strings.*is False"): | |
| E Failed: DID NOT RAISE <class 'RuntimeError'> | |
| tests/test_io_elementwise.py:496: Failed | |
| _________ test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-h5ad] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat2') | |
| storage = 'h5ad', typ = <class 'scipy.sparse._csr.csr_matrix'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat2/test.h5ad') | |
| dataset_kwargs = {} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| assert isinstance(adata.raw.X, CSMatrix) | |
| else: | |
| > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, (<class 'scipy.sparse._csr.csr_array'> | DaskArray)) | |
| E + where <Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d60d40>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d60d40> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| E + and <class 'scipy.sparse._csr.csr_array'> = type(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d3f740>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d3f740> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:163: AssertionError | |
| _________ test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-zarr] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat3') | |
| storage = 'zarr', typ = <class 'scipy.sparse._csr.csr_matrix'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat3/test.h5ad') | |
| dataset_kwargs = {} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| assert isinstance(adata.raw.X, CSMatrix) | |
| else: | |
| > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, (<class 'scipy.sparse._csr.csr_array'> | DaskArray)) | |
| E + where <Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee932ef30>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee932ef30> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| E + and <class 'scipy.sparse._csr.csr_array'> = type(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d62870>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d62870> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:163: AssertionError | |
| __________ test_readwrite_kitchensink[dataset_kwargs0-csr_array-h5ad] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat4') | |
| storage = 'h5ad', typ = <class 'scipy.sparse._csr.csr_array'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat4/test.h5ad') | |
| dataset_kwargs = {} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| > assert isinstance(adata.raw.X, CSMatrix) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8cddf10>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8cddf10> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:161: AssertionError | |
| __________ test_readwrite_kitchensink[dataset_kwargs0-csr_array-zarr] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat5') | |
| storage = 'zarr', typ = <class 'scipy.sparse._csr.csr_array'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat5/test.h5ad') | |
| dataset_kwargs = {} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| > assert isinstance(adata.raw.X, CSMatrix) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8cde090>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8cde090> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:161: AssertionError | |
| _________ test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-h5ad] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat10') | |
| storage = 'h5ad', typ = <class 'scipy.sparse._csr.csr_matrix'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat10/test.h5ad') | |
| dataset_kwargs = {'compression': 'gzip'} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| assert isinstance(adata.raw.X, CSMatrix) | |
| else: | |
| > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, (<class 'scipy.sparse._csr.csr_array'> | DaskArray)) | |
| E + where <Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d17800>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d17800> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| E + and <class 'scipy.sparse._csr.csr_array'> = type(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d039e0>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d039e0> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:163: AssertionError | |
| _________ test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-zarr] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat11') | |
| storage = 'zarr', typ = <class 'scipy.sparse._csr.csr_matrix'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat11/test.h5ad') | |
| dataset_kwargs = {'compression': 'gzip'} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| assert isinstance(adata.raw.X, CSMatrix) | |
| else: | |
| > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, (<class 'scipy.sparse._csr.csr_array'> | DaskArray)) | |
| E + where <Compressed Sparse Row sparse matrix of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8dc6390>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8dc6390> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| E + and <class 'scipy.sparse._csr.csr_array'> = type(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d62cc0>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d62cc0> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:163: AssertionError | |
| __________ test_readwrite_kitchensink[dataset_kwargs1-csr_array-h5ad] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat12') | |
| storage = 'h5ad', typ = <class 'scipy.sparse._csr.csr_array'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat12/test.h5ad') | |
| dataset_kwargs = {'compression': 'gzip'} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| > assert isinstance(adata.raw.X, CSMatrix) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee93eb500>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee93eb500> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:161: AssertionError | |
| __________ test_readwrite_kitchensink[dataset_kwargs1-csr_array-zarr] __________ | |
| tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat13') | |
| storage = 'zarr', typ = <class 'scipy.sparse._csr.csr_array'> | |
| backing_h5ad = PosixPath('/build/pytest-of-nixbld/pytest-0/test_readwrite_kitchensink_dat13/test.h5ad') | |
| dataset_kwargs = {'compression': 'gzip'} | |
| @pytest.mark.parametrize("storage", ["h5ad", pytest.param("zarr", marks=[needs_zarr])]) | |
| @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) | |
| def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): | |
| X = typ(X_list) | |
| adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) | |
| assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| adata_src.raw = adata_src.copy() | |
| if storage == "h5ad": | |
| adata_src.write(backing_h5ad, **dataset_kwargs) | |
| adata_mid = ad.read_h5ad(backing_h5ad) | |
| adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) | |
| adata = ad.read_h5ad(tmp_path / "mid.h5ad") | |
| else: | |
| adata_src.write_zarr(tmp_path / "test_zarr_dir", chunks=True) | |
| adata = ad.read_zarr(tmp_path / "test_zarr_dir") | |
| assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) | |
| assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) | |
| assert adata.obs.index.tolist() == ["name1", "name2", "name3"] | |
| assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] | |
| assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] | |
| assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) | |
| pd.testing.assert_frame_equal(adata.obs, adata_src.obs) | |
| pd.testing.assert_frame_equal(adata.var, adata_src.var) | |
| assert_equal(adata.var.index, adata_src.var.index) | |
| assert adata.var.index.dtype == adata_src.var.index.dtype | |
| # Dev. Note: | |
| # either load as same type or load the convert DaskArray to array | |
| # since we tested if assigned types and loaded types are DaskArray | |
| # this would also work if they work | |
| if isinstance(adata_src.raw.X, CSArray): | |
| > assert isinstance(adata.raw.X, CSMatrix) | |
| E AssertionError: assert False | |
| E + where False = isinstance(<Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)>, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) | |
| E + where <Compressed Sparse Row sparse array of dtype 'int64'\n with 4 stored elements and shape (3, 2)> = <anndata._core.raw.Raw object at 0x7ffee8d75a90>.X | |
| E + where <anndata._core.raw.Raw object at 0x7ffee8d75a90> = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw | |
| tests/test_readwrite.py:161: AssertionError | |
| ___________________ test_read_write_maintain_obsmvarm_dtypes ___________________ | |
| rw = (AnnData object with n_obs × n_vars = 100 × 101 | |
| obs: 'cat_unordered', 'obs_cat', 'int64', 'float64', 'uint8', 'boo...ray', 'sparse', 'sparse_array' | |
| obsp: 'array', 'sparse', 'sparse_array' | |
| varp: 'array', 'sparse', 'sparse_array') | |
| def test_read_write_maintain_obsmvarm_dtypes(rw): | |
| curr, orig = rw | |
| assert type(orig.obsm["array"]) is type(curr.obsm["array"]) | |
| assert np.all(orig.obsm["array"] == curr.obsm["array"]) | |
| assert np.all(orig.varm["array"] == curr.varm["array"]) | |
| > assert type(orig.obsm["sparse"]) is type(curr.obsm["sparse"]) | |
| E AssertionError: assert <class 'scipy.sparse._csr.csr_matrix'> is <class 'scipy.sparse._csr.csr_array'> | |
| E + where <class 'scipy.sparse._csr.csr_matrix'> = type(<Compressed Sparse Row sparse matrix of dtype 'float64'\n with 100 stored elements and shape (100, 100)>) | |
| E + and <class 'scipy.sparse._csr.csr_array'> = type(<Compressed Sparse Row sparse array of dtype 'float64'\n with 100 stored elements and shape (100, 100)>) | |
| tests/test_readwrite.py:192: AssertionError | |
| _____________________________ test_maintain_layers _____________________________ | |
| rw = (AnnData object with n_obs × n_vars = 100 × 101 | |
| obs: 'cat_unordered', 'obs_cat', 'int64', 'float64', 'uint8', 'boo...ray', 'sparse', 'sparse_array' | |
| obsp: 'array', 'sparse', 'sparse_array' | |
| varp: 'array', 'sparse', 'sparse_array') | |
| def test_maintain_layers(rw): | |
| curr, orig = rw | |
| assert type(orig.layers["array"]) is type(curr.layers["array"]) | |
| assert np.all(orig.layers["array"] == curr.layers["array"]) | |
| > assert type(orig.layers["sparse"]) is type(curr.layers["sparse"]) | |
| E AssertionError: assert <class 'scipy.sparse._csr.csr_matrix'> is <class 'scipy.sparse._csr.csr_array'> | |
| E + where <class 'scipy.sparse._csr.csr_matrix'> = type(<Compressed Sparse Row sparse matrix of dtype 'float64'\n with 101 stored elements and shape (100, 101)>) | |
| E + and <class 'scipy.sparse._csr.csr_array'> = type(<Compressed Sparse Row sparse array of dtype 'float64'\n with 101 stored elements and shape (100, 101)>) | |
| tests/test_readwrite.py:205: AssertionError | |
| =============================== warnings summary =============================== | |
| ../../nix/store/flh9b1l4y7zmmrik73gcmksvp7win5q2-python3.12-pytest-8.3.5/lib/python3.12/site-packages/_pytest/config/__init__.py:1441 | |
| /nix/store/flh9b1l4y7zmmrik73gcmksvp7win5q2-python3.12-pytest-8.3.5/lib/python3.12/site-packages/_pytest/config/__init__.py:1441: PytestConfigWarning: Unknown config option: filterwarnings_when_strict | |
| self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") | |
| tests/test_dask.py:113 | |
| /build/source/tests/test_dask.py:113: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html | |
| @pytest.mark.xdist_group("dask") | |
| tests/test_io_elementwise.py:348 | |
| /build/source/tests/test_io_elementwise.py:348: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html | |
| @pytest.mark.xdist_group("dask") | |
| tests/test_backed_dense.py::test_assign_x_subset[h5ad] | |
| tests/test_backed_dense.py::test_assign_x_subset[zarr] | |
| /build/source/tests/test_backed_dense.py:88: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden | |
| view.X = np.zeros((4, 2)) | |
| tests/test_base.py: 5 warnings | |
| tests/test_readwrite.py: 12 warnings | |
| tests/test_views.py: 1 warning | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/_core/aligned_df.py:68: ImplicitModificationWarning: Transforming to str index. | |
| warnings.warn("Transforming to str index.", ImplicitModificationWarning) | |
| tests/test_concatenate.py::test_concatenate_obsm_outer[nan] | |
| tests/test_concatenate.py::test_concatenate_obsm_outer[3.141592653589793] | |
| tests/test_concatenate.py::test_concatenate_fill_value[nan] | |
| tests/test_concatenate.py::test_concatenate_fill_value[3.141592653589793] | |
| /nix/store/8f9zfpbmybfl09aq4a9nzp8a9gwgqjbf-python3.12-scipy-1.15.3/lib/python3.12/site-packages/scipy/sparse/_index.py:210: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil and dok are more efficient. | |
| self._set_arrayXarray(i, j, x) | |
| tests/test_concatenate.py: 43 warnings | |
| tests/test_concatenate_disk.py: 104 warnings | |
| tests/test_utils.py: 1 warning | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/_core/anndata.py:1756: UserWarning: Observation names are not unique. To make them unique, call `.obs_names_make_unique`. | |
| utils.warn_names_duplicates("obs") | |
| tests/test_concatenate.py: 9 warnings | |
| tests/test_concatenate_disk.py: 96 warnings | |
| tests/test_utils.py: 1 warning | |
| /nix/store/lsjghdh2yhdzc8qjvylrgnll8vkax252-python3.12-anndata-0.11.4/lib/python3.12/site-packages/anndata/_core/anndata.py:1758: UserWarning: Variable names are not unique. To make them unique, call `.var_names_make_unique`. | |
| utils.warn_names_duplicates("var") | |
| tests/test_concatenate.py::test_concatenate_fill_value[nan] | |
| tests/test_concatenate.py::test_concatenate_fill_value[3.141592653589793] | |
| /nix/store/8f9zfpbmybfl09aq4a9nzp8a9gwgqjbf-python3.12-scipy-1.15.3/lib/python3.12/site-packages/scipy/sparse/_index.py:210: SparseEfficiencyWarning: Changing the sparsity structure of a csc_array is expensive. lil and dok are more efficient. | |
| self._set_arrayXarray(i, j, x) | |
| tests/test_views.py::test_views | |
| /build/source/tests/test_views.py:114: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden | |
| adata[:2, 0].X = [0, 0] | |
| tests/test_x.py::test_repeat_indices_view | |
| /build/source/tests/test_x.py:53: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden | |
| subset.X = mat | |
| tests/test_x.py: 21 warnings | |
| /build/source/tests/test_x.py:66: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden | |
| view.X = to_assign | |
| tests/test_x.py::test_setter_view[csr-csr] | |
| tests/test_x.py::test_setter_view[csc-csr] | |
| tests/test_x.py::test_setter_view[csr_array-csr] | |
| tests/test_x.py::test_setter_view[csc_array-csr] | |
| tests/test_x.py::test_setter_view[ndarray-csr] | |
| /nix/store/8f9zfpbmybfl09aq4a9nzp8a9gwgqjbf-python3.12-scipy-1.15.3/lib/python3.12/site-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil and dok are more efficient. | |
| self._set_arrayXarray_sparse(i, j, x) | |
| tests/test_x.py::test_setter_view[csr-csc] | |
| tests/test_x.py::test_setter_view[csc-csc] | |
| tests/test_x.py::test_setter_view[csr_array-csc] | |
| tests/test_x.py::test_setter_view[csc_array-csc] | |
| tests/test_x.py::test_setter_view[ndarray-csc] | |
| /nix/store/8f9zfpbmybfl09aq4a9nzp8a9gwgqjbf-python3.12-scipy-1.15.3/lib/python3.12/site-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil and dok are more efficient. | |
| self._set_arrayXarray_sparse(i, j, x) | |
| tests/test_x.py::test_setter_view[csr-csr_array] | |
| tests/test_x.py::test_setter_view[csc-csr_array] | |
| tests/test_x.py::test_setter_view[csr_array-csr_array] | |
| tests/test_x.py::test_setter_view[csc_array-csr_array] | |
| tests/test_x.py::test_setter_view[ndarray-csr_array] | |
| /nix/store/8f9zfpbmybfl09aq4a9nzp8a9gwgqjbf-python3.12-scipy-1.15.3/lib/python3.12/site-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csr_array is expensive. lil and dok are more efficient. | |
| self._set_arrayXarray_sparse(i, j, x) | |
| tests/test_x.py::test_setter_view[csr-csc_array] | |
| tests/test_x.py::test_setter_view[csc-csc_array] | |
| tests/test_x.py::test_setter_view[csr_array-csc_array] | |
| tests/test_x.py::test_setter_view[csc_array-csc_array] | |
| tests/test_x.py::test_setter_view[ndarray-csc_array] | |
| /nix/store/8f9zfpbmybfl09aq4a9nzp8a9gwgqjbf-python3.12-scipy-1.15.3/lib/python3.12/site-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csc_array is expensive. lil and dok are more efficient. | |
| self._set_arrayXarray_sparse(i, j, x) | |
| -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html | |
| =========================== short test summary info ============================ | |
| FAILED tests/test_concatenate.py::test_concat_dask_sparse_matches_memory[outer-None] - AssertionError: | |
| FAILED tests/test_concatenate.py::test_concat_dask_sparse_matches_memory[outer-same] - AssertionError: | |
| FAILED tests/test_concatenate.py::test_concat_dask_sparse_matches_memory[outer-unique] - AssertionError: | |
| FAILED tests/test_concatenate.py::test_concat_dask_sparse_matches_memory[outer-first] - AssertionError: | |
| FAILED tests/test_concatenate.py::test_concat_dask_sparse_matches_memory[outer-only] - AssertionError: | |
| FAILED tests/test_io_elementwise.py::test_write_nullable_string_error[h5] - Failed: DID NOT RAISE <class 'RuntimeError'> | |
| FAILED tests/test_io_elementwise.py::test_write_nullable_string_error[zarr] - Failed: DID NOT RAISE <class 'RuntimeError'> | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-h5ad] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-zarr] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_array-h5ad] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_array-zarr] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-h5ad] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-zarr] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_array-h5ad] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_array-zarr] - AssertionError: assert False | |
| FAILED tests/test_readwrite.py::test_read_write_maintain_obsmvarm_dtypes - AssertionError: assert <class 'scipy.sparse._csr.csr_matrix'> is <class 'sc... | |
| FAILED tests/test_readwrite.py::test_maintain_layers - AssertionError: assert <class 'scipy.sparse._csr.csr_matrix'> is <class 'sc... | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-randomized] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-alternating_15] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-alternating_5] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-one_group] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-one_elem] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-randomized] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-alternating_15] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-alternating_5] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-one_group] | |
| ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-one_elem] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes0] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes1] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes2] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes3] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes4] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes0] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes1] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes2] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes3] | |
| ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes4] | |
| ERROR tests/test_io_elementwise.py::test_read_lazy_h5_cluster[csr] | |
| ERROR tests/test_io_elementwise.py::test_read_lazy_h5_cluster[csc] | |
| = 17 failed, 3231 passed, 23 skipped, 1697 deselected, 74 xfailed, 326 warnings, 22 errors in 369.50s (0:06:09) = | |
| error: builder for '/nix/store/kgligwzymlzjy7wvlb9jc9wv0wl3i198-python3.12-anndata-0.11.4.drv' failed with exit code 1; | |
| last 25 log lines: | |
| > FAILED tests/test_readwrite.py::test_read_write_maintain_obsmvarm_dtypes - AssertionError: assert <class 'scipy.sparse._csr.csr_matrix'> is <class 'sc... | |
| > FAILED tests/test_readwrite.py::test_maintain_layers - AssertionError: assert <class 'scipy.sparse._csr.csr_matrix'> is <class 'sc... | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-randomized] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-alternating_15] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-alternating_5] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-one_group] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[h5ad-one_elem] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-randomized] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-alternating_15] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-alternating_5] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-one_group] | |
| > ERROR tests/test_backed_sparse.py::test_consecutive_bool[zarr-one_elem] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes0] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes1] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes2] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes3] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[h5ad-sizes4] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes0] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes1] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes2] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes3] | |
| > ERROR tests/test_dask.py::test_dask_distributed_write[zarr-sizes4] | |
| > ERROR tests/test_io_elementwise.py::test_read_lazy_h5_cluster[csr] | |
| > ERROR tests/test_io_elementwise.py::test_read_lazy_h5_cluster[csc] | |
| > = 17 failed, 3231 passed, 23 skipped, 1697 deselected, 74 xfailed, 326 warnings, 22 errors in 369.50s (0:06:09) = | |
| For full logs, run: | |
| nix log /nix/store/kgligwzymlzjy7wvlb9jc9wv0wl3i198-python3.12-anndata-0.11.4.drv | |
| nixpkgs on samuela/scanpy [!?] took 6m27s | |
| ❯ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment