Skip to content

Commit

Permalink
♻️ Move definition of suffixes into lamindb (#815)
Browse files Browse the repository at this point in the history
* ♻️ Move definition of suffixes into lamindb

* ✅ Restore a test for composite suffix
  • Loading branch information
falexwolf authored Aug 7, 2024
1 parent defbabf commit b10f700
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lamindb_setup/core/upath.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@
".zarr",
".json",
}
VALID_COMPOSITE_SUFFIXES = {
".anndata.zarr",
".spatialdata.zarr",
".ome.zarr",
}
# below gets updated within lamindb because it's frequently changing
VALID_COMPOSITE_SUFFIXES = {".anndata.zarr"}

TRAILING_SEP = (os.sep, os.altsep) if os.altsep is not None else os.sep

Expand Down
2 changes: 1 addition & 1 deletion tests/storage/test_storage_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_extract_suffix_from_path():
("logs/date.log.123", ""), # digits are no valid suffixes
("salmon.merged.gene_counts.tsv", ".tsv"),
("salmon.merged.gene_counts.tsv.gz", ".tsv.gz"),
("filename.v1.1.0.spatialdata.zarr", ".spatialdata.zarr"),
("filename.v1.1.0.anndata.zarr", ".anndata.zarr"),
]
for path, suffix in collection:
filepath = Path(path)
Expand Down

0 comments on commit b10f700

Please sign in to comment.