Skip to content

Commit

Permalink
Python package: update tiledbsoma dep to 1.0.0rc1 (#225)
Browse files Browse the repository at this point in the history
* add test for live directory correctness

* upgrade tiledbsoma dependency to 1.0.0rc1

* lint

* enable anon bucket access

* comments
  • Loading branch information
Bruce Martin authored Feb 24, 2023
1 parent 4d4237b commit 795adac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/python/cell_census/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies= [
# of TileDB on-disk storage format. Make sure this doesn't fall behind the builder's tiledbsoma version.
# NOTE: tiledb is also a requirement of the API, but tiledbsoma also has a tiledb dependency, so just use
# the same version here
"tiledbsoma==1.0rc0",
"tiledbsoma==1.0.0rc1",
"typing_extensions",
"s3fs",
"scikit-misc",
Expand Down
22 changes: 22 additions & 0 deletions api/python/cell_census/tests/test_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest
import requests_mock as rm
import s3fs

import cell_census
from cell_census._release_directory import CELL_CENSUS_RELEASE_DIRECTORY_URL
Expand Down Expand Up @@ -57,3 +58,24 @@ def test_get_census_version_directory(directory_mock: Any) -> None:

for tag in directory:
assert directory[tag] == cell_census.get_census_version_description(tag)


@pytest.mark.live_corpus
def test_live_directory_contents() -> None:
# Sanity check that all directory contents are usable. This uses the
# live directory, so it _could_ start failing without a code change.
# But given the purpose of this package, that seems like a reasonable
# tradeoff, as the data directory should never be "corrupt" or there
# is widespread impact on users.

fs = s3fs.S3FileSystem(anon=True, cache_regions=True)

directory = cell_census.get_census_version_directory()
assert "latest" in directory

for version, version_description in directory.items():
with cell_census.open_soma(census_version=version) as census:
assert census is not None

assert fs.exists(version_description["soma"]["uri"])
assert fs.exists(version_description["h5ads"]["uri"])

0 comments on commit 795adac

Please sign in to comment.