Skip to content

Commit

Permalink
remove accidentally added block
Browse files Browse the repository at this point in the history
  • Loading branch information
eroell committed Jan 15, 2025
1 parent bef4277 commit a701470
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions tests/preprocessing/test_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,51 +83,6 @@ def adata_to_norm():
return adata


@pytest.fixture
def adata_to_norm_large():
obs_data = {"ID": ["Patient1", "Patient2", "Patient3"], "Age": [31, 94, 62]}

X_data = np.array(
[
[1, 3.4, -2.0, 1.0, "A string", "A different string"],
[2, 5.4, 5.0, 2.0, "Silly string", "A different string"],
[2, 5.7, 3.0, np.nan, "A string", "What string?"],
],
dtype=np.dtype(object),
)
# the "ignore" tag is used to make the column being ignored; the original test selecting a few
# columns induces a specific ordering which is kept for now
var_data = {
"Feature": [
"Integer1",
"Numeric1",
"Numeric2",
"Numeric3",
"String1",
"String2",
],
"Type": ["Integer", "Numeric", "Numeric", "Numeric", "String", "String"],
FEATURE_TYPE_KEY: [
CATEGORICAL_TAG,
NUMERIC_TAG,
NUMERIC_TAG,
"ignore",
CATEGORICAL_TAG,
CATEGORICAL_TAG,
],
}
adata = AnnData(
X=X_data,
obs=pd.DataFrame(data=obs_data),
var=pd.DataFrame(data=var_data, index=var_data["Feature"]),
uns=OrderedDict(),
)

adata = ep.pp.encode(adata, autodetect=True, encodings="label")

return adata


def test_vars_checks(adata_to_norm):
"""Test for checks that vars argument is valid."""
with pytest.raises(ValueError, match=r"Some selected vars are not numeric"):
Expand Down

0 comments on commit a701470

Please sign in to comment.