Skip to content

Commit

Permalink
Repace axis_name with coordinate_space in spatial dataframes
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-dark committed Oct 16, 2024
1 parent 255ba94 commit bdf2cf3
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions python-spec/src/somacore/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def create(
columns. If the schema includes types unsupported by the SOMA
implementation, an error will be raised.
coordinate_space: Either the coordinate space or the axis names for the
coordinate space.
coordinate space the point cloud is defined on.
index_column_names: A list of column names to use as user-defined index
columns (e.g., ``['x', 'y']``). Must include the axis names for all
axes in the coordinate space. May include the ``soma_joinid``.
Expand Down Expand Up @@ -246,15 +246,6 @@ def coordinate_space(self, value: coordinates.CoordinateSpace) -> None:
"""
raise NotImplementedError()

@property
@abc.abstractmethod
def axis_names(self) -> Tuple[str, ...]:
"""The names of the axes of the coordinate space the data is defined on.
Lifecycle: experimental
"""
raise NotImplementedError()

@property
@abc.abstractmethod
def domain(self) -> Tuple[Tuple[Any, Any], ...]:
Expand Down Expand Up @@ -293,7 +284,10 @@ def create(
options.SOMA_JOINID,
options.SOMA_GEOMETRY,
),
axis_names: Sequence[str] = ("x", "y"),
coordinate_space: Union[Sequence[str], coordinates.CoordinateSpace] = (
"x",
"y",
),
domain: Optional[Sequence[Optional[Tuple[Any, Any]]]] = None,
platform_config: Optional[options.PlatformConfig] = None,
context: Optional[Any] = None,
Expand All @@ -319,9 +313,8 @@ def create(
index columns (e.g., ``['cell_type', 'tissue_type']``).
All named columns must exist in the schema, and at least one
index column name is required.
axis_names: An ordered list of axis column names that correspond to the
names of the axes of the coordinate space the geometries are defined
on.
coordinate_space: Either the coordinate space or the axis names for the
coordinate space the point cloud is defined on.
domain: An optional sequence of tuples specifying the domain of each
index column. Two tuples must be provided for the ``soma_geometry``
column which store the width followed by the height. Each tuple should
Expand Down Expand Up @@ -465,15 +458,6 @@ def index_column_names(self) -> Tuple[str, ...]:
"""
raise NotImplementedError()

@property
@abc.abstractmethod
def axis_names(self) -> Tuple[str, ...]:
"""The names of the axes of the coordinate space the data is defined on.
Lifecycle: experimental
"""
raise NotImplementedError()

@property
@abc.abstractmethod
def coordinate_space(self) -> coordinates.CoordinateSpace:
Expand Down

0 comments on commit bdf2cf3

Please sign in to comment.