Skip to content

Commit

Permalink
update lifecycle tags (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Martin authored May 26, 2023
1 parent 581e813 commit 063aef6
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 57 deletions.
16 changes: 8 additions & 8 deletions python-spec/src/somacore/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def open(
platform_config: Platform configuration options specific to
this open operation.
Returns: The SOMA object, opened for reading.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -51,7 +51,7 @@ def exists(cls, uri: str, *, context: Optional[Any] = None) -> bool:
Returns:
True if the object exists and is of the correct type.
False if the object does not exist, or is of a different type.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -60,7 +60,7 @@ def exists(cls, uri: str, *, context: Optional[Any] = None) -> bool:
def uri(self) -> str:
"""The URI of this SOMA object.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -76,7 +76,7 @@ def context(self) -> Any:
from an existing SOMA object to be used in the creation of a new SOMA
object, it should not be inspected.
Lifecycle: experimental
Lifecycle: maturing
"""
return None

Expand All @@ -89,7 +89,7 @@ def metadata(self) -> MutableMapping[str, Any]:
and writes to it (provided the object is opened) are reflected in
storage.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -98,7 +98,7 @@ def metadata(self) -> MutableMapping[str, Any]:
def mode(self) -> options.OpenMode:
"""Returns the mode this object was opened in, either ``r`` or ``w``.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -107,7 +107,7 @@ def mode(self) -> options.OpenMode:
def closed(self) -> bool:
"""True if this object has been closed; False if still open.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -132,7 +132,7 @@ def close(self) -> None:
``__del__`` when this object is garbage collected, so the implementation
must be idempotent.
Lifecycle: experimental
Lifecycle: maturing
"""
# Default implementation does nothing.

Expand Down
16 changes: 8 additions & 8 deletions python-spec/src/somacore/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BaseCollection(
most generic, a Collection may contain any SOMA object, but a subclass
may specify that it is a Collection of a specific type of SOMA object.
Lifecycle: experimental
Lifecycle: maturing
"""

__slots__ = ()
Expand All @@ -43,7 +43,7 @@ def create(
uri: The URI where the collection will be created.
Returns:
The newly created collection, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand Down Expand Up @@ -135,7 +135,7 @@ def add_new_collection(
Returns:
The newly created collection, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -157,7 +157,7 @@ def add_new_dataframe(
Returns:
The newly created DataFrame, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -179,7 +179,7 @@ def add_new_dense_ndarray(
Returns:
The newly created dense NDArray, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -201,7 +201,7 @@ def add_new_sparse_ndarray(
Returns:
The newly created sparse NDArray, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand Down Expand Up @@ -242,15 +242,15 @@ def set(
Returns: ``self``, to enable method chaining.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()


class Collection(BaseCollection[_Elem]):
"""SOMA Collection imposing no semantics on the contained values.
Lifecycle: experimental
Lifecycle: maturing
"""

soma_type: Final = "SOMACollection" # type: ignore[misc]
Expand Down
44 changes: 22 additions & 22 deletions python-spec/src/somacore/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class DataFrame(base.SOMAObject, metaclass=abc.ABCMeta):
"""A multi-column table with a user-defined schema.
Lifecycle: experimental
Lifecycle: maturing
"""

__slots__ = ()
Expand Down Expand Up @@ -87,7 +87,7 @@ def create(
Returns:
The newly created dataframe, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand Down Expand Up @@ -155,7 +155,7 @@ def read(
sequence indexing. For instance, ``slice(-10, 3)`` indicates the range
from −10 to 3 on the given dimension.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -178,7 +178,7 @@ def write(
Returns: ``self``, to enable method chaining.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -189,7 +189,7 @@ def write(
def schema(self) -> pa.Schema:
"""The schema of the data in this dataframe.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -198,7 +198,7 @@ def schema(self) -> pa.Schema:
def index_column_names(self) -> Tuple[str, ...]:
"""The names of the index (dimension) columns.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -210,7 +210,7 @@ def domain(self) -> Tuple[Tuple[Any, Any], ...]:
Returns: a tuple of minimum and maximum values, inclusive,
storable on each index column of the dataframe.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand Down Expand Up @@ -252,7 +252,7 @@ def create(
Returns: The newly created array, opened for writing.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -263,15 +263,15 @@ def create(
def shape(self) -> Tuple[int, ...]:
"""The maximum capacity (domain) of each dimension of this array.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

@property
def ndim(self) -> int:
"""The number of dimensions in this array.
Lifecycle: experimental
Lifecycle: maturing
"""
return len(self.shape)

Expand All @@ -280,22 +280,22 @@ def ndim(self) -> int:
def schema(self) -> pa.Schema:
"""The schema of the data in this array.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

is_sparse: ClassVar[Literal[True, False]]
"""True if the array is sparse, False if it is dense.
Lifecycle: experimental
Lifecycle: maturing
"""


class DenseNDArray(NDArray, metaclass=abc.ABCMeta):
"""
An N-dimensional array stored densely.
Lifecycle: experimental
Lifecycle: maturing
"""

__slots__ = ()
Expand Down Expand Up @@ -351,7 +351,7 @@ def read(
starting from and including the value.
- Negative indexing is not supported.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -375,7 +375,7 @@ def write(
values: The values to be written to the subarray. Must have
the same shape as ``coords``, and matching type to the array.
Returns: ``self``, to enable method chaining.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -392,7 +392,7 @@ def write(
class SparseNDArray(NDArray, metaclass=abc.ABCMeta):
"""A N-dimensional array stored sparsely.
Lifecycle: experimental
Lifecycle: maturing
"""

__slots__ = ()
Expand Down Expand Up @@ -456,7 +456,7 @@ def read(
starting from and including the value.
- Negative indexing is not supported.
Lifecycle: experimental
Lifecycle: maturing
"""

@abc.abstractmethod
Expand All @@ -482,15 +482,15 @@ def write(
Returns: ``self``, to enable method chaining.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

@property
def nnz(self) -> int:
"""The number of values stored in the array, including explicit zeros.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -508,7 +508,7 @@ def nnz(self) -> int:
class ReadIter(Iterator[_T], metaclass=abc.ABCMeta):
"""SparseRead result iterator allowing users to flatten the iteration.
Lifecycle: experimental
Lifecycle: maturing
"""

__slots__ = ()
Expand All @@ -523,7 +523,7 @@ def concat(self) -> _T:
If some data has already been retrieved using ``next``, this will return
the remaining data, excluding that which as already been returned.
Lifecycle: experimental
Lifecycle: maturing
"""
raise NotImplementedError()

Expand All @@ -536,7 +536,7 @@ class SparseRead:
exception (likely a ``TypeError``) containing more specific information
about why the given format is not supported.
Lifecycle: experimental
Lifecycle: maturing
"""

__slots__ = ()
Expand Down
4 changes: 2 additions & 2 deletions python-spec/src/somacore/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Experiment(collection.BaseCollection[_RootSO], Generic[_DF, _MeasColl, _Ro
Within an experiment, a set of measurements on a single set of variables
(i.e., features) is represented as a :class:`~measurement.Measurement`.
Lifecycle: experimental
Lifecycle: maturing
"""

# This class is implemented as a mixin to be used with SOMA classes.
Expand Down Expand Up @@ -68,7 +68,7 @@ def axis_query(
See :class:`query.ExperimentAxisQuery` for details on usage.
Lifecycle: experimental
Lifecycle: maturing
"""
# mypy doesn't quite understand descriptors so it issues a spurious
# error here.
Expand Down
2 changes: 1 addition & 1 deletion python-spec/src/somacore/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Measurement(
along with those of the measurement's ``var`` dataframe (``varid``),
are the indices for all the other matrices stored in the measurement.
Lifecycle: experimental
Lifecycle: maturing
"""

# This class is implemented as a mixin to be used with SOMA classes.
Expand Down
2 changes: 1 addition & 1 deletion python-spec/src/somacore/query/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class AxisQuery:
AxisQuery(value_filter="tissue == 'lung'")
AxisQuery(coords=(slice(1,None),), value_filter="tissue == 'lung'")
Lifecycle: experimental
Lifecycle: maturing
"""

value_filter: Optional[str] = attrs.field(
Expand Down
Loading

0 comments on commit 063aef6

Please sign in to comment.