Skip to content

Commit

Permalink
💚 Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Nov 5, 2024
1 parent 203e39a commit d91fcf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions lamindb/_curate.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,7 @@ def _update_registry_all(self, validated_only: bool = True, **kwargs):
"""Save labels for all features."""
for name in self.fields.keys():
logger.info(f"saving validated records of '{name}'")
self._update_registry(
name, validated_only=validated_only, **self._kwargs, **kwargs
)
self._update_registry(name, validated_only=validated_only, **kwargs)

def validate(self, organism: str | None = None) -> bool:
"""Validate variables and categorical observations.
Expand Down
8 changes: 4 additions & 4 deletions tests/core/test_curate.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def mock_transform():
return mock_transform


def test_df_annotator(df, categoricals):
def test_df_curator(df, categoricals):
curate = ln.Curator.from_df(df, categoricals=categoricals)
validated = curate.validate()
assert validated is False
Expand Down Expand Up @@ -214,7 +214,7 @@ def test_clean_up_failed_runs():


@pytest.mark.parametrize("to_add", ["donor", "all"])
def test_anndata_annotator(adata, categoricals, to_add):
def test_anndata_curator(adata, categoricals, to_add):
curate = ln.Curator.from_anndata(
adata,
categoricals=categoricals,
Expand Down Expand Up @@ -254,7 +254,7 @@ def test_no_categoricals(adata):
assert validated


def test_anndata_annotator_wrong_type(df, categoricals):
def test_anndata_curator_wrong_type(df, categoricals):
with pytest.raises(ValueError) as error:
ln.Curator.from_anndata(
df,
Expand Down Expand Up @@ -302,7 +302,7 @@ def test_unvalidated_adata_object(adata, categoricals):
assert "Dataset does not validate. Please curate." in str(error.value)


def test_mudata_annotator(mdata):
def test_mudata_curator(mdata):
categoricals = {
"rna:cell_type": bt.CellType.name,
"rna:assay_ontology_id": bt.ExperimentalFactor.ontology_id,
Expand Down

0 comments on commit d91fcf4

Please sign in to comment.