Skip to content

Commit

Permalink
update log and api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
melonora committed Nov 21, 2024
1 parent 60c79a4 commit a235cc5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ and this project adheres to [Semantic Versioning][].

## [0.2.6] - TBD

### Added

- Added `set_channel_names` method to `SpatialData` to change the channel names of an
image element in `SpatialData`
- Added `write_channel_names` method to `SpatialData` to overwrite channel metadata on disk
without overwriting the image array itself.

### Changed

- `get_channels` is marked for deprecation in `SpatialData` v0.3.0. Function is replaced
by `get_channel_names`

### Fixed

- Updated deprecated default stages of `pre-commit` #771
Expand Down
2 changes: 2 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ The elements (building-blocks) that constitute `SpatialData`.
points_geopandas_to_dask_dataframe
points_dask_dataframe_to_geopandas
get_channels
get_channel_names
set_channel_names
force_2d
```

Expand Down
3 changes: 2 additions & 1 deletion src/spatialdata/models/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from spatialdata._logging import logger
from spatialdata._utils import _check_match_length_channels_c_dim
from spatialdata.models.models import Image2DModel, Image3DModel
from spatialdata.transformations.transformations import BaseTransformation

SpatialElement: TypeAlias = DataArray | DataTree | GeoDataFrame | DaskDataFrame
Expand All @@ -27,7 +28,7 @@
X = "x"

if TYPE_CHECKING:
from spatialdata.models.models import Image2DModel, Image3DModel, RasterSchema
from spatialdata.models.models import RasterSchema


# mypy says that we can't do isinstance(something, SpatialElement),
Expand Down

0 comments on commit a235cc5

Please sign in to comment.