Skip to content

Commit

Permalink
🚸 One more assert
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Aug 7, 2024
1 parent 4c1b9c6 commit 4c0d9c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docs/storage/vitessce.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@
},
"outputs": [],
"source": [
"vc = VitessceConfig(\n",
" schema_version=\"1.0.15\",\n",
")\n",
"vc = VitessceConfig(schema_version=\"1.0.15\")\n",
"vc.add_dataset(name=\"test1\").add_object(\n",
" AnnDataWrapper(\n",
" adata_url=dataset_artifact.path.to_url(),\n",
Expand Down Expand Up @@ -137,9 +135,7 @@
"outputs": [],
"source": [
"# use a corrupted suffix\n",
"vc = VitessceConfig(\n",
" schema_version=\"1.0.15\",\n",
")\n",
"vc = VitessceConfig(schema_version=\"1.0.15\")\n",
"vc.add_dataset(name=\"test1\").add_object(\n",
" AnnDataWrapper(\n",
" adata_url=dataset_artifact.path.to_url() + \".random\",\n",
Expand All @@ -160,9 +156,7 @@
"outputs": [],
"source": [
"# use a corrupted stem_uid\n",
"vc = VitessceConfig(\n",
" schema_version=\"1.0.15\",\n",
")\n",
"vc = VitessceConfig(schema_version=\"1.0.15\")\n",
"vc.add_dataset(name=\"test1\").add_object(\n",
" AnnDataWrapper(\n",
" adata_url=dataset_artifact.path.to_url().replace(dataset_artifact.stem_uid, \"not-a-valid-uid\"),\n",
Expand Down
1 change: 1 addition & 0 deletions lamindb/integrations/_vitessce.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def save_vitessce_config(
]
# validate
dataset_artifacts = []
assert vc_dict["datasets"] # noqa: S101
for vitessce_dataset in vc_dict["datasets"]:
# didn't find good ways to violate the below, hence using plain asserts
# without user feedback
Expand Down

0 comments on commit 4c0d9c8

Please sign in to comment.