Skip to content

Commit 556ba6c

Browse files
committed
Expose measure_obs like make_palette: re-export from pl/__init__
Follow the established public-helper pattern (make_palette is defined under pl/ and re-exported in pl/__init__) rather than inventing a top-level spatialdata_plot.utils module. Public form: `from spatialdata_plot.pl import measure_obs`.
1 parent 3f072b5 commit 556ba6c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from ._palette import make_palette, make_palette_from_data
22
from .basic import PlotAccessor
3+
from .utils import measure_obs
34

45
__all__ = [
56
"PlotAccessor",
67
"make_palette",
78
"make_palette_from_data",
9+
"measure_obs",
810
]

tests/pl/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
from spatialdata.models import PointsModel, ShapesModel, TableModel
1313

1414
import spatialdata_plot
15+
from spatialdata_plot.pl import measure_obs
1516
from spatialdata_plot.pl.render_params import Color, ColorLike
1617
from spatialdata_plot.pl.utils import (
1718
_apply_cmap_alpha_to_datashader_result,
1819
_datashader_map_aggregate_to_color,
1920
_set_outline,
20-
measure_obs,
2121
set_zero_in_cmap_to_transparent,
2222
)
2323
from tests.conftest import DPI, PlotTester, PlotTesterMeta

0 commit comments

Comments
 (0)