Skip to content

Commit

Permalink
Remaining warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Oct 12, 2023
1 parent 8035fd9 commit 391931e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ jobs:
condition: and(eq(variables['RUN_COVERAGE'], 'yes'), eq(variables['PRERELEASE_DEPENDENCIES'], 'no'))
# TODO: fix all the exceptions here
# replacing “:Trying to modify attribute” and “:Transforming to str index”
# replacing “:Setting element”, “:Trying to modify attribute” and “:Transforming to str index”
# with “::anndata._warnings.ImplicitModificationWarning” breaks,
# because we’re neither using editable installs nor a src/ layout
- script: >
pytest
-W error
-W 'default:Setting element:UserWarning'
-W 'default:Trying to modify attribute:UserWarning'
-W 'default:Transforming to str index:UserWarning'
-W 'default:Observation names are not unique. To make them unique:UserWarning'
Expand Down
6 changes: 5 additions & 1 deletion anndata/tests/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pandas as pd
import pytest
from numba.core.errors import NumbaDeprecationWarning

from anndata import AnnData, read_h5ad, read_loom
from anndata.tests.helpers import gen_typed_df_t2_size
Expand Down Expand Up @@ -78,7 +79,10 @@ def test_readwrite(backing_h5ad):
def test_readwrite_loom(tmp_path):
loom_path = tmp_path / "test.loom"
adata = AnnData(X=X, layers=dict(L=L.copy()))
adata.write_loom(loom_path)

with warnings.catch_warnings():
warnings.simplefilter("ignore", NumbaDeprecationWarning)
adata.write_loom(loom_path)
adata_read = read_loom(loom_path, X_name="")

assert adata.layers.keys() == adata_read.layers.keys()
Expand Down

0 comments on commit 391931e

Please sign in to comment.