Skip to content

Commit

Permalink
rm debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceyan committed Sep 22, 2023
1 parent 72fadff commit e2736d5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cellxgene_schema_cli/cellxgene_schema/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,6 @@ def _validate_dataframe(self, df_name: str):
def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None:
df = getattr_anndata(self.adata, "obs")
df_definition = self._get_component_def("obs")
print(f"df columns: {df.columns}")
print(f"df def: {df_definition}")
print(f"uns dict: {uns_dict}")

# Mapping from obs column name to number of unique categorical values
category_mapping = {}
Expand All @@ -697,11 +694,9 @@ def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None:
if column_def.get("type") == "categorical":
getattr(df, column_name)
category_mapping[column_name] = df[column_name].nunique()
print(f"category mapping: {category_mapping}")

for column_name, num_unique_vals in category_mapping.items():
colors_options = uns_dict.get(f"{column_name}_colors", [])
print(f"column name: {column_name} # unique: {num_unique_vals} colors options: {colors_options}")
if len(colors_options) != num_unique_vals:
self.errors.append(
f"Annotated categorical field {column_name} must have {num_unique_vals} color options "
Expand Down

0 comments on commit e2736d5

Please sign in to comment.