Skip to content

Commit 03af4a5

Browse files
authored
Remove index_column as an option for the spatial dataframes (#248)
We may add the option to specify additional index columns back to the API in the future, but for the alpha release we would like to constain the spatial dataframes to only be index by spatial indices.
1 parent 99b22f9 commit 03af4a5

1 file changed

Lines changed: 12 additions & 20 deletions

File tree

python-spec/src/somacore/spatial.py

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def create(
6060
"x",
6161
"y",
6262
),
63-
index_column_names: Optional[Sequence[str]] = None,
6463
domain: Optional[Sequence[Optional[Tuple[Any, Any]]]] = None,
6564
platform_config: Optional[options.PlatformConfig] = None,
6665
context: Optional[Any] = None,
@@ -69,10 +68,14 @@ def create(
6968
7069
The schema of the created point cloud will include a column named
7170
``soma_joinid`` of type ``pyarrow.int64``, with negative values disallowed, and
72-
at least one axis with numeric type. If a ``soma_joinid`` column is
73-
present in the provided schema, it must be of the correct type. If the
74-
``soma_joinid`` column is not provided, one will be added. The ``soma_joinid``
75-
may be an index column. The axis columns must be index columns.
71+
at least one axis with numeric type. If a ``soma_joinid`` column is present in
72+
the provided schema, it must be of the correct type. If the ``soma_joinid``
73+
column is not provided, one will be added.
74+
75+
76+
The schema of the created point cloud must contain columns for the axes in the
77+
``coordinate_space``. These columns will be index columns for the point cloud
78+
dataframe.
7679
7780
Args:
7881
uri: The URI where the dataframe will be created.
@@ -82,11 +85,6 @@ def create(
8285
implementation, an error will be raised.
8386
coordinate_space: Either the coordinate space or the axis names for the
8487
coordinate space the point cloud is defined on.
85-
index_column_names: A list of column names to use as user-defined index
86-
columns (e.g., ``['x', 'y']``). Must include the axis names for all
87-
axes in the coordinate space. May include the ``soma_joinid``.
88-
Defaults to ``None`` which sets the index column names to be the
89-
``soma_joinid`` followed by the axis names for the coordinate space.
9088
domain: An optional sequence of tuples specifying the domain of each
9189
index column. Each tuple should be a pair consisting of the minimum
9290
and maximum values storable in the index column. If omitted entirely,
@@ -295,10 +293,6 @@ def create(
295293
"x",
296294
"y",
297295
),
298-
index_column_names: Sequence[str] = (
299-
options.SOMA_JOINID,
300-
options.SOMA_GEOMETRY,
301-
),
302296
domain: Optional[Sequence[Optional[Tuple[Any, Any]]]] = None,
303297
platform_config: Optional[options.PlatformConfig] = None,
304298
context: Optional[Any] = None,
@@ -311,8 +305,10 @@ def create(
311305
``pyarrow.large_binary``. If a ``soma_joinid`` column or ``soma_geometry``
312306
are present in the provided schema, they must be of the correct type. If
313307
either the ``soma_joinid`` column or ``soma_geometry`` column are not provided,
314-
one will be added. The ``soma_joinid`` may be an index column. The
315-
``soma_geometry`` column must be an index column.
308+
one will be added.
309+
310+
The geometry dataframe will be indexed using a spatial index for the
311+
``soma_geometry`` column.
316312
317313
Args:
318314
uri: The URI where the dataframe will be created.
@@ -322,10 +318,6 @@ def create(
322318
implementation, an error will be raised.
323319
coordinate_space: Either the coordinate space or the axis names for the
324320
coordinate space the point cloud is defined on.
325-
index_column_names: A list of column names to use as user-defined
326-
index columns (e.g., ``['cell_type', 'tissue_type']``).
327-
All named columns must exist in the schema, and at least one
328-
index column name is required.
329321
domain: An optional sequence of tuples specifying the domain of each
330322
index column. Two tuples must be provided for the ``soma_geometry``
331323
column which store the width followed by the height. Each tuple should

0 commit comments

Comments
 (0)