From a59280af9ba085aa6b1d2b9289030393ae41f190 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 4 Dec 2024 15:53:19 +0100 Subject: [PATCH] End-to-end tagging for everything Python --- .../src/codegen/python/mod.rs | 5 +- crates/store/re_chunk/src/chunk.rs | 18 +--- crates/top/rerun/src/commands/rrd/print.rs | 42 ++++++--- .../descriptors/descr_builtin_archetype.py | 12 +++ .../descriptors/descr_builtin_component.py | 12 +++ .../all/descriptors/descr_custom_archetype.py | 46 ++++++++++ .../all/descriptors/descr_custom_component.py | 32 +++++++ .../all/howto/any_batch_value_send_columns.py | 4 +- docs/snippets/all/tutorials/custom_data.py | 6 +- docs/snippets/snippets.toml | 15 +-- examples/cpp/dna/main.cpp | 3 +- rerun_py/rerun_sdk/rerun/__init__.py | 4 +- rerun_py/rerun_sdk/rerun/_baseclasses.py | 92 ++++++++++++++++--- rerun_py/rerun_sdk/rerun/_log.py | 23 +++-- rerun_py/rerun_sdk/rerun/_send_columns.py | 14 +-- rerun_py/rerun_sdk/rerun/any_value.py | 26 +++--- rerun_py/rerun_sdk/rerun/blueprint/api.py | 2 +- .../rerun/blueprint/components/active_tab.py | 3 +- .../blueprint/components/apply_latest_at.py | 3 +- .../rerun/blueprint/components/auto_layout.py | 3 +- .../blueprint/components/auto_space_views.py | 3 +- .../blueprint/components/background_kind.py | 3 +- .../blueprint/components/column_share.py | 3 +- .../components/component_column_selector.py | 5 +- .../blueprint/components/container_kind.py | 3 +- .../rerun/blueprint/components/corner2d.py | 3 +- .../blueprint/components/filter_by_range.py | 3 +- .../components/filter_is_not_null.py | 3 +- .../blueprint/components/grid_columns.py | 3 +- .../blueprint/components/included_content.py | 3 +- .../rerun/blueprint/components/interactive.py | 3 +- .../components/lock_range_during_zoom.py | 3 +- .../blueprint/components/map_provider.py | 3 +- .../rerun/blueprint/components/panel_state.py | 3 +- .../blueprint/components/query_expression.py | 3 +- .../blueprint/components/root_container.py | 3 +- .../rerun/blueprint/components/row_share.py | 3 +- .../blueprint/components/selected_columns.py | 3 +- .../blueprint/components/space_view_class.py | 3 +- .../components/space_view_maximized.py | 3 +- .../blueprint/components/space_view_origin.py | 3 +- .../tensor_dimension_index_slider.py | 5 +- .../blueprint/components/timeline_name.py | 3 +- .../rerun/blueprint/components/view_fit.py | 3 +- .../components/viewer_recommendation_hash.py | 5 +- .../rerun/blueprint/components/visible.py | 3 +- .../components/visible_time_range.py | 3 +- .../blueprint/components/visual_bounds2d.py | 3 +- .../components/visualizer_overrides.py | 3 +- .../rerun/blueprint/components/zoom_level.py | 3 +- .../rerun/components/aggregation_policy.py | 3 +- .../rerun/components/albedo_factor.py | 3 +- .../rerun/components/annotation_context.py | 3 +- .../rerun_sdk/rerun/components/axis_length.py | 3 +- rerun_py/rerun_sdk/rerun/components/blob.py | 3 +- .../rerun_sdk/rerun/components/class_id.py | 3 +- .../rerun/components/clear_is_recursive.py | 3 +- rerun_py/rerun_sdk/rerun/components/color.py | 3 +- .../rerun_sdk/rerun/components/colormap.py | 3 +- .../rerun_sdk/rerun/components/depth_meter.py | 3 +- .../rerun/components/disconnected_space.py | 3 +- .../rerun_sdk/rerun/components/draw_order.py | 3 +- .../rerun_sdk/rerun/components/entity_path.py | 3 +- .../rerun_sdk/rerun/components/fill_mode.py | 3 +- .../rerun_sdk/rerun/components/fill_ratio.py | 3 +- .../rerun/components/gamma_correction.py | 3 +- .../rerun/components/geo_line_string.py | 3 +- .../rerun_sdk/rerun/components/graph_edge.py | 3 +- .../rerun_sdk/rerun/components/graph_node.py | 3 +- .../rerun_sdk/rerun/components/graph_type.py | 3 +- .../rerun_sdk/rerun/components/half_size2d.py | 3 +- .../rerun_sdk/rerun/components/half_size3d.py | 3 +- .../rerun/components/image_buffer.py | 3 +- .../rerun/components/image_format.py | 3 +- .../rerun/components/image_plane_distance.py | 3 +- .../rerun_sdk/rerun/components/keypoint_id.py | 3 +- .../rerun_sdk/rerun/components/lat_lon.py | 3 +- rerun_py/rerun_sdk/rerun/components/length.py | 3 +- .../rerun/components/line_strip2d.py | 3 +- .../rerun/components/line_strip3d.py | 3 +- .../rerun/components/magnification_filter.py | 3 +- .../rerun/components/marker_shape.py | 3 +- .../rerun_sdk/rerun/components/marker_size.py | 3 +- .../rerun_sdk/rerun/components/media_type.py | 3 +- rerun_py/rerun_sdk/rerun/components/name.py | 3 +- .../rerun_sdk/rerun/components/opacity.py | 3 +- .../rerun/components/pinhole_projection.py | 3 +- .../components/pose_rotation_axis_angle.py | 3 +- .../rerun/components/pose_rotation_quat.py | 3 +- .../rerun/components/pose_scale3d.py | 3 +- .../rerun/components/pose_transform_mat3x3.py | 3 +- .../rerun/components/pose_translation3d.py | 3 +- .../rerun_sdk/rerun/components/position2d.py | 3 +- .../rerun_sdk/rerun/components/position3d.py | 3 +- rerun_py/rerun_sdk/rerun/components/radius.py | 3 +- .../rerun_sdk/rerun/components/range1d.py | 3 +- .../rerun/components/recording_uri.py | 3 +- .../rerun_sdk/rerun/components/resolution.py | 3 +- .../rerun/components/rotation_axis_angle.py | 3 +- .../rerun/components/rotation_quat.py | 3 +- rerun_py/rerun_sdk/rerun/components/scalar.py | 3 +- .../rerun_sdk/rerun/components/scale3d.py | 3 +- .../rerun_sdk/rerun/components/show_labels.py | 3 +- .../rerun/components/stroke_width.py | 3 +- .../rerun_sdk/rerun/components/tensor_data.py | 3 +- .../tensor_dimension_index_selection.py | 3 +- .../components/tensor_height_dimension.py | 3 +- .../components/tensor_width_dimension.py | 3 +- .../rerun_sdk/rerun/components/texcoord2d.py | 3 +- rerun_py/rerun_sdk/rerun/components/text.py | 3 +- .../rerun/components/text_log_level.py | 3 +- .../rerun/components/transform_mat3x3.py | 3 +- .../rerun/components/transform_relation.py | 3 +- .../rerun/components/translation3d.py | 3 +- .../rerun/components/triangle_indices.py | 3 +- .../rerun_sdk/rerun/components/value_range.py | 3 +- .../rerun_sdk/rerun/components/vector2d.py | 3 +- .../rerun_sdk/rerun/components/vector3d.py | 3 +- .../rerun/components/video_timestamp.py | 3 +- .../rerun/components/view_coordinates.py | 3 +- rerun_py/src/arrow.rs | 81 +++++++++++----- rerun_py/src/video.rs | 10 +- .../test_types/components/affix_fuzzer1.py | 3 +- .../test_types/components/affix_fuzzer10.py | 3 +- .../test_types/components/affix_fuzzer11.py | 3 +- .../test_types/components/affix_fuzzer12.py | 3 +- .../test_types/components/affix_fuzzer13.py | 3 +- .../test_types/components/affix_fuzzer14.py | 3 +- .../test_types/components/affix_fuzzer15.py | 3 +- .../test_types/components/affix_fuzzer16.py | 3 +- .../test_types/components/affix_fuzzer17.py | 3 +- .../test_types/components/affix_fuzzer18.py | 3 +- .../test_types/components/affix_fuzzer19.py | 3 +- .../test_types/components/affix_fuzzer2.py | 3 +- .../test_types/components/affix_fuzzer20.py | 3 +- .../test_types/components/affix_fuzzer21.py | 3 +- .../test_types/components/affix_fuzzer22.py | 3 +- .../test_types/components/affix_fuzzer23.py | 3 +- .../test_types/components/affix_fuzzer3.py | 3 +- .../test_types/components/affix_fuzzer4.py | 3 +- .../test_types/components/affix_fuzzer5.py | 3 +- .../test_types/components/affix_fuzzer6.py | 3 +- .../test_types/components/affix_fuzzer7.py | 3 +- .../test_types/components/affix_fuzzer8.py | 3 +- .../test_types/components/affix_fuzzer9.py | 3 +- 145 files changed, 579 insertions(+), 252 deletions(-) create mode 100644 docs/snippets/all/descriptors/descr_builtin_archetype.py create mode 100644 docs/snippets/all/descriptors/descr_builtin_component.py create mode 100644 docs/snippets/all/descriptors/descr_custom_archetype.py create mode 100644 docs/snippets/all/descriptors/descr_custom_component.py diff --git a/crates/build/re_types_builder/src/codegen/python/mod.rs b/crates/build/re_types_builder/src/codegen/python/mod.rs index fac471eeb0733..6688257bc2301 100644 --- a/crates/build/re_types_builder/src/codegen/python/mod.rs +++ b/crates/build/re_types_builder/src/codegen/python/mod.rs @@ -409,6 +409,7 @@ impl PythonCodeGenerator { Archetype, BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from {rerun_path}_converters import ( @@ -1926,7 +1927,7 @@ fn quote_arrow_support_from_obj( r#" class {extension_batch}{batch_superclass_decl}: _ARROW_DATATYPE = {datatype} - _COMPONENT_NAME: str = "{fqname}" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("{fqname}") @staticmethod def _native_to_pa_array(data: {many_aliases}, data_type: pa.DataType) -> pa.Array: @@ -1939,7 +1940,7 @@ fn quote_arrow_support_from_obj( unindent(&format!( r#" class {extension_batch}{batch_superclass_decl}: - _COMPONENT_NAME: str = "{fqname}" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("{fqname}") "# )) } diff --git a/crates/store/re_chunk/src/chunk.rs b/crates/store/re_chunk/src/chunk.rs index 710068fcb1183..58af990a5ba9e 100644 --- a/crates/store/re_chunk/src/chunk.rs +++ b/crates/store/re_chunk/src/chunk.rs @@ -284,23 +284,7 @@ impl Chunk { .collect(); timelines == rhs_timelines } - // TODO(cmc): we cannot compare tags yet, need to support Python & C++ first - // && *components == rhs.components - && { - let lhs_components_no_tags: ChunkComponents = components - .clone() - .into_iter_flattened() - .map(|(descr, list_array)| (ComponentDescriptor::new(descr.component_name), list_array)) - .collect(); - let rhs_components_no_tags: ChunkComponents = rhs - .components - .clone() - .into_iter_flattened() - .map(|(descr, list_array)| (ComponentDescriptor::new(descr.component_name), list_array)) - .collect(); - - lhs_components_no_tags == rhs_components_no_tags - } + && *components == rhs.components } /// Check for equality while ignoring possible `Extension` type information diff --git a/crates/top/rerun/src/commands/rrd/print.rs b/crates/top/rerun/src/commands/rrd/print.rs index e1ec9ab645889..18db6d54cef0e 100644 --- a/crates/top/rerun/src/commands/rrd/print.rs +++ b/crates/top/rerun/src/commands/rrd/print.rs @@ -1,5 +1,5 @@ use anyhow::Context; -use itertools::Itertools as _; +use itertools::Itertools; use re_log_types::{LogMsg, SetStoreInfo}; use re_sdk::log::Chunk; @@ -15,8 +15,10 @@ pub struct PrintCommand { path_to_input_rrds: Vec, /// If set, print out table contents. - #[clap(long, short, default_value_t = false)] - verbose: bool, + /// + /// This can be specified more than once to toggle more and more verbose levels (e.g. -vvv). + #[clap(long, short, action = clap::ArgAction::Count)] + verbose: u8, /// If set, will try to proceed even in the face of IO and/or decoding errors in the input data. #[clap(long = "continue-on-error", default_value_t = true)] @@ -63,7 +65,7 @@ impl PrintCommand { } } -fn print_msg(verbose: bool, msg: LogMsg) -> anyhow::Result<()> { +fn print_msg(verbose: u8, msg: LogMsg) -> anyhow::Result<()> { match msg { LogMsg::SetStoreInfo(msg) => { let SetStoreInfo { row_id: _, info } = msg; @@ -73,21 +75,31 @@ fn print_msg(verbose: bool, msg: LogMsg) -> anyhow::Result<()> { LogMsg::ArrowMsg(_row_id, arrow_msg) => { let chunk = Chunk::from_arrow_msg(&arrow_msg).context("skipped corrupt chunk")?; - if verbose { - println!("{chunk}"); - } else { + print!( + "Chunk({}) with {} rows ({}) - {:?} - ", + chunk.id(), + chunk.num_rows(), + re_format::format_bytes(chunk.total_size_bytes() as _), + chunk.entity_path(), + ); + + if verbose == 0 { let column_names = chunk .component_names() .map(|name| name.short_name()) .join(" "); - - println!( - "Chunk({}) with {} rows ({}) - {:?} - columns: [{column_names}]", - chunk.id(), - chunk.num_rows(), - re_format::format_bytes(chunk.total_size_bytes() as _), - chunk.entity_path(), - ); + println!("columns: [{column_names}]"); + } else if verbose == 1 { + let column_descriptors = chunk + .component_descriptors() + .map(|descr| descr.short_name()) + .collect_vec() + .join(" "); + println!("columns: [{column_descriptors}]",); + } else if verbose == 2 { + println!("\n{}", chunk.emptied()); // headers only + } else { + println!("\n{chunk}"); } } diff --git a/docs/snippets/all/descriptors/descr_builtin_archetype.py b/docs/snippets/all/descriptors/descr_builtin_archetype.py new file mode 100644 index 0000000000000..750caf41ad182 --- /dev/null +++ b/docs/snippets/all/descriptors/descr_builtin_archetype.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +import rerun as rr # pip install rerun-sdk + +rr.init("rerun_example_descriptors_builtin_archetype") +rr.spawn() + +rr.log("data", rr.Points3D([[1, 2, 3]], radii=[0.3, 0.2, 0.1]), static=True) + +# The tags are indirectly checked by the Rust version (have a look over there for more info). diff --git a/docs/snippets/all/descriptors/descr_builtin_component.py b/docs/snippets/all/descriptors/descr_builtin_component.py new file mode 100644 index 0000000000000..7b206526066ec --- /dev/null +++ b/docs/snippets/all/descriptors/descr_builtin_component.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +import rerun as rr # pip install rerun-sdk + +rr.init("rerun_example_descriptors_builtin_component") +rr.spawn() + +rr.log("data", [rr.components.Position3DBatch([1, 2, 3])], static=True) + +# The tags are indirectly checked by the Rust version (have a look over there for more info). diff --git a/docs/snippets/all/descriptors/descr_custom_archetype.py b/docs/snippets/all/descriptors/descr_custom_archetype.py new file mode 100644 index 0000000000000..e807efca3f7d3 --- /dev/null +++ b/docs/snippets/all/descriptors/descr_custom_archetype.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +from typing import Any, Iterable + +import numpy.typing as npt +import pyarrow as pa +import rerun as rr # pip install rerun-sdk + + +class CustomPosition3DBatch(rr.ComponentBatchLike): + def __init__(self: Any, position: rr.components.Position3DBatch) -> None: + self.position = position + + def component_descriptor(self) -> rr.ComponentDescriptor: + return rr.ComponentDescriptor( + "user.CustomPosition3D", + archetype_name="user.CustomArchetype", + archetype_field_name="user.CustomArchetypeField", + ) + + def as_arrow_array(self) -> pa.Array: + return self.position.as_arrow_array() + + +class CustomPoints3D(rr.AsComponents): + def __init__(self: Any, positions: npt.ArrayLike, colors: npt.ArrayLike) -> None: + self.positions = positions + self.colors = colors + + def as_component_batches(self) -> Iterable[rr.ComponentBatchLike]: + return ( + [rr.IndicatorComponentBatch("user.CustomArchetype")] + + [CustomPosition3DBatch(rr.components.Position3DBatch(self.positions))] + + [rr.components.ColorBatch(self.colors)] + ) + + +rr.init("rerun_example_descriptors_custom_archetype") +rr.spawn() + +position = CustomPosition3DBatch(rr.components.Position3DBatch([1, 2, 3])) +rr.log("data", [position], static=True) + +# The tags are indirectly checked by the Rust version (have a look over there for more info). diff --git a/docs/snippets/all/descriptors/descr_custom_component.py b/docs/snippets/all/descriptors/descr_custom_component.py new file mode 100644 index 0000000000000..78239180cb1f0 --- /dev/null +++ b/docs/snippets/all/descriptors/descr_custom_component.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +from typing import Any + +import pyarrow as pa +import rerun as rr # pip install rerun-sdk + + +class CustomPosition3DBatch(rr.ComponentBatchLike): + def __init__(self: Any, position: rr.components.Position3DBatch) -> None: + self.position = position + + def component_descriptor(self) -> rr.ComponentDescriptor: + return rr.ComponentDescriptor( + "user.CustomPosition3D", + archetype_name="user.CustomArchetype", + archetype_field_name="user.CustomArchetypeField", + ) + + def as_arrow_array(self) -> pa.Array: + return self.position.as_arrow_array() + + +rr.init("rerun_example_descriptors_custom_component") +rr.spawn() + +position = CustomPosition3DBatch(rr.components.Position3DBatch([1, 2, 3])) +rr.log("data", [position], static=True) + +# The tags are indirectly checked by the Rust version (have a look over there for more info). diff --git a/docs/snippets/all/howto/any_batch_value_send_columns.py b/docs/snippets/all/howto/any_batch_value_send_columns.py index 5719eac824064..0181704360a48 100644 --- a/docs/snippets/all/howto/any_batch_value_send_columns.py +++ b/docs/snippets/all/howto/any_batch_value_send_columns.py @@ -17,8 +17,8 @@ times=[rr.TimeSequenceColumn("step", timestamps)], components=[ # log one value per timestamp - rr.AnyBatchValue("custom_component_single", one_per_timestamp), + rr.AnyBatchValue(rr.ComponentDescriptor("custom_component_single"), one_per_timestamp), # log ten values per timestamp - rr.AnyBatchValue("custom_component_multi", ten_per_timestamp).partition([10] * N), + rr.AnyBatchValue(rr.ComponentDescriptor("custom_component_multi"), ten_per_timestamp).partition([10] * N), ], ) diff --git a/docs/snippets/all/tutorials/custom_data.py b/docs/snippets/all/tutorials/custom_data.py index 2e5661f15cd5d..651fd0041d2e8 100755 --- a/docs/snippets/all/tutorials/custom_data.py +++ b/docs/snippets/all/tutorials/custom_data.py @@ -18,9 +18,9 @@ class ConfidenceBatch(rr.ComponentBatchLike): def __init__(self: Any, confidence: npt.ArrayLike) -> None: self.confidence = confidence - def component_name(self) -> str: - """The name of the custom component.""" - return "user.Confidence" + def component_descriptor(self) -> rr.ComponentDescriptor: + """The descriptor of the custom component.""" + return rr.ComponentDescriptor("user.Confidence") def as_arrow_array(self) -> pa.Array: """The arrow batch representing the custom component.""" diff --git a/docs/snippets/snippets.toml b/docs/snippets/snippets.toml index f987c11370b80..d2eddf3d904bf 100644 --- a/docs/snippets/snippets.toml +++ b/docs/snippets/snippets.toml @@ -54,23 +54,10 @@ "cpp", "rust", ] -"descriptors/descr_builtin_archetype" = [ # Python and C++ not yet supported (next PRs) - "py", -] -"descriptors/descr_builtin_component" = [ # Python and C++ not yet supported (next PRs) - "py", -] -"descriptors/descr_custom_archetype" = [ # Python and C++ not yet supported (next PRs) - "py", -] -"descriptors/descr_custom_component" = [ # Python and C++ not yet supported (next PRs) - "py", -] -views = [ +"views" = [ "cpp", # TODO(#5520): C++ views are not yet implemented "rust", # TODO(#5521): Rust views are not yet implemented ] - "archetypes/image_advanced" = [ "cpp", # Missing examples "rust", # Missing examples diff --git a/examples/cpp/dna/main.cpp b/examples/cpp/dna/main.cpp index 25b50981fdca5..a04827d8a3318 100644 --- a/examples/cpp/dna/main.cpp +++ b/examples/cpp/dna/main.cpp @@ -12,7 +12,8 @@ static constexpr size_t NUM_POINTS = 100; int main() { const auto rec = rerun::RecordingStream("rerun_example_dna_abacus"); - rec.spawn().exit_on_failure(); + // rec.spawn().exit_on_failure(); + rec.save("/tmp/dna.rrd").exit_on_failure(); std::vector points1, points2; std::vector colors1, colors2; diff --git a/rerun_py/rerun_sdk/rerun/__init__.py b/rerun_py/rerun_sdk/rerun/__init__.py index 2003fa3f4d9c8..2eaa3b0bc36d0 100644 --- a/rerun_py/rerun_sdk/rerun/__init__.py +++ b/rerun_py/rerun_sdk/rerun/__init__.py @@ -32,9 +32,7 @@ notebook as notebook, remote as remote, ) -from ._baseclasses import ( - ComponentColumn as ComponentColumn, -) +from ._baseclasses import ComponentColumn as ComponentColumn, ComponentDescriptor as ComponentDescriptor from ._image_encoded import ( ImageEncoded as ImageEncoded, ImageFormat as ImageFormat, diff --git a/rerun_py/rerun_sdk/rerun/_baseclasses.py b/rerun_py/rerun_sdk/rerun/_baseclasses.py index d2b0e58a2d6a2..3654444150467 100644 --- a/rerun_py/rerun_sdk/rerun/_baseclasses.py +++ b/rerun_py/rerun_sdk/rerun/_baseclasses.py @@ -12,11 +12,43 @@ T = TypeVar("T") +# TODO: docs (copy from rust, probably) +# TODO: the fact that this thing is nor interned and is recomputed/realloc'd for each +# log call is pretty shit? then again I guess this is just as true for the arrow datatypes we +# keep passing around... and the same is true for rust... (i think cpp caches all of this?) +# TODO: with_methods +class ComponentDescriptor: + def __init__( + self, + component_name: str, + *, + archetype_name: str | None = None, + archetype_field_name: str | None = None, + ) -> None: + self.archetype_name = archetype_name + self.archetype_field_name = archetype_field_name + self.component_name = component_name + + def __str__(self) -> str: + archetype_name = self.archetype_name + archetype_field_name = self.archetype_field_name + component_name = self.component_name + + if archetype_name is not None and archetype_field_name is None: + return f"{archetype_name}:{component_name}" + elif archetype_name is None and archetype_field_name is not None: + return f"{component_name}#{archetype_field_name}" + elif archetype_name is not None and archetype_field_name is not None: + return f"{archetype_name}:{component_name}#{archetype_field_name}" + + return component_name + + class ComponentBatchLike(Protocol): """Describes interface for objects that can be converted to batch of rerun Components.""" - def component_name(self) -> str: - """Returns the name of the component.""" + def component_descriptor(self) -> ComponentDescriptor: + """Returns the complete descriptor of the component.""" ... def as_arrow_array(self) -> pa.Array: @@ -24,6 +56,32 @@ def as_arrow_array(self) -> pa.Array: ... +# TODO: document that its job is to override. +class DescribedComponentBatch: + """A `ComponentBatchLike` object with its associated `ComponentDescriptor`.""" + + def __init__(self, batch: ComponentBatchLike, descriptor: ComponentDescriptor): + self._batch = batch + self._descriptor = descriptor + + def component_descriptor(self) -> ComponentDescriptor: + """ + Returns the complete descriptor of the component. + + Part of the `ComponentBatchLike` logging interface. + """ + return self._descriptor + + def as_arrow_array(self) -> pa.Array: + """ + Returns a `pyarrow.Array` of the component data. + + Part of the `ComponentBatchLike` logging interface. + """ + return self._batch.as_arrow_array() + + +# TODO: document that this is where overrides happen (and do so in C++ do -- should already be done in Rust) class AsComponents(Protocol): """ Describes interface for interpreting an object as a bundle of Components. @@ -37,8 +95,7 @@ def as_component_batches(self) -> Iterable[ComponentBatchLike]: """ Returns an iterable of `ComponentBatchLike` objects. - Each object in the iterable must adhere to the `ComponentBatchLike` - interface. + Each object in the iterable must adhere to the `ComponentBatchLike` interface. """ ... @@ -107,7 +164,12 @@ def as_component_batches(self) -> Iterable[ComponentBatchLike]: # TODO(#3381): Depending on what we decide # to do with optional components, we may need to make this instead call `_empty_pa_array` if comp is not None: - yield comp + descr = ComponentDescriptor( + comp.component_descriptor().component_name, + archetype_name=self.archetype_name(), + archetype_field_name=fld.name, + ) + yield DescribedComponentBatch(comp, descr) __repr__ = __str__ @@ -260,13 +322,13 @@ def __init__(self, component_batch: ComponentBatchLike, lengths: npt.ArrayLike): self.component_batch = component_batch self.lengths = lengths - def component_name(self) -> str: + def component_descriptor(self) -> ComponentDescriptor: """ - The name of the component. + Returns the complete descriptor of the component. Part of the `ComponentBatchLike` logging interface. """ - return self.component_batch.component_name() + return self.component_batch.component_descriptor() def as_arrow_array(self) -> pa.Array: """ @@ -280,13 +342,13 @@ def as_arrow_array(self) -> pa.Array: class ComponentBatchMixin(ComponentBatchLike): - def component_name(self) -> str: + def component_descriptor(self) -> ComponentDescriptor: """ - The name of the component. + Returns the complete descriptor of the component. Part of the `ComponentBatchLike` logging interface. """ - return self._COMPONENT_NAME # type: ignore[attr-defined, no-any-return] + return self._COMPONENT_DESCRIPTOR # type: ignore[attr-defined, no-any-return] def partition(self, lengths: npt.ArrayLike) -> ComponentColumn: """ @@ -310,7 +372,7 @@ def partition(self, lengths: npt.ArrayLike) -> ComponentColumn: class ComponentMixin(ComponentBatchLike): """ - Makes components adhere to the ComponentBatchLike interface. + Makes components adhere to the `ComponentBatchLike` interface. A single component will always map to a batch of size 1. @@ -326,13 +388,13 @@ def arrow_type(cls) -> pa.DataType: """ return cls._BATCH_TYPE._ARROW_DATATYPE # type: ignore[attr-defined, no-any-return] - def component_name(self) -> str: + def component_descriptor(self) -> ComponentDescriptor: """ - The name of the component. + Returns the complete descriptor of the component. Part of the `ComponentBatchLike` logging interface. """ - return self._BATCH_TYPE._COMPONENT_NAME # type: ignore[attr-defined, no-any-return] + return self._BATCH_TYPE._COMPONENT_DESCRIPTOR # type: ignore[attr-defined, no-any-return] def as_arrow_array(self) -> pa.Array: """ diff --git a/rerun_py/rerun_sdk/rerun/_log.py b/rerun_py/rerun_sdk/rerun/_log.py index f316b45371aaa..5d34f608a45e8 100644 --- a/rerun_py/rerun_sdk/rerun/_log.py +++ b/rerun_py/rerun_sdk/rerun/_log.py @@ -6,7 +6,7 @@ import pyarrow as pa import rerun_bindings as bindings -from ._baseclasses import AsComponents, ComponentBatchLike +from ._baseclasses import AsComponents, ComponentBatchLike, ComponentDescriptor from .error_utils import _send_warning_or_raise, catch_and_log_exceptions from .recording_stream import RecordingStream @@ -43,6 +43,12 @@ def component_name(self) -> str: def as_arrow_array(self) -> pa.Array: return self.data + def component_descriptor(self) -> ComponentDescriptor: + return ComponentDescriptor( + self.component_name(), + archetype_name=self._archetype_name, + ) + @catch_and_log_exceptions() def log( @@ -183,6 +189,7 @@ def log( ) +# TODO: tu degages @catch_and_log_exceptions() def log_components( entity_path: str | list[str], @@ -253,11 +260,11 @@ def log_components( ) static = True - instanced: dict[str, pa.Array] = {} + instanced: dict[ComponentDescriptor, pa.Array] = {} components = list(components) - names = [comp.component_name() for comp in components] + descriptors = [comp.component_descriptor() for comp in components] arrow_arrays = [comp.as_arrow_array() for comp in components] if num_instances is None: @@ -268,7 +275,7 @@ def log_components( added = set() - for name, array in zip(names, arrow_arrays): + for descr, array in zip(descriptors, arrow_arrays): # Array could be None if there was an error producing the empty array # Nothing we can do at this point other than ignore it. Some form of error # should have been logged. @@ -276,16 +283,16 @@ def log_components( continue # Skip components which were logged multiple times. - if name in added: + if descr in added: _send_warning_or_raise( - f"Component {name} was included multiple times. Only the first instance will be used.", + f"Component {descr} was included multiple times. Only the first instance will be used.", depth_to_user_code=1, ) continue else: - added.add(name) + added.add(descr) - instanced[name] = array + instanced[descr] = array bindings.log_arrow_msg( # pyright: ignore[reportGeneralTypeIssues] entity_path, diff --git a/rerun_py/rerun_sdk/rerun/_send_columns.py b/rerun_py/rerun_sdk/rerun/_send_columns.py index f180b498d7c10..888ff21d66484 100644 --- a/rerun_py/rerun_sdk/rerun/_send_columns.py +++ b/rerun_py/rerun_sdk/rerun/_send_columns.py @@ -5,7 +5,7 @@ import pyarrow as pa import rerun_bindings as bindings -from ._baseclasses import Archetype, ComponentBatchLike, ComponentBatchMixin, ComponentColumn +from ._baseclasses import Archetype, ComponentBatchLike, ComponentBatchMixin, ComponentColumn, ComponentDescriptor from ._log import IndicatorComponentBatch from .any_value import AnyBatchValue from .error_utils import catch_and_log_exceptions @@ -217,12 +217,12 @@ def send_columns( indicators = [] - components_args = {} + components_args: dict[ComponentDescriptor, pa.Array] = {} for c in components: if isinstance(c, IndicatorComponentBatch): indicators.append(c) continue - component_name = c.component_name() + component_descr = c.component_descriptor() if isinstance(c, ComponentColumn): component_column = c @@ -231,7 +231,7 @@ def send_columns( elif isinstance(c, AnyBatchValue): array = c.as_arrow_array() if array is None: - raise ValueError(f"Expected a non-null value for component: {component_name}") + raise ValueError(f"Expected a non-null value for component: {component_descr}") component_column = c.partition([1] * len(c.as_arrow_array())) # type: ignore[arg-type] else: raise TypeError( @@ -243,16 +243,16 @@ def send_columns( expected_length = len(arrow_list_array) elif len(arrow_list_array) != expected_length: raise ValueError( - f"All times and components in a batch must have the same length. Expected length: {expected_length} but got: {len(arrow_list_array)} for component: {component_name}" + f"All times and components in a batch must have the same length. Expected length: {expected_length} but got: {len(arrow_list_array)} for component: {component_descr}" ) - components_args[component_name] = arrow_list_array + components_args[component_descr] = arrow_list_array for i in indicators: if expected_length is None: expected_length = 1 - components_args[i.component_name()] = pa.nulls(expected_length, type=pa.null()) + components_args[i.component_descriptor()] = pa.nulls(expected_length, type=pa.null()) bindings.send_arrow_chunk( entity_path, diff --git a/rerun_py/rerun_sdk/rerun/any_value.py b/rerun_py/rerun_sdk/rerun/any_value.py index f8bcf7d574773..9af19f15ea595 100644 --- a/rerun_py/rerun_sdk/rerun/any_value.py +++ b/rerun_py/rerun_sdk/rerun/any_value.py @@ -6,11 +6,13 @@ import numpy.typing as npt import pyarrow as pa +from rerun._baseclasses import ComponentDescriptor + from . import ComponentColumn from ._log import AsComponents, ComponentBatchLike from .error_utils import catch_and_log_exceptions -ANY_VALUE_TYPE_REGISTRY: dict[str, Any] = {} +ANY_VALUE_TYPE_REGISTRY: dict[ComponentDescriptor, Any] = {} class AnyBatchValue(ComponentBatchLike): @@ -23,7 +25,7 @@ class AnyBatchValue(ComponentBatchLike): See also [rerun.AnyValues][]. """ - def __init__(self, name: str, value: Any, drop_untyped_nones: bool = True) -> None: + def __init__(self, descriptor: ComponentDescriptor, value: Any, drop_untyped_nones: bool = True) -> None: """ Construct a new AnyBatchValue. @@ -51,8 +53,8 @@ def __init__(self, name: str, value: Any, drop_untyped_nones: bool = True) -> No Parameters ---------- - name: - The name of the component. + descriptor: + The descriptor of the component. value: The data to be logged as a component. drop_untyped_nones: @@ -60,12 +62,12 @@ def __init__(self, name: str, value: Any, drop_untyped_nones: bool = True) -> No previously logged with a type. """ - np_type, pa_type = ANY_VALUE_TYPE_REGISTRY.get(name, (None, None)) + np_type, pa_type = ANY_VALUE_TYPE_REGISTRY.get(descriptor, (None, None)) - self.name = name + self.descriptor = descriptor self.pa_array = None - with catch_and_log_exceptions(f"Converting data for '{name}'"): + with catch_and_log_exceptions(f"Converting data for '{descriptor}'"): if isinstance(value, pa.Array): self.pa_array = value elif hasattr(value, "as_arrow_array"): @@ -83,13 +85,13 @@ def __init__(self, name: str, value: Any, drop_untyped_nones: bool = True) -> No else: np_value = np.atleast_1d(np.array(value, copy=False)) self.pa_array = pa.array(np_value) - ANY_VALUE_TYPE_REGISTRY[name] = (np_value.dtype, self.pa_array.type) + ANY_VALUE_TYPE_REGISTRY[descriptor] = (np_value.dtype, self.pa_array.type) def is_valid(self) -> bool: return self.pa_array is not None - def component_name(self) -> str: - return self.name + def component_descriptor(self) -> ComponentDescriptor: + return self.descriptor def as_arrow_array(self) -> pa.Array | None: return self.pa_array @@ -182,7 +184,9 @@ def __init__(self, drop_untyped_nones: bool = True, **kwargs: Any) -> None: with catch_and_log_exceptions(self.__class__.__name__): for name, value in kwargs.items(): - batch = AnyBatchValue(name, value, drop_untyped_nones=drop_untyped_nones) + # TODO: eeeeeeeeeeeeeeeeh + descriptor = ComponentDescriptor(name) + batch = AnyBatchValue(descriptor, value, drop_untyped_nones=drop_untyped_nones) if batch.is_valid(): self.component_batches.append(batch) diff --git a/rerun_py/rerun_sdk/rerun/blueprint/api.py b/rerun_py/rerun_sdk/rerun/blueprint/api.py index 46485ca52358b..b47e4d7112e15 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/api.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/api.py @@ -136,7 +136,7 @@ def _log_to_stream(self, stream: RecordingStream) -> None: for default in self.defaults: if hasattr(default, "as_component_batches"): stream.log(f"{self.blueprint_path()}/defaults", default, recording=stream) # type: ignore[attr-defined] - elif hasattr(default, "component_name"): + elif hasattr(default, "component_descriptor"): # TODO: ???? stream.log(f"{self.blueprint_path()}/defaults", [default], recording=stream) # type: ignore[attr-defined] else: raise ValueError(f"Provided default: {default} is neither a component nor a component batch.") diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/active_tab.py b/rerun_py/rerun_sdk/rerun/blueprint/components/active_tab.py index 0eeeb1395a043..c5bd2d677ecb5 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/active_tab.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/active_tab.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ActiveTab(datatypes.EntityPath, ComponentMixin): class ActiveTabBatch(datatypes.EntityPathBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.ActiveTab" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.ActiveTab") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/apply_latest_at.py b/rerun_py/rerun_sdk/rerun/blueprint/components/apply_latest_at.py index 6a91646b2a437..70ba4d6c31dfd 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/apply_latest_at.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/apply_latest_at.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ApplyLatestAt(datatypes.Bool, ComponentMixin): class ApplyLatestAtBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.ApplyLatestAt" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.ApplyLatestAt") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py b/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py index 66a04bb13e9a7..ed4d3de76500e 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class AutoLayout(datatypes.Bool, ComponentMixin): class AutoLayoutBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.AutoLayout" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.AutoLayout") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/auto_space_views.py b/rerun_py/rerun_sdk/rerun/blueprint/components/auto_space_views.py index 8cc4d84a3d4ee..fde7191509155 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/auto_space_views.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/auto_space_views.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class AutoSpaceViews(datatypes.Bool, ComponentMixin): class AutoSpaceViewsBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.AutoSpaceViews" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.AutoSpaceViews") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/background_kind.py b/rerun_py/rerun_sdk/rerun/blueprint/components/background_kind.py index a5d278b686d73..3158a80fc0949 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/background_kind.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/background_kind.py @@ -12,6 +12,7 @@ from ..._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["BackgroundKind", "BackgroundKindArrayLike", "BackgroundKindBatch", "BackgroundKindLike"] @@ -71,7 +72,7 @@ def __str__(self) -> str: class BackgroundKindBatch(BaseBatch[BackgroundKindArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.blueprint.components.BackgroundKind" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.BackgroundKind") @staticmethod def _native_to_pa_array(data: BackgroundKindArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py b/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py index 1be7e9a0509c5..9f41771f05b8d 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ColumnShare(datatypes.Float32, ComponentMixin): class ColumnShareBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.ColumnShare" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.ColumnShare") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/component_column_selector.py b/rerun_py/rerun_sdk/rerun/blueprint/components/component_column_selector.py index f8bf5186d2d50..e0494c9d07e57 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/component_column_selector.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/component_column_selector.py @@ -7,6 +7,7 @@ from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from ...blueprint import datatypes as blueprint_datatypes @@ -25,7 +26,9 @@ class ComponentColumnSelector(blueprint_datatypes.ComponentColumnSelector, Compo class ComponentColumnSelectorBatch(blueprint_datatypes.ComponentColumnSelectorBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.ComponentColumnSelector" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor( + "rerun.blueprint.components.ComponentColumnSelector" + ) # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/container_kind.py b/rerun_py/rerun_sdk/rerun/blueprint/components/container_kind.py index 12329ede0fab3..3cb1f63ddc9d1 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/container_kind.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/container_kind.py @@ -12,6 +12,7 @@ from ..._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["ContainerKind", "ContainerKindArrayLike", "ContainerKindBatch", "ContainerKindLike"] @@ -64,7 +65,7 @@ def __str__(self) -> str: class ContainerKindBatch(BaseBatch[ContainerKindArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.blueprint.components.ContainerKind" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.ContainerKind") @staticmethod def _native_to_pa_array(data: ContainerKindArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py b/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py index 6d78b7afabfea..f7ff0513675bf 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py @@ -12,6 +12,7 @@ from ..._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["Corner2D", "Corner2DArrayLike", "Corner2DBatch", "Corner2DLike"] @@ -66,7 +67,7 @@ def __str__(self) -> str: class Corner2DBatch(BaseBatch[Corner2DArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.blueprint.components.Corner2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.Corner2D") @staticmethod def _native_to_pa_array(data: Corner2DArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/filter_by_range.py b/rerun_py/rerun_sdk/rerun/blueprint/components/filter_by_range.py index ec9577513fcf8..5c58a2622efaa 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/filter_by_range.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/filter_by_range.py @@ -7,6 +7,7 @@ from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from ...blueprint import datatypes as blueprint_datatypes @@ -25,7 +26,7 @@ class FilterByRange(blueprint_datatypes.FilterByRange, ComponentMixin): class FilterByRangeBatch(blueprint_datatypes.FilterByRangeBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.FilterByRange" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.FilterByRange") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/filter_is_not_null.py b/rerun_py/rerun_sdk/rerun/blueprint/components/filter_is_not_null.py index 17a60418dca70..c52b7a1fc0986 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/filter_is_not_null.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/filter_is_not_null.py @@ -7,6 +7,7 @@ from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from ...blueprint import datatypes as blueprint_datatypes @@ -25,7 +26,7 @@ class FilterIsNotNull(blueprint_datatypes.FilterIsNotNull, ComponentMixin): class FilterIsNotNullBatch(blueprint_datatypes.FilterIsNotNullBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.FilterIsNotNull" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.FilterIsNotNull") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py b/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py index 16eb9544ca583..a85904e7f5689 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class GridColumns(datatypes.UInt32, ComponentMixin): class GridColumnsBatch(datatypes.UInt32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.GridColumns" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.GridColumns") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/included_content.py b/rerun_py/rerun_sdk/rerun/blueprint/components/included_content.py index 09ada624eb263..1076b3b801c0c 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/included_content.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/included_content.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class IncludedContent(datatypes.EntityPath, ComponentMixin): class IncludedContentBatch(datatypes.EntityPathBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.IncludedContent" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.IncludedContent") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/interactive.py b/rerun_py/rerun_sdk/rerun/blueprint/components/interactive.py index 74bb3222aaf92..cd6d16dfb49b7 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/interactive.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/interactive.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class Interactive(datatypes.Bool, ComponentMixin): class InteractiveBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.Interactive" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.Interactive") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/lock_range_during_zoom.py b/rerun_py/rerun_sdk/rerun/blueprint/components/lock_range_during_zoom.py index 0383a3391b858..42d7ac55f1eb7 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/lock_range_during_zoom.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/lock_range_during_zoom.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class LockRangeDuringZoom(datatypes.Bool, ComponentMixin): class LockRangeDuringZoomBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.LockRangeDuringZoom" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.LockRangeDuringZoom") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/map_provider.py b/rerun_py/rerun_sdk/rerun/blueprint/components/map_provider.py index 57dd1b462a00e..dbb9a97f6d052 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/map_provider.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/map_provider.py @@ -12,6 +12,7 @@ from ..._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["MapProvider", "MapProviderArrayLike", "MapProviderBatch", "MapProviderLike"] @@ -75,7 +76,7 @@ def __str__(self) -> str: class MapProviderBatch(BaseBatch[MapProviderArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.blueprint.components.MapProvider" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.MapProvider") @staticmethod def _native_to_pa_array(data: MapProviderArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/panel_state.py b/rerun_py/rerun_sdk/rerun/blueprint/components/panel_state.py index dd76c7c88f3e2..61f873b446ccd 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/panel_state.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/panel_state.py @@ -12,6 +12,7 @@ from ..._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["PanelState", "PanelStateArrayLike", "PanelStateBatch", "PanelStateLike"] @@ -59,7 +60,7 @@ def __str__(self) -> str: class PanelStateBatch(BaseBatch[PanelStateArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.blueprint.components.PanelState" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.PanelState") @staticmethod def _native_to_pa_array(data: PanelStateArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/query_expression.py b/rerun_py/rerun_sdk/rerun/blueprint/components/query_expression.py index fe435d8f9b497..560225d069015 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/query_expression.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/query_expression.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -36,7 +37,7 @@ class QueryExpression(datatypes.Utf8, ComponentMixin): class QueryExpressionBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.QueryExpression" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.QueryExpression") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/root_container.py b/rerun_py/rerun_sdk/rerun/blueprint/components/root_container.py index 36ca6e16662d7..bf216a75ca3f4 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/root_container.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/root_container.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class RootContainer(datatypes.Uuid, ComponentMixin): class RootContainerBatch(datatypes.UuidBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.RootContainer" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.RootContainer") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py b/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py index e0252bc68f7b7..c0b29c0a672c1 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class RowShare(datatypes.Float32, ComponentMixin): class RowShareBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.RowShare" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.RowShare") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/selected_columns.py b/rerun_py/rerun_sdk/rerun/blueprint/components/selected_columns.py index d8e46c0167377..d939867351c72 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/selected_columns.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/selected_columns.py @@ -7,6 +7,7 @@ from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from ...blueprint import datatypes as blueprint_datatypes @@ -25,7 +26,7 @@ class SelectedColumns(blueprint_datatypes.SelectedColumns, ComponentMixin): class SelectedColumnsBatch(blueprint_datatypes.SelectedColumnsBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.SelectedColumns" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.SelectedColumns") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_class.py b/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_class.py index 90aeab11c8704..af87eff847a6f 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_class.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_class.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class SpaceViewClass(datatypes.Utf8, ComponentMixin): class SpaceViewClassBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.SpaceViewClass" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.SpaceViewClass") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_maximized.py b/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_maximized.py index f89b564c9051d..9a89157122a37 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_maximized.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_maximized.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class SpaceViewMaximized(datatypes.Uuid, ComponentMixin): class SpaceViewMaximizedBatch(datatypes.UuidBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.SpaceViewMaximized" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.SpaceViewMaximized") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_origin.py b/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_origin.py index d923608bb18a1..3ae499d8c4d6a 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_origin.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/space_view_origin.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class SpaceViewOrigin(datatypes.EntityPath, ComponentMixin): class SpaceViewOriginBatch(datatypes.EntityPathBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.SpaceViewOrigin" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.SpaceViewOrigin") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/tensor_dimension_index_slider.py b/rerun_py/rerun_sdk/rerun/blueprint/components/tensor_dimension_index_slider.py index 43070cc539b46..92988aea17813 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/tensor_dimension_index_slider.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/tensor_dimension_index_slider.py @@ -7,6 +7,7 @@ from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from ...blueprint import datatypes as blueprint_datatypes @@ -25,7 +26,9 @@ class TensorDimensionIndexSlider(blueprint_datatypes.TensorDimensionIndexSlider, class TensorDimensionIndexSliderBatch(blueprint_datatypes.TensorDimensionIndexSliderBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.TensorDimensionIndexSlider" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor( + "rerun.blueprint.components.TensorDimensionIndexSlider" + ) # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/timeline_name.py b/rerun_py/rerun_sdk/rerun/blueprint/components/timeline_name.py index 07b2e47bcf967..ed34de827c5ca 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/timeline_name.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/timeline_name.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class TimelineName(datatypes.Utf8, ComponentMixin): class TimelineNameBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.TimelineName" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.TimelineName") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/view_fit.py b/rerun_py/rerun_sdk/rerun/blueprint/components/view_fit.py index 0d6e5b73630f5..09ff25a03c7e7 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/view_fit.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/view_fit.py @@ -12,6 +12,7 @@ from ..._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["ViewFit", "ViewFitArrayLike", "ViewFitBatch", "ViewFitLike"] @@ -61,7 +62,7 @@ def __str__(self) -> str: class ViewFitBatch(BaseBatch[ViewFitArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.blueprint.components.ViewFit" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.ViewFit") @staticmethod def _native_to_pa_array(data: ViewFitArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/viewer_recommendation_hash.py b/rerun_py/rerun_sdk/rerun/blueprint/components/viewer_recommendation_hash.py index 161a7c8790c5c..aed23e49925f8 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/viewer_recommendation_hash.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/viewer_recommendation_hash.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,9 @@ class ViewerRecommendationHash(datatypes.UInt64, ComponentMixin): class ViewerRecommendationHashBatch(datatypes.UInt64Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.ViewerRecommendationHash" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor( + "rerun.blueprint.components.ViewerRecommendationHash" + ) # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py b/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py index e35622c738a2b..ea4d4f43eca86 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Visible(datatypes.Bool, ComponentMixin): class VisibleBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.Visible" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.Visible") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/visible_time_range.py b/rerun_py/rerun_sdk/rerun/blueprint/components/visible_time_range.py index 92203ac1fa365..61d8f39df33f4 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visible_time_range.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visible_time_range.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class VisibleTimeRange(datatypes.VisibleTimeRange, ComponentMixin): class VisibleTimeRangeBatch(datatypes.VisibleTimeRangeBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.VisibleTimeRange" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.VisibleTimeRange") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/visual_bounds2d.py b/rerun_py/rerun_sdk/rerun/blueprint/components/visual_bounds2d.py index 25a6a8e7756a5..338e3db743a6f 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visual_bounds2d.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visual_bounds2d.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .visual_bounds2d_ext import VisualBounds2DExt @@ -26,7 +27,7 @@ class VisualBounds2D(VisualBounds2DExt, datatypes.Range2D, ComponentMixin): class VisualBounds2DBatch(datatypes.Range2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.VisualBounds2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.VisualBounds2D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/visualizer_overrides.py b/rerun_py/rerun_sdk/rerun/blueprint/components/visualizer_overrides.py index 36f4db91b2009..5542a5b7c36b7 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visualizer_overrides.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visualizer_overrides.py @@ -7,6 +7,7 @@ from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from ...blueprint import datatypes as blueprint_datatypes @@ -36,7 +37,7 @@ class VisualizerOverrides(blueprint_datatypes.Utf8List, ComponentMixin): class VisualizerOverridesBatch(blueprint_datatypes.Utf8ListBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.VisualizerOverrides" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.VisualizerOverrides") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/zoom_level.py b/rerun_py/rerun_sdk/rerun/blueprint/components/zoom_level.py index ad7e5f3e2088d..d83b4c9306bd5 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/zoom_level.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/zoom_level.py @@ -8,6 +8,7 @@ from ... import datatypes from ..._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ZoomLevel(datatypes.Float64, ComponentMixin): class ZoomLevelBatch(datatypes.Float64Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.blueprint.components.ZoomLevel" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.blueprint.components.ZoomLevel") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/aggregation_policy.py b/rerun_py/rerun_sdk/rerun/components/aggregation_policy.py index 3841e135e46a0..ff112d569a86d 100644 --- a/rerun_py/rerun_sdk/rerun/components/aggregation_policy.py +++ b/rerun_py/rerun_sdk/rerun/components/aggregation_policy.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["AggregationPolicy", "AggregationPolicyArrayLike", "AggregationPolicyBatch", "AggregationPolicyLike"] @@ -95,7 +96,7 @@ def __str__(self) -> str: class AggregationPolicyBatch(BaseBatch[AggregationPolicyArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.AggregationPolicy" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.AggregationPolicy") @staticmethod def _native_to_pa_array(data: AggregationPolicyArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/albedo_factor.py b/rerun_py/rerun_sdk/rerun/components/albedo_factor.py index fb6a9a5af8bb6..5d7ba9a585dae 100644 --- a/rerun_py/rerun_sdk/rerun/components/albedo_factor.py +++ b/rerun_py/rerun_sdk/rerun/components/albedo_factor.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class AlbedoFactor(datatypes.Rgba32, ComponentMixin): class AlbedoFactorBatch(datatypes.Rgba32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.AlbedoFactor" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.AlbedoFactor") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/annotation_context.py b/rerun_py/rerun_sdk/rerun/components/annotation_context.py index c891cccb1c934..b1080b661d1e4 100644 --- a/rerun_py/rerun_sdk/rerun/components/annotation_context.py +++ b/rerun_py/rerun_sdk/rerun/components/annotation_context.py @@ -14,6 +14,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .annotation_context_ext import AnnotationContextExt @@ -131,7 +132,7 @@ class AnnotationContextBatch(BaseBatch[AnnotationContextArrayLike], ComponentBat metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.components.AnnotationContext" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.AnnotationContext") @staticmethod def _native_to_pa_array(data: AnnotationContextArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/axis_length.py b/rerun_py/rerun_sdk/rerun/components/axis_length.py index 376f354fc86f7..a8f7e311f827e 100644 --- a/rerun_py/rerun_sdk/rerun/components/axis_length.py +++ b/rerun_py/rerun_sdk/rerun/components/axis_length.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class AxisLength(datatypes.Float32, ComponentMixin): class AxisLengthBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.AxisLength" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.AxisLength") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/blob.py b/rerun_py/rerun_sdk/rerun/components/blob.py index 4bafeb7fc024e..837efc5d8da7e 100644 --- a/rerun_py/rerun_sdk/rerun/components/blob.py +++ b/rerun_py/rerun_sdk/rerun/components/blob.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Blob(datatypes.Blob, ComponentMixin): class BlobBatch(datatypes.BlobBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Blob" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Blob") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/class_id.py b/rerun_py/rerun_sdk/rerun/components/class_id.py index 9f2cf8b110e38..c572c2a93660a 100644 --- a/rerun_py/rerun_sdk/rerun/components/class_id.py +++ b/rerun_py/rerun_sdk/rerun/components/class_id.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ClassId(datatypes.ClassId, ComponentMixin): class ClassIdBatch(datatypes.ClassIdBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ClassId" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ClassId") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py b/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py index 6f9e5dbbc90f1..43a8898192660 100644 --- a/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py +++ b/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .clear_is_recursive_ext import ClearIsRecursiveExt @@ -26,7 +27,7 @@ class ClearIsRecursive(ClearIsRecursiveExt, datatypes.Bool, ComponentMixin): class ClearIsRecursiveBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ClearIsRecursive" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ClearIsRecursive") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/color.py b/rerun_py/rerun_sdk/rerun/components/color.py index 9802a16ad6d45..5d72204fde68b 100644 --- a/rerun_py/rerun_sdk/rerun/components/color.py +++ b/rerun_py/rerun_sdk/rerun/components/color.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -34,7 +35,7 @@ class Color(datatypes.Rgba32, ComponentMixin): class ColorBatch(datatypes.Rgba32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Color" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Color") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/colormap.py b/rerun_py/rerun_sdk/rerun/components/colormap.py index d68b9fd9fe66f..ad3b57c9183c1 100644 --- a/rerun_py/rerun_sdk/rerun/components/colormap.py +++ b/rerun_py/rerun_sdk/rerun/components/colormap.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["Colormap", "ColormapArrayLike", "ColormapBatch", "ColormapLike"] @@ -133,7 +134,7 @@ def __str__(self) -> str: class ColormapBatch(BaseBatch[ColormapArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.Colormap" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Colormap") @staticmethod def _native_to_pa_array(data: ColormapArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/depth_meter.py b/rerun_py/rerun_sdk/rerun/components/depth_meter.py index cb286d977d51e..03da6d94466e2 100644 --- a/rerun_py/rerun_sdk/rerun/components/depth_meter.py +++ b/rerun_py/rerun_sdk/rerun/components/depth_meter.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -34,7 +35,7 @@ class DepthMeter(datatypes.Float32, ComponentMixin): class DepthMeterBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.DepthMeter" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.DepthMeter") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py index e16ecb7728f47..b1d96b08ef1f9 100644 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .disconnected_space_ext import DisconnectedSpaceExt @@ -33,7 +34,7 @@ class DisconnectedSpace(DisconnectedSpaceExt, datatypes.Bool, ComponentMixin): class DisconnectedSpaceBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.DisconnectedSpace" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.DisconnectedSpace") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/draw_order.py b/rerun_py/rerun_sdk/rerun/components/draw_order.py index 7df5a7019fd5a..45c5cdbbc118d 100644 --- a/rerun_py/rerun_sdk/rerun/components/draw_order.py +++ b/rerun_py/rerun_sdk/rerun/components/draw_order.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -32,7 +33,7 @@ class DrawOrder(datatypes.Float32, ComponentMixin): class DrawOrderBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.DrawOrder" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.DrawOrder") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/entity_path.py b/rerun_py/rerun_sdk/rerun/components/entity_path.py index e1476783da245..62e0e51473fdf 100644 --- a/rerun_py/rerun_sdk/rerun/components/entity_path.py +++ b/rerun_py/rerun_sdk/rerun/components/entity_path.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class EntityPath(datatypes.EntityPath, ComponentMixin): class EntityPathBatch(datatypes.EntityPathBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.EntityPath" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.EntityPath") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/fill_mode.py b/rerun_py/rerun_sdk/rerun/components/fill_mode.py index 697548efa354c..02ede1978d32c 100644 --- a/rerun_py/rerun_sdk/rerun/components/fill_mode.py +++ b/rerun_py/rerun_sdk/rerun/components/fill_mode.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["FillMode", "FillModeArrayLike", "FillModeBatch", "FillModeLike"] @@ -77,7 +78,7 @@ def __str__(self) -> str: class FillModeBatch(BaseBatch[FillModeArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.FillMode" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.FillMode") @staticmethod def _native_to_pa_array(data: FillModeArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/fill_ratio.py b/rerun_py/rerun_sdk/rerun/components/fill_ratio.py index 18805712daf70..b8e05b9566068 100644 --- a/rerun_py/rerun_sdk/rerun/components/fill_ratio.py +++ b/rerun_py/rerun_sdk/rerun/components/fill_ratio.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -32,7 +33,7 @@ class FillRatio(datatypes.Float32, ComponentMixin): class FillRatioBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.FillRatio" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.FillRatio") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/gamma_correction.py b/rerun_py/rerun_sdk/rerun/components/gamma_correction.py index f198a5134d1b9..400431ba6729b 100644 --- a/rerun_py/rerun_sdk/rerun/components/gamma_correction.py +++ b/rerun_py/rerun_sdk/rerun/components/gamma_correction.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -33,7 +34,7 @@ class GammaCorrection(datatypes.Float32, ComponentMixin): class GammaCorrectionBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.GammaCorrection" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.GammaCorrection") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/geo_line_string.py b/rerun_py/rerun_sdk/rerun/components/geo_line_string.py index 440f2db0b6a8f..9d7598bc14c7e 100644 --- a/rerun_py/rerun_sdk/rerun/components/geo_line_string.py +++ b/rerun_py/rerun_sdk/rerun/components/geo_line_string.py @@ -16,6 +16,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .geo_line_string_ext import GeoLineStringExt @@ -50,7 +51,7 @@ class GeoLineStringBatch(BaseBatch[GeoLineStringArrayLike], ComponentBatchMixin) metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.components.GeoLineString" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.GeoLineString") @staticmethod def _native_to_pa_array(data: GeoLineStringArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/graph_edge.py b/rerun_py/rerun_sdk/rerun/components/graph_edge.py index 64d597eb4ec5a..43f0e641cb8bb 100644 --- a/rerun_py/rerun_sdk/rerun/components/graph_edge.py +++ b/rerun_py/rerun_sdk/rerun/components/graph_edge.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class GraphEdge(datatypes.Utf8Pair, ComponentMixin): class GraphEdgeBatch(datatypes.Utf8PairBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.GraphEdge" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.GraphEdge") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/graph_node.py b/rerun_py/rerun_sdk/rerun/components/graph_node.py index 64514009428c1..fdd72533626a3 100644 --- a/rerun_py/rerun_sdk/rerun/components/graph_node.py +++ b/rerun_py/rerun_sdk/rerun/components/graph_node.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class GraphNode(datatypes.Utf8, ComponentMixin): class GraphNodeBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.GraphNode" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.GraphNode") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/graph_type.py b/rerun_py/rerun_sdk/rerun/components/graph_type.py index 636d02315495d..a66e8188b3abd 100644 --- a/rerun_py/rerun_sdk/rerun/components/graph_type.py +++ b/rerun_py/rerun_sdk/rerun/components/graph_type.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["GraphType", "GraphTypeArrayLike", "GraphTypeBatch", "GraphTypeLike"] @@ -56,7 +57,7 @@ def __str__(self) -> str: class GraphTypeBatch(BaseBatch[GraphTypeArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.GraphType" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.GraphType") @staticmethod def _native_to_pa_array(data: GraphTypeArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/half_size2d.py b/rerun_py/rerun_sdk/rerun/components/half_size2d.py index 9228cc6a5b289..e9366f3124f4c 100644 --- a/rerun_py/rerun_sdk/rerun/components/half_size2d.py +++ b/rerun_py/rerun_sdk/rerun/components/half_size2d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -32,7 +33,7 @@ class HalfSize2D(datatypes.Vec2D, ComponentMixin): class HalfSize2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.HalfSize2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.HalfSize2D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/half_size3d.py b/rerun_py/rerun_sdk/rerun/components/half_size3d.py index a00a26e6a2c37..c4d6ab2e9137c 100644 --- a/rerun_py/rerun_sdk/rerun/components/half_size3d.py +++ b/rerun_py/rerun_sdk/rerun/components/half_size3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -32,7 +33,7 @@ class HalfSize3D(datatypes.Vec3D, ComponentMixin): class HalfSize3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.HalfSize3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.HalfSize3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/image_buffer.py b/rerun_py/rerun_sdk/rerun/components/image_buffer.py index bd91d9e770f59..d679ef6332c55 100644 --- a/rerun_py/rerun_sdk/rerun/components/image_buffer.py +++ b/rerun_py/rerun_sdk/rerun/components/image_buffer.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class ImageBuffer(datatypes.Blob, ComponentMixin): class ImageBufferBatch(datatypes.BlobBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ImageBuffer" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ImageBuffer") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/image_format.py b/rerun_py/rerun_sdk/rerun/components/image_format.py index 5c3f0754e2a35..4e7c10eb87d47 100644 --- a/rerun_py/rerun_sdk/rerun/components/image_format.py +++ b/rerun_py/rerun_sdk/rerun/components/image_format.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ImageFormat(datatypes.ImageFormat, ComponentMixin): class ImageFormatBatch(datatypes.ImageFormatBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ImageFormat" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ImageFormat") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/image_plane_distance.py b/rerun_py/rerun_sdk/rerun/components/image_plane_distance.py index f781558edbdb6..cda29979a58c7 100644 --- a/rerun_py/rerun_sdk/rerun/components/image_plane_distance.py +++ b/rerun_py/rerun_sdk/rerun/components/image_plane_distance.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class ImagePlaneDistance(datatypes.Float32, ComponentMixin): class ImagePlaneDistanceBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ImagePlaneDistance" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ImagePlaneDistance") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/keypoint_id.py b/rerun_py/rerun_sdk/rerun/components/keypoint_id.py index 41ca1864ea7cc..9430f232d09d4 100644 --- a/rerun_py/rerun_sdk/rerun/components/keypoint_id.py +++ b/rerun_py/rerun_sdk/rerun/components/keypoint_id.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -32,7 +33,7 @@ class KeypointId(datatypes.KeypointId, ComponentMixin): class KeypointIdBatch(datatypes.KeypointIdBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.KeypointId" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.KeypointId") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/lat_lon.py b/rerun_py/rerun_sdk/rerun/components/lat_lon.py index 4768bc369fae3..ba00538a3f3e2 100644 --- a/rerun_py/rerun_sdk/rerun/components/lat_lon.py +++ b/rerun_py/rerun_sdk/rerun/components/lat_lon.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class LatLon(datatypes.DVec2D, ComponentMixin): class LatLonBatch(datatypes.DVec2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.LatLon" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.LatLon") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/length.py b/rerun_py/rerun_sdk/rerun/components/length.py index 45e99560ef72c..75f4264b0b4dd 100644 --- a/rerun_py/rerun_sdk/rerun/components/length.py +++ b/rerun_py/rerun_sdk/rerun/components/length.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -30,7 +31,7 @@ class Length(datatypes.Float32, ComponentMixin): class LengthBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Length" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Length") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/line_strip2d.py b/rerun_py/rerun_sdk/rerun/components/line_strip2d.py index a5609a22fcce0..330ab8b40f1b9 100644 --- a/rerun_py/rerun_sdk/rerun/components/line_strip2d.py +++ b/rerun_py/rerun_sdk/rerun/components/line_strip2d.py @@ -16,6 +16,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .line_strip2d_ext import LineStrip2DExt @@ -68,7 +69,7 @@ class LineStrip2DBatch(BaseBatch[LineStrip2DArrayLike], ComponentBatchMixin): metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.components.LineStrip2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.LineStrip2D") @staticmethod def _native_to_pa_array(data: LineStrip2DArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/line_strip3d.py b/rerun_py/rerun_sdk/rerun/components/line_strip3d.py index 1357c12f74833..a9d3b4a8e76b1 100644 --- a/rerun_py/rerun_sdk/rerun/components/line_strip3d.py +++ b/rerun_py/rerun_sdk/rerun/components/line_strip3d.py @@ -16,6 +16,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .line_strip3d_ext import LineStrip3DExt @@ -68,7 +69,7 @@ class LineStrip3DBatch(BaseBatch[LineStrip3DArrayLike], ComponentBatchMixin): metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.components.LineStrip3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.LineStrip3D") @staticmethod def _native_to_pa_array(data: LineStrip3DArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/magnification_filter.py b/rerun_py/rerun_sdk/rerun/components/magnification_filter.py index 1cafa35fc7bcc..8396125bc47a4 100644 --- a/rerun_py/rerun_sdk/rerun/components/magnification_filter.py +++ b/rerun_py/rerun_sdk/rerun/components/magnification_filter.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["MagnificationFilter", "MagnificationFilterArrayLike", "MagnificationFilterBatch", "MagnificationFilterLike"] @@ -65,7 +66,7 @@ def __str__(self) -> str: class MagnificationFilterBatch(BaseBatch[MagnificationFilterArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.MagnificationFilter" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.MagnificationFilter") @staticmethod def _native_to_pa_array(data: MagnificationFilterArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/marker_shape.py b/rerun_py/rerun_sdk/rerun/components/marker_shape.py index 8815ee2b77ea1..9ecd8406240fc 100644 --- a/rerun_py/rerun_sdk/rerun/components/marker_shape.py +++ b/rerun_py/rerun_sdk/rerun/components/marker_shape.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["MarkerShape", "MarkerShapeArrayLike", "MarkerShapeBatch", "MarkerShapeLike"] @@ -105,7 +106,7 @@ def __str__(self) -> str: class MarkerShapeBatch(BaseBatch[MarkerShapeArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.MarkerShape" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.MarkerShape") @staticmethod def _native_to_pa_array(data: MarkerShapeArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/marker_size.py b/rerun_py/rerun_sdk/rerun/components/marker_size.py index 62946a6f46cfc..dd79ecf03599d 100644 --- a/rerun_py/rerun_sdk/rerun/components/marker_size.py +++ b/rerun_py/rerun_sdk/rerun/components/marker_size.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class MarkerSize(datatypes.Float32, ComponentMixin): class MarkerSizeBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.MarkerSize" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.MarkerSize") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/media_type.py b/rerun_py/rerun_sdk/rerun/components/media_type.py index 7f272afd09980..b0be062c68017 100644 --- a/rerun_py/rerun_sdk/rerun/components/media_type.py +++ b/rerun_py/rerun_sdk/rerun/components/media_type.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .media_type_ext import MediaTypeExt @@ -31,7 +32,7 @@ class MediaType(MediaTypeExt, datatypes.Utf8, ComponentMixin): class MediaTypeBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.MediaType" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.MediaType") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/name.py b/rerun_py/rerun_sdk/rerun/components/name.py index fedf2549d77d0..7d50f52ccc43f 100644 --- a/rerun_py/rerun_sdk/rerun/components/name.py +++ b/rerun_py/rerun_sdk/rerun/components/name.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Name(datatypes.Utf8, ComponentMixin): class NameBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Name" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Name") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/opacity.py b/rerun_py/rerun_sdk/rerun/components/opacity.py index 1406ba087d7af..8b49bb29209fb 100644 --- a/rerun_py/rerun_sdk/rerun/components/opacity.py +++ b/rerun_py/rerun_sdk/rerun/components/opacity.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -30,7 +31,7 @@ class Opacity(datatypes.Float32, ComponentMixin): class OpacityBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Opacity" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Opacity") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py b/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py index aad7882bf5fba..dec1483ab2e89 100644 --- a/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py +++ b/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -39,7 +40,7 @@ class PinholeProjection(datatypes.Mat3x3, ComponentMixin): class PinholeProjectionBatch(datatypes.Mat3x3Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.PinholeProjection" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.PinholeProjection") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py index 33cbc303b2361..a424304836bd8 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class PoseRotationAxisAngle(datatypes.RotationAxisAngle, ComponentMixin): class PoseRotationAxisAngleBatch(datatypes.RotationAxisAngleBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.PoseRotationAxisAngle" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.PoseRotationAxisAngle") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py b/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py index 48f0d035063b5..9f8bc782a7ae2 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -30,7 +31,7 @@ class PoseRotationQuat(datatypes.Quaternion, ComponentMixin): class PoseRotationQuatBatch(datatypes.QuaternionBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.PoseRotationQuat" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.PoseRotationQuat") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/pose_scale3d.py b/rerun_py/rerun_sdk/rerun/components/pose_scale3d.py index 457944ab95138..6a79d319690aa 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_scale3d.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_scale3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .pose_scale3d_ext import PoseScale3DExt @@ -32,7 +33,7 @@ class PoseScale3D(PoseScale3DExt, datatypes.Vec3D, ComponentMixin): class PoseScale3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.PoseScale3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.PoseScale3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/pose_transform_mat3x3.py b/rerun_py/rerun_sdk/rerun/components/pose_transform_mat3x3.py index 9cc767c99d1c2..6409421507b28 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_transform_mat3x3.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_transform_mat3x3.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -61,7 +62,7 @@ class PoseTransformMat3x3(datatypes.Mat3x3, ComponentMixin): class PoseTransformMat3x3Batch(datatypes.Mat3x3Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.PoseTransformMat3x3" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.PoseTransformMat3x3") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/pose_translation3d.py b/rerun_py/rerun_sdk/rerun/components/pose_translation3d.py index c6cb661fd172f..fad632e952dd0 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_translation3d.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_translation3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class PoseTranslation3D(datatypes.Vec3D, ComponentMixin): class PoseTranslation3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.PoseTranslation3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.PoseTranslation3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/position2d.py b/rerun_py/rerun_sdk/rerun/components/position2d.py index b9db7af004190..e669d61e66db0 100644 --- a/rerun_py/rerun_sdk/rerun/components/position2d.py +++ b/rerun_py/rerun_sdk/rerun/components/position2d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Position2D(datatypes.Vec2D, ComponentMixin): class Position2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Position2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Position2D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/position3d.py b/rerun_py/rerun_sdk/rerun/components/position3d.py index d1ace01470eb9..8e595645f68b2 100644 --- a/rerun_py/rerun_sdk/rerun/components/position3d.py +++ b/rerun_py/rerun_sdk/rerun/components/position3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Position3D(datatypes.Vec3D, ComponentMixin): class Position3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Position3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Position3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/radius.py b/rerun_py/rerun_sdk/rerun/components/radius.py index 5d500eb7eee0f..9ee151b2fd48b 100644 --- a/rerun_py/rerun_sdk/rerun/components/radius.py +++ b/rerun_py/rerun_sdk/rerun/components/radius.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .radius_ext import RadiusExt @@ -35,7 +36,7 @@ class Radius(RadiusExt, datatypes.Float32, ComponentMixin): class RadiusBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Radius" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Radius") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/range1d.py b/rerun_py/rerun_sdk/rerun/components/range1d.py index f2ef2224ed772..c568f9b1957f2 100644 --- a/rerun_py/rerun_sdk/rerun/components/range1d.py +++ b/rerun_py/rerun_sdk/rerun/components/range1d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Range1D(datatypes.Range1D, ComponentMixin): class Range1DBatch(datatypes.Range1DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Range1D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Range1D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/recording_uri.py b/rerun_py/rerun_sdk/rerun/components/recording_uri.py index 52220d7f92d76..4da4f9e6f02a0 100644 --- a/rerun_py/rerun_sdk/rerun/components/recording_uri.py +++ b/rerun_py/rerun_sdk/rerun/components/recording_uri.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class RecordingUri(datatypes.Utf8, ComponentMixin): class RecordingUriBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.RecordingUri" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.RecordingUri") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/resolution.py b/rerun_py/rerun_sdk/rerun/components/resolution.py index b496a7a12efcd..e16c661ed6d5b 100644 --- a/rerun_py/rerun_sdk/rerun/components/resolution.py +++ b/rerun_py/rerun_sdk/rerun/components/resolution.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class Resolution(datatypes.Vec2D, ComponentMixin): class ResolutionBatch(datatypes.Vec2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Resolution" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Resolution") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py index ccbdbcada79bb..81dfeacd37a02 100644 --- a/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class RotationAxisAngle(datatypes.RotationAxisAngle, ComponentMixin): class RotationAxisAngleBatch(datatypes.RotationAxisAngleBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.RotationAxisAngle" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.RotationAxisAngle") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/rotation_quat.py b/rerun_py/rerun_sdk/rerun/components/rotation_quat.py index 7b8b042362954..78e49ae5c8b51 100644 --- a/rerun_py/rerun_sdk/rerun/components/rotation_quat.py +++ b/rerun_py/rerun_sdk/rerun/components/rotation_quat.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -30,7 +31,7 @@ class RotationQuat(datatypes.Quaternion, ComponentMixin): class RotationQuatBatch(datatypes.QuaternionBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.RotationQuat" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.RotationQuat") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/scalar.py b/rerun_py/rerun_sdk/rerun/components/scalar.py index 1f6abe4a724f2..8e472c2156560 100644 --- a/rerun_py/rerun_sdk/rerun/components/scalar.py +++ b/rerun_py/rerun_sdk/rerun/components/scalar.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -29,7 +30,7 @@ class Scalar(datatypes.Float64, ComponentMixin): class ScalarBatch(datatypes.Float64Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Scalar" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Scalar") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/scale3d.py b/rerun_py/rerun_sdk/rerun/components/scale3d.py index a20b43bd41858..99d893ccd1fa5 100644 --- a/rerun_py/rerun_sdk/rerun/components/scale3d.py +++ b/rerun_py/rerun_sdk/rerun/components/scale3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .scale3d_ext import Scale3DExt @@ -32,7 +33,7 @@ class Scale3D(Scale3DExt, datatypes.Vec3D, ComponentMixin): class Scale3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Scale3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Scale3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/show_labels.py b/rerun_py/rerun_sdk/rerun/components/show_labels.py index b6fc9a5b6ad36..6ef0d74d45bc0 100644 --- a/rerun_py/rerun_sdk/rerun/components/show_labels.py +++ b/rerun_py/rerun_sdk/rerun/components/show_labels.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -31,7 +32,7 @@ class ShowLabels(datatypes.Bool, ComponentMixin): class ShowLabelsBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ShowLabels" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ShowLabels") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/stroke_width.py b/rerun_py/rerun_sdk/rerun/components/stroke_width.py index fe6e41f2275c7..736b9684f6c87 100644 --- a/rerun_py/rerun_sdk/rerun/components/stroke_width.py +++ b/rerun_py/rerun_sdk/rerun/components/stroke_width.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class StrokeWidth(datatypes.Float32, ComponentMixin): class StrokeWidthBatch(datatypes.Float32Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.StrokeWidth" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.StrokeWidth") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/tensor_data.py b/rerun_py/rerun_sdk/rerun/components/tensor_data.py index 29806962401e6..f02a0191f56ac 100644 --- a/rerun_py/rerun_sdk/rerun/components/tensor_data.py +++ b/rerun_py/rerun_sdk/rerun/components/tensor_data.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -34,7 +35,7 @@ class TensorData(datatypes.TensorData, ComponentMixin): class TensorDataBatch(datatypes.TensorDataBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TensorData" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TensorData") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/tensor_dimension_index_selection.py b/rerun_py/rerun_sdk/rerun/components/tensor_dimension_index_selection.py index 30f78dda89c74..b24fa97c2074e 100644 --- a/rerun_py/rerun_sdk/rerun/components/tensor_dimension_index_selection.py +++ b/rerun_py/rerun_sdk/rerun/components/tensor_dimension_index_selection.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class TensorDimensionIndexSelection(datatypes.TensorDimensionIndexSelection, Com class TensorDimensionIndexSelectionBatch(datatypes.TensorDimensionIndexSelectionBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TensorDimensionIndexSelection" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TensorDimensionIndexSelection") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/tensor_height_dimension.py b/rerun_py/rerun_sdk/rerun/components/tensor_height_dimension.py index f6be237c13454..7435939270ec4 100644 --- a/rerun_py/rerun_sdk/rerun/components/tensor_height_dimension.py +++ b/rerun_py/rerun_sdk/rerun/components/tensor_height_dimension.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class TensorHeightDimension(datatypes.TensorDimensionSelection, ComponentMixin): class TensorHeightDimensionBatch(datatypes.TensorDimensionSelectionBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TensorHeightDimension" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TensorHeightDimension") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/tensor_width_dimension.py b/rerun_py/rerun_sdk/rerun/components/tensor_width_dimension.py index 128da3758b1f8..30d7ab044f0e5 100644 --- a/rerun_py/rerun_sdk/rerun/components/tensor_width_dimension.py +++ b/rerun_py/rerun_sdk/rerun/components/tensor_width_dimension.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class TensorWidthDimension(datatypes.TensorDimensionSelection, ComponentMixin): class TensorWidthDimensionBatch(datatypes.TensorDimensionSelectionBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TensorWidthDimension" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TensorWidthDimension") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/texcoord2d.py b/rerun_py/rerun_sdk/rerun/components/texcoord2d.py index a28f6ab3b5c0d..7678a3b17cd8c 100644 --- a/rerun_py/rerun_sdk/rerun/components/texcoord2d.py +++ b/rerun_py/rerun_sdk/rerun/components/texcoord2d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -42,7 +43,7 @@ class Texcoord2D(datatypes.Vec2D, ComponentMixin): class Texcoord2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Texcoord2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Texcoord2D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/text.py b/rerun_py/rerun_sdk/rerun/components/text.py index 5f61c74e38bb5..6882f98776ad2 100644 --- a/rerun_py/rerun_sdk/rerun/components/text.py +++ b/rerun_py/rerun_sdk/rerun/components/text.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Text(datatypes.Utf8, ComponentMixin): class TextBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Text" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Text") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/text_log_level.py b/rerun_py/rerun_sdk/rerun/components/text_log_level.py index f9af3502e9707..226e97fcfd11c 100644 --- a/rerun_py/rerun_sdk/rerun/components/text_log_level.py +++ b/rerun_py/rerun_sdk/rerun/components/text_log_level.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .text_log_level_ext import TextLogLevelExt @@ -36,7 +37,7 @@ class TextLogLevel(TextLogLevelExt, datatypes.Utf8, ComponentMixin): class TextLogLevelBatch(datatypes.Utf8Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TextLogLevel" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TextLogLevel") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/transform_mat3x3.py b/rerun_py/rerun_sdk/rerun/components/transform_mat3x3.py index b8f4fdc7ab079..2290d2fcabaec 100644 --- a/rerun_py/rerun_sdk/rerun/components/transform_mat3x3.py +++ b/rerun_py/rerun_sdk/rerun/components/transform_mat3x3.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -61,7 +62,7 @@ class TransformMat3x3(datatypes.Mat3x3, ComponentMixin): class TransformMat3x3Batch(datatypes.Mat3x3Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TransformMat3x3" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TransformMat3x3") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/transform_relation.py b/rerun_py/rerun_sdk/rerun/components/transform_relation.py index a1e0902bc7f3b..393e4dd44b8ab 100644 --- a/rerun_py/rerun_sdk/rerun/components/transform_relation.py +++ b/rerun_py/rerun_sdk/rerun/components/transform_relation.py @@ -12,6 +12,7 @@ from .._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ) __all__ = ["TransformRelation", "TransformRelationArrayLike", "TransformRelationBatch", "TransformRelationLike"] @@ -70,7 +71,7 @@ def __str__(self) -> str: class TransformRelationBatch(BaseBatch[TransformRelationArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.uint8() - _COMPONENT_NAME: str = "rerun.components.TransformRelation" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TransformRelation") @staticmethod def _native_to_pa_array(data: TransformRelationArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/rerun_sdk/rerun/components/translation3d.py b/rerun_py/rerun_sdk/rerun/components/translation3d.py index 5c4231bfdb687..fff4b5aac84b9 100644 --- a/rerun_py/rerun_sdk/rerun/components/translation3d.py +++ b/rerun_py/rerun_sdk/rerun/components/translation3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Translation3D(datatypes.Vec3D, ComponentMixin): class Translation3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Translation3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Translation3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/triangle_indices.py b/rerun_py/rerun_sdk/rerun/components/triangle_indices.py index 2af63470c4fce..b3e5b63839f48 100644 --- a/rerun_py/rerun_sdk/rerun/components/triangle_indices.py +++ b/rerun_py/rerun_sdk/rerun/components/triangle_indices.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class TriangleIndices(datatypes.UVec3D, ComponentMixin): class TriangleIndicesBatch(datatypes.UVec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.TriangleIndices" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.TriangleIndices") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/value_range.py b/rerun_py/rerun_sdk/rerun/components/value_range.py index 3f4a5f2769acc..e16934ef6f994 100644 --- a/rerun_py/rerun_sdk/rerun/components/value_range.py +++ b/rerun_py/rerun_sdk/rerun/components/value_range.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class ValueRange(datatypes.Range1D, ComponentMixin): class ValueRangeBatch(datatypes.Range1DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ValueRange" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ValueRange") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/vector2d.py b/rerun_py/rerun_sdk/rerun/components/vector2d.py index d2470d2051295..d7ff53510afca 100644 --- a/rerun_py/rerun_sdk/rerun/components/vector2d.py +++ b/rerun_py/rerun_sdk/rerun/components/vector2d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Vector2D(datatypes.Vec2D, ComponentMixin): class Vector2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Vector2D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Vector2D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/vector3d.py b/rerun_py/rerun_sdk/rerun/components/vector3d.py index 4a534e17598fa..691a29ab18ffa 100644 --- a/rerun_py/rerun_sdk/rerun/components/vector3d.py +++ b/rerun_py/rerun_sdk/rerun/components/vector3d.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -25,7 +26,7 @@ class Vector3D(datatypes.Vec3D, ComponentMixin): class Vector3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.Vector3D" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.Vector3D") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/video_timestamp.py b/rerun_py/rerun_sdk/rerun/components/video_timestamp.py index 0cb6b4f6d2ef5..8bcdbdb0e992f 100644 --- a/rerun_py/rerun_sdk/rerun/components/video_timestamp.py +++ b/rerun_py/rerun_sdk/rerun/components/video_timestamp.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .video_timestamp_ext import VideoTimestampExt @@ -26,7 +27,7 @@ class VideoTimestamp(VideoTimestampExt, datatypes.VideoTimestamp, ComponentMixin class VideoTimestampBatch(datatypes.VideoTimestampBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.VideoTimestamp" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.VideoTimestamp") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py index a9938f98231ba..151a9ff8ff762 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py @@ -8,6 +8,7 @@ from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from .view_coordinates_ext import ViewCoordinatesExt @@ -45,7 +46,7 @@ class ViewCoordinates(ViewCoordinatesExt, datatypes.ViewCoordinates, ComponentMi class ViewCoordinatesBatch(datatypes.ViewCoordinatesBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.components.ViewCoordinates" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.ViewCoordinates") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/src/arrow.rs b/rerun_py/src/arrow.rs index 83d1118e6296f..486d25415e6fd 100644 --- a/rerun_py/src/arrow.rs +++ b/rerun_py/src/arrow.rs @@ -1,5 +1,7 @@ //! Methods for handling Arrow datamodel log ingest +use std::borrow::Cow; + use arrow::{ array::{make_array, ArrayData}, pyarrow::PyArrowType, @@ -11,20 +13,49 @@ use arrow2::{ }; use pyo3::{ exceptions::PyRuntimeError, - types::{PyAnyMethods as _, PyDict, PyDictMethods, PyString}, + types::{PyAnyMethods, PyDict, PyDictMethods, PyString}, Bound, PyAny, PyResult, }; -use re_chunk::{Chunk, ChunkError, ChunkId, PendingRow, RowId, TimeColumn}; +use re_chunk::{Chunk, ChunkError, ChunkId, PendingRow, RowId, TimeColumn, TransportChunk}; use re_log_types::TimePoint; use re_sdk::{external::nohash_hasher::IntMap, ComponentDescriptor, EntityPath, Timeline}; +/// Perform Python-to-Rust conversion for a `ComponentDescriptor`. +pub fn descriptor_to_rust(component_descr: &Bound<'_, PyAny>) -> PyResult { + let py = component_descr.py(); + + let archetype_name = component_descr.getattr(pyo3::intern!(py, "archetype_name"))?; + let archetype_name: Option> = if !archetype_name.is_none() { + Some(archetype_name.extract()?) + } else { + None + }; + + let archetype_field_name = + component_descr.getattr(pyo3::intern!(py, "archetype_field_name"))?; + let archetype_field_name: Option> = if !archetype_field_name.is_none() { + Some(archetype_field_name.extract()?) + } else { + None + }; + + let component_name = component_descr.getattr(pyo3::intern!(py, "component_name"))?; + let component_name: Cow<'_, str> = component_name.extract()?; + + Ok(ComponentDescriptor { + archetype_name: archetype_name.map(|s| s.as_ref().into()), + archetype_field_name: archetype_field_name.map(|s| s.as_ref().into()), + component_name: component_name.as_ref().into(), + }) +} + /// Perform conversion between a pyarrow array to arrow2 types. /// /// `name` is the name of the Rerun component, and the name of the pyarrow `Field` (column name). pub fn array_to_rust( arrow_array: &Bound<'_, PyAny>, - name: &str, + component_descr: &ComponentDescriptor, ) -> PyResult<(Box, Field)> { let py_array: PyArrowType = arrow_array.extract()?; let arr1_array = make_array(py_array.0); @@ -33,34 +64,35 @@ pub fn array_to_rust( let arr2_array = arrow2::array::from_data(&data); let datatype = arr2_array.data_type().to_logical_type().clone(); - let field = Field::new(name, datatype.clone(), true); + let metadata = TransportChunk::field_metadata_component_descriptor(component_descr); + let field = Field::new( + component_descr.component_name.to_string(), + datatype.clone(), + true, + ) + .with_metadata(metadata); Ok((arr2_array, field)) } /// Build a [`PendingRow`] given a '**kwargs'-style dictionary of component arrays. pub fn build_row_from_components( - components: &Bound<'_, PyDict>, + components_per_descr: &Bound<'_, PyDict>, time_point: &TimePoint, ) -> PyResult { // Create row-id as early as possible. It has a timestamp and is used to estimate e2e latency. // TODO(emilk): move to before we arrow-serialize the data let row_id = RowId::new(); - let (arrays, fields): (Vec>, Vec) = itertools::process_results( - components.iter().map(|(name, array)| { - let py_name = name.downcast::()?; - let name: std::borrow::Cow<'_, str> = py_name.extract()?; - array_to_rust(&array, &name) - }), - |iter| iter.unzip(), - )?; + let mut components = IntMap::default(); + for (component_descr, array) in components_per_descr { + let component_descr = descriptor_to_rust(&component_descr)?; + // TODO: get rid of the useless field computation + let (list_array, _field) = array_to_rust(&array, &component_descr)?; - let components = arrays - .into_iter() - .zip(fields) - .map(|(value, field)| (ComponentDescriptor::new(field.name), value)) - .collect(); + // TODO: warning on collision or something? + components.insert(component_descr, list_array); + } Ok(PendingRow { row_id, @@ -69,11 +101,12 @@ pub fn build_row_from_components( }) } +// TODO: i remember there being a big issue with this thing... but not what /// Build a [`Chunk`] given a '**kwargs'-style dictionary of component arrays. pub fn build_chunk_from_components( entity_path: EntityPath, timelines: &Bound<'_, PyDict>, - components: &Bound<'_, PyDict>, + components_per_descr: &Bound<'_, PyDict>, ) -> PyResult { // Create chunk-id as early as possible. It has a timestamp and is used to estimate e2e latency. let chunk_id = ChunkId::new(); @@ -83,7 +116,7 @@ pub fn build_chunk_from_components( timelines.iter().map(|(name, array)| { let py_name = name.downcast::()?; let name: std::borrow::Cow<'_, str> = py_name.extract()?; - array_to_rust(&array, &name) + array_to_rust(&array, &ComponentDescriptor::new(name.to_string())) }), |iter| iter.unzip(), )?; @@ -122,15 +155,13 @@ pub fn build_chunk_from_components( // Extract the component data let (arrays, fields): (Vec>, Vec) = itertools::process_results( - components.iter().map(|(name, array)| { - let py_name = name.downcast::()?; - let name: std::borrow::Cow<'_, str> = py_name.extract()?; - array_to_rust(&array, &name) + components_per_descr.iter().map(|(component_descr, array)| { + array_to_rust(&array, &descriptor_to_rust(&component_descr)?) }), |iter| iter.unzip(), )?; - let components: Result, ChunkError> = arrays + let components: Result, ChunkError> = arrays .into_iter() .zip(fields) .map(|(value, field)| { diff --git a/rerun_py/src/video.rs b/rerun_py/src/video.rs index a81f6144469d3..1b59123461c89 100644 --- a/rerun_py/src/video.rs +++ b/rerun_py/src/video.rs @@ -1,6 +1,7 @@ #![allow(unsafe_op_in_unsafe_fn)] // False positive due to #[pyfunction] macro use pyo3::{exceptions::PyRuntimeError, pyfunction, Bound, PyAny, PyResult}; +use re_sdk::ComponentDescriptor; use re_video::VideoLoadError; use crate::arrow::array_to_rust; @@ -17,8 +18,13 @@ pub fn asset_video_read_frame_timestamps_ns( video_bytes_arrow_array: &Bound<'_, PyAny>, media_type: Option<&str>, ) -> PyResult> { - let video_bytes_arrow_array = - array_to_rust(video_bytes_arrow_array, "rerun.components.Blob")?.0; + // TODO: ??? + let component_descr = ComponentDescriptor { + archetype_name: None, + archetype_field_name: None, + component_name: "rerun.components.Blob".into(), + }; + let video_bytes_arrow_array = array_to_rust(video_bytes_arrow_array, &component_descr)?.0; let video_bytes_arrow_uint8_array = video_bytes_arrow_array .as_any() diff --git a/rerun_py/tests/test_types/components/affix_fuzzer1.py b/rerun_py/tests/test_types/components/affix_fuzzer1.py index f57aff533b071..3fd4419498098 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer1.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer1.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer1(datatypes.AffixFuzzer1, ComponentMixin): class AffixFuzzer1Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer1" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer1") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer10.py b/rerun_py/tests/test_types/components/affix_fuzzer10.py index fed541bece0ee..8da5e5425cdb2 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer10.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer10.py @@ -14,6 +14,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from rerun._converters import ( @@ -45,7 +46,7 @@ def __init__(self: Any, single_string_optional: str | None = None): class AffixFuzzer10Batch(BaseBatch[AffixFuzzer10ArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.utf8() - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer10" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer10") @staticmethod def _native_to_pa_array(data: AffixFuzzer10ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer11.py b/rerun_py/tests/test_types/components/affix_fuzzer11.py index b00f8a44ad6b7..5904fe79e8ae9 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer11.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer11.py @@ -14,6 +14,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from rerun._converters import ( @@ -49,7 +50,7 @@ def __array__(self, dtype: npt.DTypeLike = None) -> npt.NDArray[Any]: class AffixFuzzer11Batch(BaseBatch[AffixFuzzer11ArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.list_(pa.field("item", pa.float32(), nullable=False, metadata={})) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer11" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer11") @staticmethod def _native_to_pa_array(data: AffixFuzzer11ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer12.py b/rerun_py/tests/test_types/components/affix_fuzzer12.py index 510bd54ffbb51..400505f21287f 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer12.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer12.py @@ -12,6 +12,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -40,7 +41,7 @@ def __init__(self: Any, many_strings_required: AffixFuzzer12Like): class AffixFuzzer12Batch(BaseBatch[AffixFuzzer12ArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.list_(pa.field("item", pa.utf8(), nullable=False, metadata={})) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer12" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer12") @staticmethod def _native_to_pa_array(data: AffixFuzzer12ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer13.py b/rerun_py/tests/test_types/components/affix_fuzzer13.py index 169e61e20535a..6a4cf3d30295e 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer13.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer13.py @@ -12,6 +12,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -40,7 +41,7 @@ def __init__(self: Any, many_strings_optional: list[str] | None = None): class AffixFuzzer13Batch(BaseBatch[AffixFuzzer13ArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.list_(pa.field("item", pa.utf8(), nullable=False, metadata={})) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer13" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer13") @staticmethod def _native_to_pa_array(data: AffixFuzzer13ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer14.py b/rerun_py/tests/test_types/components/affix_fuzzer14.py index 1ca6a9b864822..f83fb9ccc3eac 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer14.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer14.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer14(datatypes.AffixFuzzer3, ComponentMixin): class AffixFuzzer14Batch(datatypes.AffixFuzzer3Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer14" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer14") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer15.py b/rerun_py/tests/test_types/components/affix_fuzzer15.py index f9d829e81c316..e4739479fc3b5 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer15.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer15.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer15(datatypes.AffixFuzzer3, ComponentMixin): class AffixFuzzer15Batch(datatypes.AffixFuzzer3Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer15" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer15") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer16.py b/rerun_py/tests/test_types/components/affix_fuzzer16.py index 74679e637bd63..a9897a77e156c 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer16.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer16.py @@ -12,6 +12,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -102,7 +103,7 @@ class AffixFuzzer16Batch(BaseBatch[AffixFuzzer16ArrayLike], ComponentBatchMixin) metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer16" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer16") @staticmethod def _native_to_pa_array(data: AffixFuzzer16ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer17.py b/rerun_py/tests/test_types/components/affix_fuzzer17.py index 029191165b1ed..f8fc9e0d2146e 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer17.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer17.py @@ -12,6 +12,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -102,7 +103,7 @@ class AffixFuzzer17Batch(BaseBatch[AffixFuzzer17ArrayLike], ComponentBatchMixin) metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer17" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer17") @staticmethod def _native_to_pa_array(data: AffixFuzzer17ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer18.py b/rerun_py/tests/test_types/components/affix_fuzzer18.py index b6c952e7da117..7fedf7d6d3061 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer18.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer18.py @@ -12,6 +12,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -186,7 +187,7 @@ class AffixFuzzer18Batch(BaseBatch[AffixFuzzer18ArrayLike], ComponentBatchMixin) metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer18" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer18") @staticmethod def _native_to_pa_array(data: AffixFuzzer18ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer19.py b/rerun_py/tests/test_types/components/affix_fuzzer19.py index 516fb58845ea4..f46765a528b5e 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer19.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer19.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer19(datatypes.AffixFuzzer5, ComponentMixin): class AffixFuzzer19Batch(datatypes.AffixFuzzer5Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer19" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer19") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer2.py b/rerun_py/tests/test_types/components/affix_fuzzer2.py index 669bc416c87ef..af49396243453 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer2.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer2.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer2(datatypes.AffixFuzzer1, ComponentMixin): class AffixFuzzer2Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer2" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer2") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer20.py b/rerun_py/tests/test_types/components/affix_fuzzer20.py index e0ac0cc7079f5..9e82c14efde67 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer20.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer20.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer20(datatypes.AffixFuzzer20, ComponentMixin): class AffixFuzzer20Batch(datatypes.AffixFuzzer20Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer20" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer20") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer21.py b/rerun_py/tests/test_types/components/affix_fuzzer21.py index 1b2fd426f6842..f0c39ede6e798 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer21.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer21.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer21(datatypes.AffixFuzzer21, ComponentMixin): class AffixFuzzer21Batch(datatypes.AffixFuzzer21Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer21" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer21") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer22.py b/rerun_py/tests/test_types/components/affix_fuzzer22.py index d0424bf3cfd12..6c26f27bccff5 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer22.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer22.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer22(datatypes.AffixFuzzer22, ComponentMixin): class AffixFuzzer22Batch(datatypes.AffixFuzzer22Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer22" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer22") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer23.py b/rerun_py/tests/test_types/components/affix_fuzzer23.py index 394a443d12196..925b56f63707f 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer23.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer23.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer23(datatypes.MultiEnum, ComponentMixin): class AffixFuzzer23Batch(datatypes.MultiEnumBatch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer23" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer23") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer3.py b/rerun_py/tests/test_types/components/affix_fuzzer3.py index 3f88f0452795e..9036aae110923 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer3.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer3.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer3(datatypes.AffixFuzzer1, ComponentMixin): class AffixFuzzer3Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer3" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer3") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer4.py b/rerun_py/tests/test_types/components/affix_fuzzer4.py index 8b925527394d6..93160dc56a8e1 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer4.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer4.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer4(datatypes.AffixFuzzer1, ComponentMixin): class AffixFuzzer4Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer4" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer4") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer5.py b/rerun_py/tests/test_types/components/affix_fuzzer5.py index dfaf3bb87bce4..ed26cb958ef02 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer5.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer5.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer5(datatypes.AffixFuzzer1, ComponentMixin): class AffixFuzzer5Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer5" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer5") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer6.py b/rerun_py/tests/test_types/components/affix_fuzzer6.py index 9fc6f5898d510..35ab660a80b02 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer6.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer6.py @@ -7,6 +7,7 @@ from rerun._baseclasses import ( ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -24,7 +25,7 @@ class AffixFuzzer6(datatypes.AffixFuzzer1, ComponentMixin): class AffixFuzzer6Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer6" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer6") # This is patched in late to avoid circular dependencies. diff --git a/rerun_py/tests/test_types/components/affix_fuzzer7.py b/rerun_py/tests/test_types/components/affix_fuzzer7.py index d5bfc4ad5c541..b88b69ae8d358 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer7.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer7.py @@ -12,6 +12,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -79,7 +80,7 @@ class AffixFuzzer7Batch(BaseBatch[AffixFuzzer7ArrayLike], ComponentBatchMixin): metadata={}, ) ) - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer7" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer7") @staticmethod def _native_to_pa_array(data: AffixFuzzer7ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer8.py b/rerun_py/tests/test_types/components/affix_fuzzer8.py index 24f8ee602c525..4dd319b26ee28 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer8.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer8.py @@ -14,6 +14,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) from rerun._converters import ( @@ -49,7 +50,7 @@ def __array__(self, dtype: npt.DTypeLike = None) -> npt.NDArray[Any]: class AffixFuzzer8Batch(BaseBatch[AffixFuzzer8ArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.float32() - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer8" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer8") @staticmethod def _native_to_pa_array(data: AffixFuzzer8ArrayLike, data_type: pa.DataType) -> pa.Array: diff --git a/rerun_py/tests/test_types/components/affix_fuzzer9.py b/rerun_py/tests/test_types/components/affix_fuzzer9.py index 93b09bf4f32a2..9f8086730fc38 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer9.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer9.py @@ -14,6 +14,7 @@ from rerun._baseclasses import ( BaseBatch, ComponentBatchMixin, + ComponentDescriptor, ComponentMixin, ) @@ -48,7 +49,7 @@ def __hash__(self) -> int: class AffixFuzzer9Batch(BaseBatch[AffixFuzzer9ArrayLike], ComponentBatchMixin): _ARROW_DATATYPE = pa.utf8() - _COMPONENT_NAME: str = "rerun.testing.components.AffixFuzzer9" + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.testing.components.AffixFuzzer9") @staticmethod def _native_to_pa_array(data: AffixFuzzer9ArrayLike, data_type: pa.DataType) -> pa.Array: