-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python][spatial] Implement Scene class in Python (#2485)
* Update somacore version for Python API and pre-commit to use GitHub commit/branch * Add Scene class to Python implementation * Use Scene in visium ingestion Co-authored-by: Paul Fisher <[email protected]> --------- Co-authored-by: Paul Fisher <[email protected]>
- Loading branch information
1 parent
3502218
commit f1985f7
Showing
12 changed files
with
130 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2024 TileDB, Inc. | ||
# | ||
# Licensed under the MIT License. | ||
|
||
"""Implementation of a SOMA Scene.""" | ||
|
||
|
||
from typing import Union | ||
|
||
from somacore import scene | ||
|
||
from ._collection import Collection, CollectionBase | ||
from ._dataframe import DataFrame | ||
from ._dense_nd_array import DenseNDArray | ||
from ._sparse_nd_array import SparseNDArray | ||
from ._tiledb_object import AnyTileDBObject | ||
|
||
|
||
class Scene( # type: ignore[misc] # __eq__ false positive | ||
CollectionBase[AnyTileDBObject], | ||
scene.Scene[ # type: ignore[type-var] | ||
Collection[ | ||
Union[DataFrame, DenseNDArray, SparseNDArray] | ||
], # not just DataFrame and NDArray since NDArray does not have a common `read` | ||
AnyTileDBObject, | ||
], | ||
): | ||
"""TODO: Add documentation for a Scene | ||
Lifecycle: | ||
Experimental. | ||
""" | ||
|
||
__slots__ = () | ||
|
||
_subclass_constrained_soma_types = { | ||
"exp": ("SOMACollection",), | ||
"ms": ("SOMACollection",), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters