From 6fc087f8665a073d8d0bbdf76f04bd92458dd2f7 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Mon, 16 Dec 2024 21:19:13 -0500 Subject: [PATCH] Sync `DataFrame` `change_domain` with impl repo (#251) --- python-spec/src/somacore/data.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python-spec/src/somacore/data.py b/python-spec/src/somacore/data.py index a7badfe..b56df7d 100644 --- a/python-spec/src/somacore/data.py +++ b/python-spec/src/somacore/data.py @@ -11,6 +11,7 @@ Any, ClassVar, Iterator, + List, Optional, Sequence, Tuple, @@ -27,6 +28,9 @@ _RO_AUTO = options.ResultOrder.AUTO +AxisDomain = Union[None, Tuple[Any, Any], List[Any]] +Domain = Sequence[AxisDomain] + class DataFrame(base.SOMAObject, metaclass=abc.ABCMeta): """A multi-column table with a user-defined schema. @@ -173,7 +177,7 @@ def read( @abc.abstractmethod def change_domain( self, - newdomain: Optional[Sequence[Optional[Tuple[Any, Any]]]], + newdomain: Domain, check_only: bool = False, ) -> StatusAndReason: """Allows you to enlarge the domain of a SOMA :class:`DataFrame`, when