Skip to content

Commit 1288c70

Browse files
committed
Add smoke test and fix package data for cell_context.json
1 parent f830c90 commit 1288c70

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ dependencies = [
2424

2525
[tool.setuptools.packages.find]
2626
where = ["src"]
27+
28+
[tool.setuptools.package-data]
29+
celltypeai = ["cell_context.json"]

tests/smoke_test.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import importlib.resources
2+
3+
import celltypeai
4+
from celltypeai import cell_annotator
5+
6+
# Check version is accessible
7+
assert hasattr(celltypeai, "__version__"), "Missing __version__"
8+
9+
# Check main function is importable and callable
10+
assert callable(cell_annotator), "cell_annotator is not callable"
11+
12+
# Check submodules are importable (catches missing files in sdist)
13+
import celltypeai.h5ad_to_json # noqa: F401
14+
import celltypeai.prompt_context_manager # noqa: F401
15+
import celltypeai.prompt_submit # noqa: F401
16+
17+
# Check that bundled data file is included in the distribution
18+
cell_context = importlib.resources.files("celltypeai").joinpath("cell_context.json")
19+
assert cell_context.is_file(), "cell_context.json missing from distribution"
20+
21+
print(f"celltypeai version {celltypeai.__version__} smoke test passed.")

0 commit comments

Comments
 (0)