Skip to content

Commit

Permalink
Trying to fix latest rename of Text -> Utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Sep 1, 2023
1 parent cf3b50f commit 2337c37
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/re_space_view_text_document/src/view_part_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use re_viewer_context::{

#[derive(Debug, Clone)]
pub struct TextDocumentEntry {
pub body: re_types::datatypes::Text,
pub body: re_types::datatypes::Utf8,
}

/// A text scene, with everything needed to render it.
Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rerun_py/rerun_sdk/rerun/_rerun2/datatypes/_overrides/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import pyarrow as pa

if TYPE_CHECKING:
from .. import TextArrayLike
from .. import Utf8ArrayLike


def text_native_to_pa_array(data: TextArrayLike, data_type: pa.DataType) -> pa.Array:
def text_native_to_pa_array(data: Utf8ArrayLike, data_type: pa.DataType) -> pa.Array:
if isinstance(data, str):
array = [data]
elif isinstance(data, Sequence):
Expand Down
6 changes: 3 additions & 3 deletions rerun_py/tests/unit/common_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ def colors_expected(empty: bool) -> Any:
return rrc.ColorArray.from_similar([] if empty else [0xAA0000CC, 0x00BB00DD])


labels_arrays: list[rrd.TextArrayLike | None] = [
labels_arrays: list[rrd.Utf8ArrayLike | None] = [
None,
[],
# TextArrayLike: Sequence[TextLike]: str
# Utf8ArrayLike: Sequence[TextLike]: str
["hello", "friend"],
# TextArrayLike: Sequence[TextLike]: Label
# Utf8ArrayLike: Sequence[TextLike]: Label
[
rrd.Text("hello"),
rrd.Text("friend"),
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/tests/unit/test_arrows3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_arrows3d() -> None:
origins = cast(Optional[rrd.Vec3DArrayLike], origins)
radii = cast(Optional[rrc.RadiusArrayLike], radii)
colors = cast(Optional[rrd.ColorArrayLike], colors)
labels = cast(Optional[rrd.TextArrayLike], labels)
labels = cast(Optional[rrd.Utf8ArrayLike], labels)
class_ids = cast(Optional[rrd.ClassIdArrayLike], class_ids)
instance_keys = cast(Optional[rrc.InstanceKeyArrayLike], instance_keys)

Expand Down
2 changes: 1 addition & 1 deletion rerun_py/tests/unit/test_line_strips2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_line_strips2d() -> None:
strips = cast(rrc.LineStrip2DArrayLike, strips)
radii = cast(Optional[rrc.RadiusArrayLike], radii)
colors = cast(Optional[rrd.ColorArrayLike], colors)
labels = cast(Optional[rrd.TextArrayLike], labels)
labels = cast(Optional[rrd.Utf8ArrayLike], labels)
draw_order = cast(Optional[rrc.DrawOrderArrayLike], draw_order)
class_ids = cast(Optional[rrd.ClassIdArrayLike], class_ids)
instance_keys = cast(Optional[rrc.InstanceKeyArrayLike], instance_keys)
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/tests/unit/test_line_strips3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_line_strips3d() -> None:
strips = cast(rrc.LineStrip3DArrayLike, strips)
radii = cast(Optional[rrc.RadiusArrayLike], radii)
colors = cast(Optional[rrd.ColorArrayLike], colors)
labels = cast(Optional[rrd.TextArrayLike], labels)
labels = cast(Optional[rrd.Utf8ArrayLike], labels)
class_ids = cast(Optional[rrd.ClassIdArrayLike], class_ids)
instance_keys = cast(Optional[rrc.InstanceKeyArrayLike], instance_keys)

Expand Down
2 changes: 1 addition & 1 deletion rerun_py/tests/unit/test_points2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_points2d() -> None:
points = cast(rrd.Vec2DArrayLike, points)
radii = cast(Optional[rrc.RadiusArrayLike], radii)
colors = cast(Optional[rrd.ColorArrayLike], colors)
labels = cast(Optional[rrd.TextArrayLike], labels)
labels = cast(Optional[rrd.Utf8ArrayLike], labels)
draw_order = cast(Optional[rrc.DrawOrderArrayLike], draw_order)
class_ids = cast(Optional[rrd.ClassIdArrayLike], class_ids)
keypoint_ids = cast(Optional[rrd.KeypointIdArrayLike], keypoint_ids)
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/tests/unit/test_points3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_points3d() -> None:
points = cast(rrd.Vec3DArrayLike, points)
radii = cast(Optional[rrc.RadiusArrayLike], radii)
colors = cast(Optional[rrd.ColorArrayLike], colors)
labels = cast(Optional[rrd.TextArrayLike], labels)
labels = cast(Optional[rrd.Utf8ArrayLike], labels)
class_ids = cast(Optional[rrd.ClassIdArrayLike], class_ids)
keypoint_ids = cast(Optional[rrd.KeypointIdArrayLike], keypoint_ids)
instance_keys = cast(Optional[rrc.InstanceKeyArrayLike], instance_keys)
Expand Down

0 comments on commit 2337c37

Please sign in to comment.