Skip to content

Commit

Permalink
more [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Feb 7, 2025
1 parent 896cfc6 commit 565a51f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
23 changes: 23 additions & 0 deletions apis/python/remote_tests/test_03_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,26 @@ def test_experiment_queries(conftest_context, uri_and_info):
)

assert (query.n_obs, query.n_vars) == (530, 4)


@pytest.mark.parametrize(
"uri_and_info",
util_pbmc3k_unprocessed_versions(),
)
def test_resize_information(conftest_context, uri_and_info):
uri, info = uri_and_info
print()
print("URI")
print(uri)

upgradeable = tiledbsoma.io.upgrade_experiment_shapes(
uri, check_only=True, context=conftest_context
)
if info["shape"] == "old":
assert upgradeable
else:
assert not upgradeable

# tiledbsoma.io.show_experiment_shapes
# tiledbsoma.io.upgrade_experiment_shapes
# tiledbsoma.io.resize_experiment
8 changes: 4 additions & 4 deletions apis/python/remote_tests/test_04_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import os

import pytest
import scanpy as sc

import tiledbsoma
import tiledbsoma.io
import scanpy as sc

from .util import util_make_uri

Expand All @@ -27,16 +27,16 @@ def test_basic_append(conftest_context, conftest_namespace, conftest_default_s3_
measurement_name = "RNA"

adata1 = sc.datasets.pbmc3k()
adata1 .obs["when"] = ["Monday"] * len(adata1 .obs)
tiledbsoma.io.from_anndata(creation_uri, adata1 , measurement_name=measurement_name)
adata1.obs["when"] = ["Monday"] * len(adata1.obs)
tiledbsoma.io.from_anndata(creation_uri, adata1, measurement_name=measurement_name)

with tiledbsoma.Experiment.open(readback_uri) as exp:
assert exp.obs.count == 2700
assert exp.ms["RNA"].var.count == 32738
assert exp.ms["RNA"].X["data"].shape == (2700, 32738)

adata2 = sc.datasets.pbmc3k()
adata2.obs.index = [e.replace("-1", "-2") for e in adata1 .obs.index]
adata2.obs.index = [e.replace("-1", "-2") for e in adata1.obs.index]
adata2.obs["when"] = ["Tuesday"] * len(adata2.obs)
adata2.X *= 10

Expand Down
2 changes: 0 additions & 2 deletions apis/python/remote_tests/test_99_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,4 @@
# dag.wait()
# dag.node("output").result()

# * Make small stack; provenance
# * Append mode: Monday/Tuesday is fine
# * Show, upgrade, resize

0 comments on commit 565a51f

Please sign in to comment.