From 38dc95c485b67642e8bc6b383933aff7383b40c8 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 11 Jun 2024 16:12:38 -0400 Subject: [PATCH 1/5] Introduce new ComponentMixin --- rerun_py/rerun_sdk/rerun/_baseclasses.py | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/rerun_py/rerun_sdk/rerun/_baseclasses.py b/rerun_py/rerun_sdk/rerun/_baseclasses.py index dac1b17648f7..15b48d60e86a 100644 --- a/rerun_py/rerun_sdk/rerun/_baseclasses.py +++ b/rerun_py/rerun_sdk/rerun/_baseclasses.py @@ -275,6 +275,32 @@ def component_name(self) -> str: return self._ARROW_TYPE._TYPE_NAME # type: ignore[attr-defined, no-any-return] +class ComponentMixin(ComponentBatchLike): + """ + Makes components adhere to the ComponentBatchLike interface. + + A single component will always map to a batch of size 1. + + The class using the mixin must define the `_BATCH_TYPE` field, which should be a subclass of `BaseBatch`. + """ + + def component_name(self) -> str: + """ + The name of the component. + + Part of the `ComponentBatchLike` logging interface. + """ + return self._BATCH_TYPE._ARROW_TYPE._TYPE_NAME # type: ignore[attr-defined, no-any-return] + + def as_arrow_array(self) -> pa.Array: + """ + The component as an arrow batch. + + Part of the `ComponentBatchLike` logging interface. + """ + return self._BATCH_TYPE([self]).as_arrow_array() # type: ignore[attr-defined, no-any-return] + + @catch_and_log_exceptions(context="creating empty array") def _empty_pa_array(type: pa.DataType) -> pa.Array: if type == pa.null(): From 3f4b66447ded21ae8eeecd78b1fa16b7988a0805 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 11 Jun 2024 16:36:28 -0400 Subject: [PATCH 2/5] Make all components include the ComponentMixin with the correct BatchType --- crates/re_types_builder/src/codegen/python/mod.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/crates/re_types_builder/src/codegen/python/mod.rs b/crates/re_types_builder/src/codegen/python/mod.rs index 7e23a128b3b5..1fcb8b2f13d7 100644 --- a/crates/re_types_builder/src/codegen/python/mod.rs +++ b/crates/re_types_builder/src/codegen/python/mod.rs @@ -390,7 +390,8 @@ impl PythonCodeGenerator { Archetype, BaseExtensionType, BaseBatch, - ComponentBatchMixin + ComponentBatchMixin, + ComponentMixin, ) from {rerun_path}_converters import ( int_or_none, @@ -612,6 +613,10 @@ fn code_for_struct( )); } + if *kind == ObjectKind::Component { + superclasses.push("ComponentMixin".to_owned()); + } + if let Some(deprecation_notice) = obj.deprecation_notice() { code.push_unindented(format!(r#"@deprecated("""{deprecation_notice}""")"#), 1); } @@ -634,6 +639,10 @@ fn code_for_struct( code.push_indented(1, quote_obj_docs(obj), 0); + if *kind == ObjectKind::Component { + code.push_indented(1, "_BATCH_TYPE = None", 1); + } + if ext_class.has_init { code.push_indented( 1, @@ -1828,6 +1837,9 @@ fn quote_arrow_support_from_obj( class {extension_batch}{batch_superclass_decl}: _ARROW_TYPE = {extension_type}() + + # This is patched in late to avoid circular dependencies. + {name}._BATCH_TYPE = {extension_batch} # type: ignore[assignment] "# )) } From 4a9b3143e0e6940f222d02a4f0ba05290e6ba76c Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 11 Jun 2024 16:51:42 -0400 Subject: [PATCH 3/5] Codegen --- .../rerun_sdk/rerun/archetypes/annotation_context.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/arrows2d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/arrows3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/asset3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/axes3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/bar_chart.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/boxes2d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/boxes3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/clear.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/depth_image.py | 4 +++- .../rerun_sdk/rerun/archetypes/disconnected_space.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/image.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/line_strips2d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/line_strips3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/pinhole.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/points2d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/points3d.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/scalar.py | 4 +++- .../rerun_sdk/rerun/archetypes/segmentation_image.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/series_line.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/series_point.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/tensor.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/text_document.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/text_log.py | 4 +++- rerun_py/rerun_sdk/rerun/archetypes/transform3d.py | 4 +++- .../rerun_sdk/rerun/archetypes/view_coordinates.py | 4 +++- .../rerun/blueprint/archetypes/background.py | 4 +++- .../blueprint/archetypes/container_blueprint.py | 4 +++- .../rerun/blueprint/archetypes/panel_blueprint.py | 4 +++- .../rerun/blueprint/archetypes/plot_legend.py | 4 +++- .../rerun/blueprint/archetypes/scalar_axis.py | 4 +++- .../blueprint/archetypes/space_view_blueprint.py | 4 +++- .../blueprint/archetypes/space_view_contents.py | 4 +++- .../rerun/blueprint/archetypes/viewport_blueprint.py | 4 +++- .../blueprint/archetypes/visible_time_ranges.py | 4 +++- .../rerun/blueprint/archetypes/visual_bounds2d.py | 4 +++- .../rerun/blueprint/components/active_tab.py | 12 ++++++++++-- .../rerun/blueprint/components/auto_layout.py | 11 +++++++++-- .../rerun/blueprint/components/auto_space_views.py | 11 +++++++++-- .../rerun/blueprint/components/background_kind.py | 6 +++++- .../rerun/blueprint/components/column_share.py | 11 +++++++++-- .../rerun/blueprint/components/container_kind.py | 6 +++++- .../rerun_sdk/rerun/blueprint/components/corner2d.py | 6 +++++- .../components/entity_properties_component.py | 11 +++++++++-- .../rerun/blueprint/components/grid_columns.py | 11 +++++++++-- .../rerun/blueprint/components/included_content.py | 12 ++++++++++-- .../blueprint/components/included_space_view.py | 12 ++++++++++-- .../blueprint/components/lock_range_during_zoom.py | 12 ++++++++++-- .../rerun/blueprint/components/panel_state.py | 6 +++++- .../rerun/blueprint/components/query_expression.py | 12 ++++++++++-- .../rerun/blueprint/components/root_container.py | 12 ++++++++++-- .../rerun/blueprint/components/row_share.py | 11 +++++++++-- .../rerun/blueprint/components/space_view_class.py | 12 ++++++++++-- .../blueprint/components/space_view_maximized.py | 12 ++++++++++-- .../rerun/blueprint/components/space_view_origin.py | 12 ++++++++++-- .../components/viewer_recommendation_hash.py | 12 ++++++++++-- .../rerun_sdk/rerun/blueprint/components/visible.py | 11 +++++++++-- .../rerun/blueprint/components/visible_time_range.py | 12 ++++++++++-- .../rerun/blueprint/components/visual_bounds2d.py | 12 ++++++++++-- .../rerun_sdk/rerun/components/annotation_context.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/axis_length.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/blob.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/class_id.py | 12 ++++++++++-- .../rerun_sdk/rerun/components/clear_is_recursive.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/color.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/depth_meter.py | 11 +++++++++-- .../rerun_sdk/rerun/components/disconnected_space.py | 10 ++++++++-- rerun_py/rerun_sdk/rerun/components/draw_order.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/half_sizes2d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/half_sizes3d.py | 12 ++++++++++-- .../rerun/components/image_plane_distance.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/keypoint_id.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/line_strip2d.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/line_strip3d.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/marker_shape.py | 6 +++++- rerun_py/rerun_sdk/rerun/components/marker_size.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/material.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/media_type.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/name.py | 12 ++++++++++-- .../rerun/components/out_of_tree_transform3d.py | 12 ++++++++++-- .../rerun_sdk/rerun/components/pinhole_projection.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/position2d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/position3d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/radius.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/range1d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/resolution.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/rotation3d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/scalar.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/stroke_width.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/components/tensor_data.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/texcoord2d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/text.py | 12 ++++++++++-- .../rerun_sdk/rerun/components/text_log_level.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/transform3d.py | 12 ++++++++++-- .../rerun_sdk/rerun/components/triangle_indices.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/vector2d.py | 12 ++++++++++-- rerun_py/rerun_sdk/rerun/components/vector3d.py | 12 ++++++++++-- .../rerun_sdk/rerun/components/view_coordinates.py | 11 +++++++++-- .../rerun/components/visualizer_overrides.py | 11 +++++++++-- rerun_py/rerun_sdk/rerun/datatypes/angle.py | 5 ++++- .../rerun_sdk/rerun/datatypes/annotation_info.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/bool.py | 5 ++++- .../rerun_sdk/rerun/datatypes/class_description.py | 5 ++++- .../rerun/datatypes/class_description_map_elem.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/class_id.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/entity_path.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/float32.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/keypoint_id.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/keypoint_pair.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/mat3x3.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/mat4x4.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/material.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/quaternion.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/range1d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/range2d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/rgba32.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/rotation3d.py | 5 ++++- .../rerun_sdk/rerun/datatypes/rotation_axis_angle.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/scale3d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/tensor_buffer.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/tensor_data.py | 5 ++++- .../rerun_sdk/rerun/datatypes/tensor_dimension.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/time_int.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/time_range.py | 5 ++++- .../rerun_sdk/rerun/datatypes/time_range_boundary.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/transform3d.py | 5 ++++- .../rerun/datatypes/translation_and_mat3x3.py | 5 ++++- .../rerun/datatypes/translation_rotation_scale3d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/uint32.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/uint64.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/utf8.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/uuid.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/uvec2d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/uvec3d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/uvec4d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/vec2d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/vec3d.py | 5 ++++- rerun_py/rerun_sdk/rerun/datatypes/vec4d.py | 5 ++++- .../rerun_sdk/rerun/datatypes/visible_time_range.py | 5 ++++- .../tests/test_types/archetypes/affix_fuzzer1.py | 4 +++- .../tests/test_types/archetypes/affix_fuzzer2.py | 4 +++- .../tests/test_types/archetypes/affix_fuzzer3.py | 4 +++- .../tests/test_types/archetypes/affix_fuzzer4.py | 4 +++- .../tests/test_types/components/affix_fuzzer1.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer10.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer11.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer12.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer13.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer14.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer15.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer16.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer17.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer18.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer19.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer2.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer20.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer21.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer22.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer3.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer4.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer5.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer6.py | 12 ++++++++++-- .../tests/test_types/components/affix_fuzzer7.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer8.py | 11 +++++++++-- .../tests/test_types/components/affix_fuzzer9.py | 11 +++++++++-- rerun_py/tests/test_types/components/enum_test.py | 6 +++++- rerun_py/tests/test_types/datatypes/affix_fuzzer1.py | 5 ++++- rerun_py/tests/test_types/datatypes/affix_fuzzer2.py | 5 ++++- .../tests/test_types/datatypes/affix_fuzzer20.py | 5 ++++- .../tests/test_types/datatypes/affix_fuzzer21.py | 5 ++++- .../tests/test_types/datatypes/affix_fuzzer22.py | 5 ++++- rerun_py/tests/test_types/datatypes/affix_fuzzer3.py | 5 ++++- rerun_py/tests/test_types/datatypes/affix_fuzzer4.py | 5 ++++- rerun_py/tests/test_types/datatypes/affix_fuzzer5.py | 5 ++++- .../tests/test_types/datatypes/flattened_scalar.py | 5 ++++- .../test_types/datatypes/primitive_component.py | 5 ++++- .../tests/test_types/datatypes/string_component.py | 5 ++++- 178 files changed, 1125 insertions(+), 258 deletions(-) diff --git a/rerun_py/rerun_sdk/rerun/archetypes/annotation_context.py b/rerun_py/rerun_sdk/rerun/archetypes/annotation_context.py index 45057b60f7d3..cda23cb3e83c 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/annotation_context.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/annotation_context.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["AnnotationContext"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/arrows2d.py b/rerun_py/rerun_sdk/rerun/archetypes/arrows2d.py index 2ccd1df6768a..e7dc50383002 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/arrows2d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/arrows2d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .arrows2d_ext import Arrows2DExt __all__ = ["Arrows2D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/arrows3d.py b/rerun_py/rerun_sdk/rerun/archetypes/arrows3d.py index bd59135e9929..136032200874 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/arrows3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/arrows3d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .arrows3d_ext import Arrows3DExt __all__ = ["Arrows3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py b/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py index 1fedc8674d81..709ca1cdc643 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .asset3d_ext import Asset3DExt __all__ = ["Asset3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/axes3d.py b/rerun_py/rerun_sdk/rerun/archetypes/axes3d.py index e4c1d13ffb5a..e86e7f4243f9 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/axes3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/axes3d.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["Axes3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/bar_chart.py b/rerun_py/rerun_sdk/rerun/archetypes/bar_chart.py index f064752589cb..7468e6393ed4 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/bar_chart.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/bar_chart.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions from .bar_chart_ext import BarChartExt diff --git a/rerun_py/rerun_sdk/rerun/archetypes/boxes2d.py b/rerun_py/rerun_sdk/rerun/archetypes/boxes2d.py index 752998292eb8..4263784bb717 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/boxes2d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/boxes2d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .boxes2d_ext import Boxes2DExt __all__ = ["Boxes2D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/boxes3d.py b/rerun_py/rerun_sdk/rerun/archetypes/boxes3d.py index 1e6344d3e954..c5cdf206da10 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/boxes3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/boxes3d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .boxes3d_ext import Boxes3DExt __all__ = ["Boxes3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/clear.py b/rerun_py/rerun_sdk/rerun/archetypes/clear.py index 7ef92b975bff..b647b0eaf52e 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/clear.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/clear.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .clear_ext import ClearExt __all__ = ["Clear"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/depth_image.py b/rerun_py/rerun_sdk/rerun/archetypes/depth_image.py index 24b0a8881c58..4b0246809aca 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/depth_image.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/depth_image.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions from .depth_image_ext import DepthImageExt diff --git a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py index 81cee41c8624..00a1c47a82ab 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .disconnected_space_ext import DisconnectedSpaceExt __all__ = ["DisconnectedSpace"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/image.py b/rerun_py/rerun_sdk/rerun/archetypes/image.py index 1135219aa32e..bc31e08370ef 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/image.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/image.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions from .image_ext import ImageExt diff --git a/rerun_py/rerun_sdk/rerun/archetypes/line_strips2d.py b/rerun_py/rerun_sdk/rerun/archetypes/line_strips2d.py index 62a20a555024..44a2643c483b 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/line_strips2d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/line_strips2d.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["LineStrips2D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/line_strips3d.py b/rerun_py/rerun_sdk/rerun/archetypes/line_strips3d.py index 525f2fb83e1d..07961cf0e057 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/line_strips3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/line_strips3d.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["LineStrips3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py b/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py index 2f8b041afbf8..ec89cb48fc39 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/mesh3d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .mesh3d_ext import Mesh3DExt __all__ = ["Mesh3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/pinhole.py b/rerun_py/rerun_sdk/rerun/archetypes/pinhole.py index c66fac6298fb..c47efbef9090 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/pinhole.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/pinhole.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .pinhole_ext import PinholeExt __all__ = ["Pinhole"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/points2d.py b/rerun_py/rerun_sdk/rerun/archetypes/points2d.py index a6214b8048ec..5c099f0ae712 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/points2d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/points2d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .points2d_ext import Points2DExt __all__ = ["Points2D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/points3d.py b/rerun_py/rerun_sdk/rerun/archetypes/points3d.py index 42dae9d5fd9a..4324c44a5917 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/points3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/points3d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .points3d_ext import Points3DExt __all__ = ["Points3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/scalar.py b/rerun_py/rerun_sdk/rerun/archetypes/scalar.py index 965d6d70866d..756c548794c5 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/scalar.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/scalar.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["Scalar"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py b/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py index 024273b80c7a..e59ecd142a78 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions from .segmentation_image_ext import SegmentationImageExt diff --git a/rerun_py/rerun_sdk/rerun/archetypes/series_line.py b/rerun_py/rerun_sdk/rerun/archetypes/series_line.py index c51e444f8b21..bc780e592459 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/series_line.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/series_line.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["SeriesLine"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/series_point.py b/rerun_py/rerun_sdk/rerun/archetypes/series_point.py index 125417918eaa..ccd0deaed589 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/series_point.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/series_point.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["SeriesPoint"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/tensor.py b/rerun_py/rerun_sdk/rerun/archetypes/tensor.py index c7fa4e04dfda..f3cab9915526 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/tensor.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/tensor.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .tensor_ext import TensorExt __all__ = ["Tensor"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/text_document.py b/rerun_py/rerun_sdk/rerun/archetypes/text_document.py index 43f28c60a779..cc19138d6437 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/text_document.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/text_document.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["TextDocument"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/text_log.py b/rerun_py/rerun_sdk/rerun/archetypes/text_log.py index 7b8251ad8c8e..c2bbc3f62b31 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/text_log.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/text_log.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components, datatypes -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions __all__ = ["TextLog"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py index 49f89f85d1ee..76724845d19f 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py @@ -8,7 +8,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from .transform3d_ext import Transform3DExt __all__ = ["Transform3D"] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py b/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py index fbd722bfd5ec..eac08f7b9d19 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py @@ -10,7 +10,9 @@ from attrs import define, field from .. import components -from .._baseclasses import Archetype +from .._baseclasses import ( + Archetype, +) from ..error_utils import catch_and_log_exceptions from .view_coordinates_ext import ViewCoordinatesExt diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py index ae11dbd636a1..f00a998162d8 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/background.py @@ -8,7 +8,9 @@ from attrs import define, field from ... import components -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from .background_ext import BackgroundExt diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py index b8136173a5da..fef9e6dfafbb 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/container_blueprint.py @@ -10,7 +10,9 @@ from attrs import define, field from ... import components, datatypes -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from ...error_utils import catch_and_log_exceptions diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/panel_blueprint.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/panel_blueprint.py index d64cae4055fa..a16276a5cc9b 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/panel_blueprint.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/panel_blueprint.py @@ -9,7 +9,9 @@ from attrs import define, field -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from ...error_utils import catch_and_log_exceptions diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/plot_legend.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/plot_legend.py index c752f9323b5d..b77ae96c1f44 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/plot_legend.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/plot_legend.py @@ -7,7 +7,9 @@ from attrs import define, field -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from .plot_legend_ext import PlotLegendExt diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/scalar_axis.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/scalar_axis.py index a4bdc332f1bd..03cce77e7b06 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/scalar_axis.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/scalar_axis.py @@ -10,7 +10,9 @@ from attrs import define, field from ... import components, datatypes -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from ...error_utils import catch_and_log_exceptions diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_blueprint.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_blueprint.py index 5d1ecc8dc25e..082d1aa4f4f3 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_blueprint.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_blueprint.py @@ -10,7 +10,9 @@ from attrs import define, field from ... import components, datatypes -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from ...error_utils import catch_and_log_exceptions diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_contents.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_contents.py index 0f4a861853b9..41e24967f640 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_contents.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/space_view_contents.py @@ -10,7 +10,9 @@ from attrs import define, field from ... import datatypes -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from ...error_utils import catch_and_log_exceptions diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/viewport_blueprint.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/viewport_blueprint.py index 1db5b3fa453a..fe250f396988 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/viewport_blueprint.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/viewport_blueprint.py @@ -10,7 +10,9 @@ from attrs import define, field from ... import datatypes -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from ...error_utils import catch_and_log_exceptions diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visible_time_ranges.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visible_time_ranges.py index 8e9192bdee8f..dcda3bde47cb 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visible_time_ranges.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visible_time_ranges.py @@ -7,7 +7,9 @@ from attrs import define, field -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from .visible_time_ranges_ext import VisibleTimeRangesExt diff --git a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visual_bounds2d.py b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visual_bounds2d.py index c9b746f4868a..726eecd2f319 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visual_bounds2d.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/archetypes/visual_bounds2d.py @@ -7,7 +7,9 @@ from attrs import define, field -from ..._baseclasses import Archetype +from ..._baseclasses import ( + Archetype, +) from ...blueprint import components as blueprint_components from .visual_bounds2d_ext import VisualBounds2DExt 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 edef81ba7d69..f770a3e164b7 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/active_tab.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/active_tab.py @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["ActiveTab", "ActiveTabBatch", "ActiveTabType"] -class ActiveTab(datatypes.EntityPath): +class ActiveTab(datatypes.EntityPath, ComponentMixin): """**Component**: The active tab in a tabbed container.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of ActiveTabExt in active_tab_ext.py # Note: there are no fields here because ActiveTab delegates to datatypes.EntityPath @@ -26,3 +30,7 @@ class ActiveTabType(datatypes.EntityPathType): class ActiveTabBatch(datatypes.EntityPathBatch, ComponentBatchMixin): _ARROW_TYPE = ActiveTabType() + + +# This is patched in late to avoid circular dependencies. +ActiveTab._BATCH_TYPE = ActiveTabBatch # type: ignore[assignment] 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 f4b14b9dfee9..d275b7fac36f 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py @@ -11,15 +11,22 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["AutoLayout", "AutoLayoutArrayLike", "AutoLayoutBatch", "AutoLayoutLike", "AutoLayoutType"] @define(init=False) -class AutoLayout: +class AutoLayout(ComponentMixin): """**Component**: Whether the viewport layout is determined automatically.""" + _BATCH_TYPE = None + def __init__(self: Any, auto_layout: AutoLayoutLike): """Create a new instance of the AutoLayout component.""" 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 2b865268f3d1..6bfad3287527 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 @@ -11,7 +11,12 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = [ "AutoSpaceViews", @@ -23,9 +28,11 @@ @define(init=False) -class AutoSpaceViews: +class AutoSpaceViews(ComponentMixin): """**Component**: Whether or not space views should be created automatically.""" + _BATCH_TYPE = None + def __init__(self: Any, auto_space_views: AutoSpaceViewsLike): """Create a new instance of the AutoSpaceViews component.""" 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 731abe56d36e..556bd236c64d 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/background_kind.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/background_kind.py @@ -9,7 +9,11 @@ import pyarrow as pa -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, +) __all__ = [ "BackgroundKind", 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 18a92c8f146f..96ff7883ebf2 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["ColumnShare", "ColumnShareArrayLike", "ColumnShareBatch", "ColumnShareLike", "ColumnShareType"] @define(init=False) -class ColumnShare: +class ColumnShare(ComponentMixin): """**Component**: The layout share of a column in the container.""" + _BATCH_TYPE = None + def __init__(self: Any, share: ColumnShareLike): """ Create a new instance of the ColumnShare component. 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 4c766ca14458..228a77ec24ec 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/container_kind.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/container_kind.py @@ -9,7 +9,11 @@ import pyarrow as pa -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, +) __all__ = ["ContainerKind", "ContainerKindArrayLike", "ContainerKindBatch", "ContainerKindLike", "ContainerKindType"] diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py b/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py index c76aca6a292e..1ccee196871c 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/corner2d.py @@ -9,7 +9,11 @@ import pyarrow as pa -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, +) __all__ = ["Corner2D", "Corner2DArrayLike", "Corner2DBatch", "Corner2DLike", "Corner2DType"] diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py b/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py index c2e19b0940e9..c892d260a96c 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py @@ -12,7 +12,12 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from ..._converters import ( to_np_uint8, ) @@ -27,9 +32,11 @@ @define(init=False) -class EntityPropertiesComponent: +class EntityPropertiesComponent(ComponentMixin): """**Component**: The configurable set of overridable properties.""" + _BATCH_TYPE = None + def __init__(self: Any, props: EntityPropertiesComponentLike): """Create a new instance of the EntityPropertiesComponent component.""" 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 b5f625d155d6..39cfefea9f0e 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["GridColumns", "GridColumnsArrayLike", "GridColumnsBatch", "GridColumnsLike", "GridColumnsType"] @define(init=False) -class GridColumns: +class GridColumns(ComponentMixin): """**Component**: How many columns a grid container should have.""" + _BATCH_TYPE = None + def __init__(self: Any, columns: GridColumnsLike): """ Create a new instance of the GridColumns component. 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 4c718676fb18..05b2d7d34ab6 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/included_content.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/included_content.py @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["IncludedContent", "IncludedContentBatch", "IncludedContentType"] -class IncludedContent(datatypes.EntityPath): +class IncludedContent(datatypes.EntityPath, ComponentMixin): """**Component**: All the contents in the container.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of IncludedContentExt in included_content_ext.py # Note: there are no fields here because IncludedContent delegates to datatypes.EntityPath @@ -26,3 +30,7 @@ class IncludedContentType(datatypes.EntityPathType): class IncludedContentBatch(datatypes.EntityPathBatch, ComponentBatchMixin): _ARROW_TYPE = IncludedContentType() + + +# This is patched in late to avoid circular dependencies. +IncludedContent._BATCH_TYPE = IncludedContentBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/included_space_view.py b/rerun_py/rerun_sdk/rerun/blueprint/components/included_space_view.py index 11479a2788f7..87eb2080a32a 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/included_space_view.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/included_space_view.py @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["IncludedSpaceView", "IncludedSpaceViewBatch", "IncludedSpaceViewType"] -class IncludedSpaceView(datatypes.Uuid): +class IncludedSpaceView(datatypes.Uuid, ComponentMixin): """**Component**: The unique id of a space view, used to refer to views in containers.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of IncludedSpaceViewExt in included_space_view_ext.py # Note: there are no fields here because IncludedSpaceView delegates to datatypes.Uuid @@ -26,3 +30,7 @@ class IncludedSpaceViewType(datatypes.UuidType): class IncludedSpaceViewBatch(datatypes.UuidBatch, ComponentBatchMixin): _ARROW_TYPE = IncludedSpaceViewType() + + +# This is patched in late to avoid circular dependencies. +IncludedSpaceView._BATCH_TYPE = IncludedSpaceViewBatch # type: ignore[assignment] 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 0a91e50decaa..3b0ba6326b9c 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 @@ -6,18 +6,22 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["LockRangeDuringZoom", "LockRangeDuringZoomBatch", "LockRangeDuringZoomType"] -class LockRangeDuringZoom(datatypes.Bool): +class LockRangeDuringZoom(datatypes.Bool, ComponentMixin): """ **Component**: Indicate whether the range should be locked when zooming in on the data. Default is `false`, i.e. zoom will change the visualized range. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of LockRangeDuringZoomExt in lock_range_during_zoom_ext.py # Note: there are no fields here because LockRangeDuringZoom delegates to datatypes.Bool @@ -30,3 +34,7 @@ class LockRangeDuringZoomType(datatypes.BoolType): class LockRangeDuringZoomBatch(datatypes.BoolBatch, ComponentBatchMixin): _ARROW_TYPE = LockRangeDuringZoomType() + + +# This is patched in late to avoid circular dependencies. +LockRangeDuringZoom._BATCH_TYPE = LockRangeDuringZoomBatch # type: ignore[assignment] 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 d3a62e31b1c1..684d74d9ab58 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/panel_state.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/panel_state.py @@ -9,7 +9,11 @@ import pyarrow as pa -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, +) __all__ = ["PanelState", "PanelStateArrayLike", "PanelStateBatch", "PanelStateLike", "PanelStateType"] 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 9d6b437b6657..0ff995c76401 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/query_expression.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/query_expression.py @@ -6,12 +6,15 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["QueryExpression", "QueryExpressionBatch", "QueryExpressionType"] -class QueryExpression(datatypes.Utf8): +class QueryExpression(datatypes.Utf8, ComponentMixin): """ **Component**: An individual `QueryExpression` used to filter a set of `EntityPath`s. @@ -25,6 +28,7 @@ class QueryExpression(datatypes.Utf8): Other uses of `*` are not (yet) supported. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of QueryExpressionExt in query_expression_ext.py # Note: there are no fields here because QueryExpression delegates to datatypes.Utf8 @@ -37,3 +41,7 @@ class QueryExpressionType(datatypes.Utf8Type): class QueryExpressionBatch(datatypes.Utf8Batch, ComponentBatchMixin): _ARROW_TYPE = QueryExpressionType() + + +# This is patched in late to avoid circular dependencies. +QueryExpression._BATCH_TYPE = QueryExpressionBatch # type: ignore[assignment] 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 5f2eaa5558c0..f8b5db539f81 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/root_container.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/root_container.py @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["RootContainer", "RootContainerBatch", "RootContainerType"] -class RootContainer(datatypes.Uuid): +class RootContainer(datatypes.Uuid, ComponentMixin): """**Component**: The container that sits at the root of a viewport.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of RootContainerExt in root_container_ext.py # Note: there are no fields here because RootContainer delegates to datatypes.Uuid @@ -26,3 +30,7 @@ class RootContainerType(datatypes.UuidType): class RootContainerBatch(datatypes.UuidBatch, ComponentBatchMixin): _ARROW_TYPE = RootContainerType() + + +# This is patched in late to avoid circular dependencies. +RootContainer._BATCH_TYPE = RootContainerBatch # type: ignore[assignment] 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 8d5d3ba48156..6b36b9a426a3 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["RowShare", "RowShareArrayLike", "RowShareBatch", "RowShareLike", "RowShareType"] @define(init=False) -class RowShare: +class RowShare(ComponentMixin): """**Component**: The layout share of a row in the container.""" + _BATCH_TYPE = None + def __init__(self: Any, share: RowShareLike): """ Create a new instance of the RowShare component. 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 b4566eb61718..53cde29bdc52 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 @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["SpaceViewClass", "SpaceViewClassBatch", "SpaceViewClassType"] -class SpaceViewClass(datatypes.Utf8): +class SpaceViewClass(datatypes.Utf8, ComponentMixin): """**Component**: The class of a `SpaceView`.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of SpaceViewClassExt in space_view_class_ext.py # Note: there are no fields here because SpaceViewClass delegates to datatypes.Utf8 @@ -26,3 +30,7 @@ class SpaceViewClassType(datatypes.Utf8Type): class SpaceViewClassBatch(datatypes.Utf8Batch, ComponentBatchMixin): _ARROW_TYPE = SpaceViewClassType() + + +# This is patched in late to avoid circular dependencies. +SpaceViewClass._BATCH_TYPE = SpaceViewClassBatch # type: ignore[assignment] 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 da51b5597ee1..eb6bf2d5b7c3 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 @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["SpaceViewMaximized", "SpaceViewMaximizedBatch", "SpaceViewMaximizedType"] -class SpaceViewMaximized(datatypes.Uuid): +class SpaceViewMaximized(datatypes.Uuid, ComponentMixin): """**Component**: Whether a space view is maximized.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of SpaceViewMaximizedExt in space_view_maximized_ext.py # Note: there are no fields here because SpaceViewMaximized delegates to datatypes.Uuid @@ -26,3 +30,7 @@ class SpaceViewMaximizedType(datatypes.UuidType): class SpaceViewMaximizedBatch(datatypes.UuidBatch, ComponentBatchMixin): _ARROW_TYPE = SpaceViewMaximizedType() + + +# This is patched in late to avoid circular dependencies. +SpaceViewMaximized._BATCH_TYPE = SpaceViewMaximizedBatch # type: ignore[assignment] 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 c0436d188c51..343691a22364 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 @@ -6,14 +6,18 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["SpaceViewOrigin", "SpaceViewOriginBatch", "SpaceViewOriginType"] -class SpaceViewOrigin(datatypes.EntityPath): +class SpaceViewOrigin(datatypes.EntityPath, ComponentMixin): """**Component**: The origin of a `SpaceView`.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of SpaceViewOriginExt in space_view_origin_ext.py # Note: there are no fields here because SpaceViewOrigin delegates to datatypes.EntityPath @@ -26,3 +30,7 @@ class SpaceViewOriginType(datatypes.EntityPathType): class SpaceViewOriginBatch(datatypes.EntityPathBatch, ComponentBatchMixin): _ARROW_TYPE = SpaceViewOriginType() + + +# This is patched in late to avoid circular dependencies. +SpaceViewOrigin._BATCH_TYPE = SpaceViewOriginBatch # type: ignore[assignment] 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 b8b3c2b1ce4e..c613898eb2a3 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 @@ -6,18 +6,22 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["ViewerRecommendationHash", "ViewerRecommendationHashBatch", "ViewerRecommendationHashType"] -class ViewerRecommendationHash(datatypes.UInt64): +class ViewerRecommendationHash(datatypes.UInt64, ComponentMixin): """ **Component**: Hash of a viewer recommendation. The formation of this hash is considered an internal implementation detail of the viewer. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of ViewerRecommendationHashExt in viewer_recommendation_hash_ext.py # Note: there are no fields here because ViewerRecommendationHash delegates to datatypes.UInt64 @@ -30,3 +34,7 @@ class ViewerRecommendationHashType(datatypes.UInt64Type): class ViewerRecommendationHashBatch(datatypes.UInt64Batch, ComponentBatchMixin): _ARROW_TYPE = ViewerRecommendationHashType() + + +# This is patched in late to avoid circular dependencies. +ViewerRecommendationHash._BATCH_TYPE = ViewerRecommendationHashBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py b/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py index 59d3fbc9a6e5..7e48919d4555 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py @@ -11,15 +11,22 @@ import pyarrow as pa from attrs import define, field -from ..._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from ..._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Visible", "VisibleArrayLike", "VisibleBatch", "VisibleLike", "VisibleType"] @define(init=False) -class Visible: +class Visible(ComponentMixin): """**Component**: Whether the container, space view, entity or instance is currently visible.""" + _BATCH_TYPE = None + def __init__(self: Any, visible: VisibleLike): """Create a new instance of the Visible component.""" 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 5573034a531b..0929fbbb4ad6 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 @@ -6,18 +6,22 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["VisibleTimeRange", "VisibleTimeRangeBatch", "VisibleTimeRangeType"] -class VisibleTimeRange(datatypes.VisibleTimeRange): +class VisibleTimeRange(datatypes.VisibleTimeRange, ComponentMixin): """ **Component**: The range of values on a given timeline that will be included in a view's query. Refer to `VisibleTimeRanges` archetype for more information. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of VisibleTimeRangeExt in visible_time_range_ext.py # Note: there are no fields here because VisibleTimeRange delegates to datatypes.VisibleTimeRange @@ -30,3 +34,7 @@ class VisibleTimeRangeType(datatypes.VisibleTimeRangeType): class VisibleTimeRangeBatch(datatypes.VisibleTimeRangeBatch, ComponentBatchMixin): _ARROW_TYPE = VisibleTimeRangeType() + + +# This is patched in late to avoid circular dependencies. +VisibleTimeRange._BATCH_TYPE = VisibleTimeRangeBatch # type: ignore[assignment] 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 c73389d04745..94167fd978b3 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visual_bounds2d.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visual_bounds2d.py @@ -6,15 +6,19 @@ from __future__ import annotations from ... import datatypes -from ..._baseclasses import ComponentBatchMixin +from ..._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .visual_bounds2d_ext import VisualBounds2DExt __all__ = ["VisualBounds2D", "VisualBounds2DBatch", "VisualBounds2DType"] -class VisualBounds2D(VisualBounds2DExt, datatypes.Range2D): +class VisualBounds2D(VisualBounds2DExt, datatypes.Range2D, ComponentMixin): """**Component**: Visual bounds in 2D space used for `Spatial2DView`.""" + _BATCH_TYPE = None # __init__ can be found in visual_bounds2d_ext.py # Note: there are no fields here because VisualBounds2D delegates to datatypes.Range2D @@ -27,3 +31,7 @@ class VisualBounds2DType(datatypes.Range2DType): class VisualBounds2DBatch(datatypes.Range2DBatch, ComponentBatchMixin): _ARROW_TYPE = VisualBounds2DType() + + +# This is patched in late to avoid circular dependencies. +VisualBounds2D._BATCH_TYPE = VisualBounds2DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/annotation_context.py b/rerun_py/rerun_sdk/rerun/components/annotation_context.py index 6a57c850a770..ac23a4616c20 100644 --- a/rerun_py/rerun_sdk/rerun/components/annotation_context.py +++ b/rerun_py/rerun_sdk/rerun/components/annotation_context.py @@ -11,7 +11,12 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .annotation_context_ext import AnnotationContextExt __all__ = [ @@ -24,7 +29,7 @@ @define(init=False) -class AnnotationContext(AnnotationContextExt): +class AnnotationContext(AnnotationContextExt, ComponentMixin): """ **Component**: The `AnnotationContext` provides additional information on how to display entities. @@ -35,6 +40,8 @@ class AnnotationContext(AnnotationContextExt): path. """ + _BATCH_TYPE = None + def __init__(self: Any, class_map: AnnotationContextLike): """ Create a new instance of the AnnotationContext component. diff --git a/rerun_py/rerun_sdk/rerun/components/axis_length.py b/rerun_py/rerun_sdk/rerun/components/axis_length.py index 9e652f949aff..674beef632a6 100644 --- a/rerun_py/rerun_sdk/rerun/components/axis_length.py +++ b/rerun_py/rerun_sdk/rerun/components/axis_length.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["AxisLength", "AxisLengthBatch", "AxisLengthType"] -class AxisLength(datatypes.Float32): +class AxisLength(datatypes.Float32, ComponentMixin): """**Component**: The length of an axis in local units of the space.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of AxisLengthExt in axis_length_ext.py # Note: there are no fields here because AxisLength delegates to datatypes.Float32 @@ -26,3 +30,7 @@ class AxisLengthType(datatypes.Float32Type): class AxisLengthBatch(datatypes.Float32Batch, ComponentBatchMixin): _ARROW_TYPE = AxisLengthType() + + +# This is patched in late to avoid circular dependencies. +AxisLength._BATCH_TYPE = AxisLengthBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/blob.py b/rerun_py/rerun_sdk/rerun/components/blob.py index 755d20204d90..68c5c245c0f1 100644 --- a/rerun_py/rerun_sdk/rerun/components/blob.py +++ b/rerun_py/rerun_sdk/rerun/components/blob.py @@ -12,7 +12,12 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .._converters import ( to_np_uint8, ) @@ -22,9 +27,11 @@ @define(init=False) -class Blob(BlobExt): +class Blob(BlobExt, ComponentMixin): """**Component**: A binary blob of data.""" + _BATCH_TYPE = None + def __init__(self: Any, data: BlobLike): """Create a new instance of the Blob component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/class_id.py b/rerun_py/rerun_sdk/rerun/components/class_id.py index 75ddcf5707ed..4bf5dcd20c85 100644 --- a/rerun_py/rerun_sdk/rerun/components/class_id.py +++ b/rerun_py/rerun_sdk/rerun/components/class_id.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["ClassId", "ClassIdBatch", "ClassIdType"] -class ClassId(datatypes.ClassId): +class ClassId(datatypes.ClassId, ComponentMixin): """**Component**: A 16-bit ID representing a type of semantic class.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of ClassIdExt in class_id_ext.py # Note: there are no fields here because ClassId delegates to datatypes.ClassId @@ -26,3 +30,7 @@ class ClassIdType(datatypes.ClassIdType): class ClassIdBatch(datatypes.ClassIdBatch, ComponentBatchMixin): _ARROW_TYPE = ClassIdType() + + +# This is patched in late to avoid circular dependencies. +ClassId._BATCH_TYPE = ClassIdBatch # type: ignore[assignment] 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 2083fa66f7c9..2204da65c5fd 100644 --- a/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py +++ b/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py @@ -12,7 +12,12 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = [ "ClearIsRecursive", @@ -24,9 +29,11 @@ @define(init=False) -class ClearIsRecursive: +class ClearIsRecursive(ComponentMixin): """**Component**: Configures how a clear operation should behave - recursive or not.""" + _BATCH_TYPE = None + def __init__(self: Any, recursive: ClearIsRecursiveLike): """ Create a new instance of the ClearIsRecursive component. diff --git a/rerun_py/rerun_sdk/rerun/components/color.py b/rerun_py/rerun_sdk/rerun/components/color.py index beb574fa33c3..7e665af7f5d5 100644 --- a/rerun_py/rerun_sdk/rerun/components/color.py +++ b/rerun_py/rerun_sdk/rerun/components/color.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Color", "ColorBatch", "ColorType"] -class Color(datatypes.Rgba32): +class Color(datatypes.Rgba32, ComponentMixin): """ **Component**: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. @@ -23,6 +26,7 @@ class Color(datatypes.Rgba32): If there is an alpha, we assume it is in linear space, and separate (NOT pre-multiplied). """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of ColorExt in color_ext.py # Note: there are no fields here because Color delegates to datatypes.Rgba32 @@ -35,3 +39,7 @@ class ColorType(datatypes.Rgba32Type): class ColorBatch(datatypes.Rgba32Batch, ComponentBatchMixin): _ARROW_TYPE = ColorType() + + +# This is patched in late to avoid circular dependencies. +Color._BATCH_TYPE = ColorBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/depth_meter.py b/rerun_py/rerun_sdk/rerun/components/depth_meter.py index 2e6fc9c0e976..3dcc430fee2e 100644 --- a/rerun_py/rerun_sdk/rerun/components/depth_meter.py +++ b/rerun_py/rerun_sdk/rerun/components/depth_meter.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["DepthMeter", "DepthMeterArrayLike", "DepthMeterBatch", "DepthMeterLike", "DepthMeterType"] @define(init=False) -class DepthMeter: +class DepthMeter(ComponentMixin): """**Component**: A component indicating how long a meter is, expressed in native units.""" + _BATCH_TYPE = None + def __init__(self: Any, value: DepthMeterLike): """Create a new instance of the DepthMeter component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py index d4b84c209e32..eba0a505dd52 100644 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py @@ -12,7 +12,12 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .disconnected_space_ext import DisconnectedSpaceExt __all__ = [ @@ -25,7 +30,7 @@ @define(init=False) -class DisconnectedSpace(DisconnectedSpaceExt): +class DisconnectedSpace(DisconnectedSpaceExt, ComponentMixin): """ **Component**: Spatially disconnect this entity from its parent. @@ -35,6 +40,7 @@ class DisconnectedSpace(DisconnectedSpaceExt): This is useful for specifying that a subgraph is independent of the rest of the scene. """ + _BATCH_TYPE = None # __init__ can be found in disconnected_space_ext.py def __bool__(self) -> bool: diff --git a/rerun_py/rerun_sdk/rerun/components/draw_order.py b/rerun_py/rerun_sdk/rerun/components/draw_order.py index 9f822386af0f..2ea567a28333 100644 --- a/rerun_py/rerun_sdk/rerun/components/draw_order.py +++ b/rerun_py/rerun_sdk/rerun/components/draw_order.py @@ -12,13 +12,18 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["DrawOrder", "DrawOrderArrayLike", "DrawOrderBatch", "DrawOrderLike", "DrawOrderType"] @define(init=False) -class DrawOrder: +class DrawOrder(ComponentMixin): """ **Component**: Draw order used for the display order of 2D elements. @@ -29,6 +34,8 @@ class DrawOrder: Draw order for entities with the same draw order is generally undefined. """ + _BATCH_TYPE = None + def __init__(self: Any, value: DrawOrderLike): """Create a new instance of the DrawOrder component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/half_sizes2d.py b/rerun_py/rerun_sdk/rerun/components/half_sizes2d.py index 1365c3e701d3..58348d414505 100644 --- a/rerun_py/rerun_sdk/rerun/components/half_sizes2d.py +++ b/rerun_py/rerun_sdk/rerun/components/half_sizes2d.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["HalfSizes2D", "HalfSizes2DBatch", "HalfSizes2DType"] -class HalfSizes2D(datatypes.Vec2D): +class HalfSizes2D(datatypes.Vec2D, ComponentMixin): """ **Component**: Half-sizes (extents) of a 2D box along its local axis, starting at its local origin/center. @@ -19,6 +22,7 @@ class HalfSizes2D(datatypes.Vec2D): Negative sizes indicate that the box is flipped along the respective axis, but this has no effect on how it is displayed. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of HalfSizes2DExt in half_sizes2d_ext.py # Note: there are no fields here because HalfSizes2D delegates to datatypes.Vec2D @@ -31,3 +35,7 @@ class HalfSizes2DType(datatypes.Vec2DType): class HalfSizes2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): _ARROW_TYPE = HalfSizes2DType() + + +# This is patched in late to avoid circular dependencies. +HalfSizes2D._BATCH_TYPE = HalfSizes2DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/half_sizes3d.py b/rerun_py/rerun_sdk/rerun/components/half_sizes3d.py index 2a7a4ac4c5fc..f693b31d476c 100644 --- a/rerun_py/rerun_sdk/rerun/components/half_sizes3d.py +++ b/rerun_py/rerun_sdk/rerun/components/half_sizes3d.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["HalfSizes3D", "HalfSizes3DBatch", "HalfSizes3DType"] -class HalfSizes3D(datatypes.Vec3D): +class HalfSizes3D(datatypes.Vec3D, ComponentMixin): """ **Component**: Half-sizes (extents) of a 3D box along its local axis, starting at its local origin/center. @@ -19,6 +22,7 @@ class HalfSizes3D(datatypes.Vec3D): Negative sizes indicate that the box is flipped along the respective axis, but this has no effect on how it is displayed. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of HalfSizes3DExt in half_sizes3d_ext.py # Note: there are no fields here because HalfSizes3D delegates to datatypes.Vec3D @@ -31,3 +35,7 @@ class HalfSizes3DType(datatypes.Vec3DType): class HalfSizes3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): _ARROW_TYPE = HalfSizes3DType() + + +# This is patched in late to avoid circular dependencies. +HalfSizes3D._BATCH_TYPE = HalfSizes3DBatch # type: ignore[assignment] 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 0ea89aa69cd5..a982bf47f088 100644 --- a/rerun_py/rerun_sdk/rerun/components/image_plane_distance.py +++ b/rerun_py/rerun_sdk/rerun/components/image_plane_distance.py @@ -6,18 +6,22 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["ImagePlaneDistance", "ImagePlaneDistanceBatch", "ImagePlaneDistanceType"] -class ImagePlaneDistance(datatypes.Float32): +class ImagePlaneDistance(datatypes.Float32, ComponentMixin): """ **Component**: The distance from the camera origin to the image plane when the projection is shown in a 3D viewer. This is only used for visualization purposes, and does not affect the projection itself. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of ImagePlaneDistanceExt in image_plane_distance_ext.py # Note: there are no fields here because ImagePlaneDistance delegates to datatypes.Float32 @@ -30,3 +34,7 @@ class ImagePlaneDistanceType(datatypes.Float32Type): class ImagePlaneDistanceBatch(datatypes.Float32Batch, ComponentBatchMixin): _ARROW_TYPE = ImagePlaneDistanceType() + + +# This is patched in late to avoid circular dependencies. +ImagePlaneDistance._BATCH_TYPE = ImagePlaneDistanceBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/keypoint_id.py b/rerun_py/rerun_sdk/rerun/components/keypoint_id.py index 10366fd47405..f25e3a7eb381 100644 --- a/rerun_py/rerun_sdk/rerun/components/keypoint_id.py +++ b/rerun_py/rerun_sdk/rerun/components/keypoint_id.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["KeypointId", "KeypointIdBatch", "KeypointIdType"] -class KeypointId(datatypes.KeypointId): +class KeypointId(datatypes.KeypointId, ComponentMixin): """ **Component**: A 16-bit ID representing a type of semantic keypoint within a class. @@ -21,6 +24,7 @@ class KeypointId(datatypes.KeypointId): [`rerun.components.AnnotationContext`]. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of KeypointIdExt in keypoint_id_ext.py # Note: there are no fields here because KeypointId delegates to datatypes.KeypointId @@ -33,3 +37,7 @@ class KeypointIdType(datatypes.KeypointIdType): class KeypointIdBatch(datatypes.KeypointIdBatch, ComponentBatchMixin): _ARROW_TYPE = KeypointIdType() + + +# This is patched in late to avoid circular dependencies. +KeypointId._BATCH_TYPE = KeypointIdBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/line_strip2d.py b/rerun_py/rerun_sdk/rerun/components/line_strip2d.py index aea26d855e49..7e7cc8538259 100644 --- a/rerun_py/rerun_sdk/rerun/components/line_strip2d.py +++ b/rerun_py/rerun_sdk/rerun/components/line_strip2d.py @@ -13,14 +13,19 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .line_strip2d_ext import LineStrip2DExt __all__ = ["LineStrip2D", "LineStrip2DArrayLike", "LineStrip2DBatch", "LineStrip2DLike", "LineStrip2DType"] @define(init=False) -class LineStrip2D(LineStrip2DExt): +class LineStrip2D(LineStrip2DExt, ComponentMixin): r""" **Component**: A line strip in 2D space. @@ -36,6 +41,8 @@ class LineStrip2D(LineStrip2DExt): ``` """ + _BATCH_TYPE = None + def __init__(self: Any, points: LineStrip2DLike): """Create a new instance of the LineStrip2D component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/line_strip3d.py b/rerun_py/rerun_sdk/rerun/components/line_strip3d.py index 300936aaecc2..6ce74eae63cc 100644 --- a/rerun_py/rerun_sdk/rerun/components/line_strip3d.py +++ b/rerun_py/rerun_sdk/rerun/components/line_strip3d.py @@ -13,14 +13,19 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .line_strip3d_ext import LineStrip3DExt __all__ = ["LineStrip3D", "LineStrip3DArrayLike", "LineStrip3DBatch", "LineStrip3DLike", "LineStrip3DType"] @define(init=False) -class LineStrip3D(LineStrip3DExt): +class LineStrip3D(LineStrip3DExt, ComponentMixin): r""" **Component**: A line strip in 3D space. @@ -36,6 +41,8 @@ class LineStrip3D(LineStrip3DExt): ``` """ + _BATCH_TYPE = None + def __init__(self: Any, points: LineStrip3DLike): """Create a new instance of the LineStrip3D component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/marker_shape.py b/rerun_py/rerun_sdk/rerun/components/marker_shape.py index 06548c8cfd49..e156552ff593 100644 --- a/rerun_py/rerun_sdk/rerun/components/marker_shape.py +++ b/rerun_py/rerun_sdk/rerun/components/marker_shape.py @@ -9,7 +9,11 @@ import pyarrow as pa -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, +) __all__ = ["MarkerShape", "MarkerShapeArrayLike", "MarkerShapeBatch", "MarkerShapeLike", "MarkerShapeType"] diff --git a/rerun_py/rerun_sdk/rerun/components/marker_size.py b/rerun_py/rerun_sdk/rerun/components/marker_size.py index acddeed68fd1..0f1b6517fda8 100644 --- a/rerun_py/rerun_sdk/rerun/components/marker_size.py +++ b/rerun_py/rerun_sdk/rerun/components/marker_size.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["MarkerSize", "MarkerSizeArrayLike", "MarkerSizeBatch", "MarkerSizeLike", "MarkerSizeType"] @define(init=False) -class MarkerSize: +class MarkerSize(ComponentMixin): """**Component**: Size of a marker in UI points.""" + _BATCH_TYPE = None + def __init__(self: Any, value: MarkerSizeLike): """Create a new instance of the MarkerSize component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/material.py b/rerun_py/rerun_sdk/rerun/components/material.py index 822449bad6d1..f83c31f96120 100644 --- a/rerun_py/rerun_sdk/rerun/components/material.py +++ b/rerun_py/rerun_sdk/rerun/components/material.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Material", "MaterialBatch", "MaterialType"] -class Material(datatypes.Material): +class Material(datatypes.Material, ComponentMixin): """**Component**: Material properties of a mesh.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of MaterialExt in material_ext.py # Note: there are no fields here because Material delegates to datatypes.Material @@ -26,3 +30,7 @@ class MaterialType(datatypes.MaterialType): class MaterialBatch(datatypes.MaterialBatch, ComponentBatchMixin): _ARROW_TYPE = MaterialType() + + +# This is patched in late to avoid circular dependencies. +Material._BATCH_TYPE = MaterialBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/media_type.py b/rerun_py/rerun_sdk/rerun/components/media_type.py index 3c657458898f..0f34ea535b59 100644 --- a/rerun_py/rerun_sdk/rerun/components/media_type.py +++ b/rerun_py/rerun_sdk/rerun/components/media_type.py @@ -6,13 +6,16 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .media_type_ext import MediaTypeExt __all__ = ["MediaType", "MediaTypeBatch", "MediaTypeType"] -class MediaType(MediaTypeExt, datatypes.Utf8): +class MediaType(MediaTypeExt, datatypes.Utf8, ComponentMixin): """ **Component**: A standardized media type (RFC2046, formerly known as MIME types), encoded as a utf8 string. @@ -20,6 +23,7 @@ class MediaType(MediaTypeExt, datatypes.Utf8): consulted at . """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of MediaTypeExt in media_type_ext.py # Note: there are no fields here because MediaType delegates to datatypes.Utf8 @@ -34,4 +38,8 @@ class MediaTypeBatch(datatypes.Utf8Batch, ComponentBatchMixin): _ARROW_TYPE = MediaTypeType() +# This is patched in late to avoid circular dependencies. +MediaType._BATCH_TYPE = MediaTypeBatch # type: ignore[assignment] + + MediaTypeExt.deferred_patch_class(MediaType) diff --git a/rerun_py/rerun_sdk/rerun/components/name.py b/rerun_py/rerun_sdk/rerun/components/name.py index e6db870c3b90..944921a6f14a 100644 --- a/rerun_py/rerun_sdk/rerun/components/name.py +++ b/rerun_py/rerun_sdk/rerun/components/name.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Name", "NameBatch", "NameType"] -class Name(datatypes.Utf8): +class Name(datatypes.Utf8, ComponentMixin): """**Component**: A display name, typically for an entity or a item like a plot series.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of NameExt in name_ext.py # Note: there are no fields here because Name delegates to datatypes.Utf8 @@ -26,3 +30,7 @@ class NameType(datatypes.Utf8Type): class NameBatch(datatypes.Utf8Batch, ComponentBatchMixin): _ARROW_TYPE = NameType() + + +# This is patched in late to avoid circular dependencies. +Name._BATCH_TYPE = NameBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/out_of_tree_transform3d.py b/rerun_py/rerun_sdk/rerun/components/out_of_tree_transform3d.py index 1f0b035f3aee..89ce8892b451 100644 --- a/rerun_py/rerun_sdk/rerun/components/out_of_tree_transform3d.py +++ b/rerun_py/rerun_sdk/rerun/components/out_of_tree_transform3d.py @@ -6,18 +6,22 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["OutOfTreeTransform3D", "OutOfTreeTransform3DBatch", "OutOfTreeTransform3DType"] -class OutOfTreeTransform3D(datatypes.Transform3D): +class OutOfTreeTransform3D(datatypes.Transform3D, ComponentMixin): """ **Component**: An out-of-tree affine transform between two 3D spaces, represented in a given direction. "Out-of-tree" means that the transform only affects its own entity: children don't inherit from it. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of OutOfTreeTransform3DExt in out_of_tree_transform3d_ext.py # Note: there are no fields here because OutOfTreeTransform3D delegates to datatypes.Transform3D @@ -30,3 +34,7 @@ class OutOfTreeTransform3DType(datatypes.Transform3DType): class OutOfTreeTransform3DBatch(datatypes.Transform3DBatch, ComponentBatchMixin): _ARROW_TYPE = OutOfTreeTransform3DType() + + +# This is patched in late to avoid circular dependencies. +OutOfTreeTransform3D._BATCH_TYPE = OutOfTreeTransform3DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py b/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py index 187b34f9d6a4..fa39df55856a 100644 --- a/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py +++ b/rerun_py/rerun_sdk/rerun/components/pinhole_projection.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["PinholeProjection", "PinholeProjectionBatch", "PinholeProjectionType"] -class PinholeProjection(datatypes.Mat3x3): +class PinholeProjection(datatypes.Mat3x3, ComponentMixin): """ **Component**: Camera projection, from image coordinates to view coordinates. @@ -28,6 +31,7 @@ class PinholeProjection(datatypes.Mat3x3): """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of PinholeProjectionExt in pinhole_projection_ext.py # Note: there are no fields here because PinholeProjection delegates to datatypes.Mat3x3 @@ -40,3 +44,7 @@ class PinholeProjectionType(datatypes.Mat3x3Type): class PinholeProjectionBatch(datatypes.Mat3x3Batch, ComponentBatchMixin): _ARROW_TYPE = PinholeProjectionType() + + +# This is patched in late to avoid circular dependencies. +PinholeProjection._BATCH_TYPE = PinholeProjectionBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/position2d.py b/rerun_py/rerun_sdk/rerun/components/position2d.py index 9fd7eb16cc4c..80833caeb779 100644 --- a/rerun_py/rerun_sdk/rerun/components/position2d.py +++ b/rerun_py/rerun_sdk/rerun/components/position2d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Position2D", "Position2DBatch", "Position2DType"] -class Position2D(datatypes.Vec2D): +class Position2D(datatypes.Vec2D, ComponentMixin): """**Component**: A position in 2D space.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Position2DExt in position2d_ext.py # Note: there are no fields here because Position2D delegates to datatypes.Vec2D @@ -26,3 +30,7 @@ class Position2DType(datatypes.Vec2DType): class Position2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): _ARROW_TYPE = Position2DType() + + +# This is patched in late to avoid circular dependencies. +Position2D._BATCH_TYPE = Position2DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/position3d.py b/rerun_py/rerun_sdk/rerun/components/position3d.py index 44b3105ba9c3..b74288ffb2d7 100644 --- a/rerun_py/rerun_sdk/rerun/components/position3d.py +++ b/rerun_py/rerun_sdk/rerun/components/position3d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Position3D", "Position3DBatch", "Position3DType"] -class Position3D(datatypes.Vec3D): +class Position3D(datatypes.Vec3D, ComponentMixin): """**Component**: A position in 3D space.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Position3DExt in position3d_ext.py # Note: there are no fields here because Position3D delegates to datatypes.Vec3D @@ -26,3 +30,7 @@ class Position3DType(datatypes.Vec3DType): class Position3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): _ARROW_TYPE = Position3DType() + + +# This is patched in late to avoid circular dependencies. +Position3D._BATCH_TYPE = Position3DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/radius.py b/rerun_py/rerun_sdk/rerun/components/radius.py index b66643d0eb56..930ff2c0412b 100644 --- a/rerun_py/rerun_sdk/rerun/components/radius.py +++ b/rerun_py/rerun_sdk/rerun/components/radius.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Radius", "RadiusArrayLike", "RadiusBatch", "RadiusLike", "RadiusType"] @define(init=False) -class Radius: +class Radius(ComponentMixin): """**Component**: A Radius component.""" + _BATCH_TYPE = None + def __init__(self: Any, value: RadiusLike): """Create a new instance of the Radius component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/range1d.py b/rerun_py/rerun_sdk/rerun/components/range1d.py index f2241d6363fe..af3ef6344d4d 100644 --- a/rerun_py/rerun_sdk/rerun/components/range1d.py +++ b/rerun_py/rerun_sdk/rerun/components/range1d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Range1D", "Range1DBatch", "Range1DType"] -class Range1D(datatypes.Range1D): +class Range1D(datatypes.Range1D, ComponentMixin): """**Component**: A 1D range, specifying a lower and upper bound.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Range1DExt in range1d_ext.py # Note: there are no fields here because Range1D delegates to datatypes.Range1D @@ -26,3 +30,7 @@ class Range1DType(datatypes.Range1DType): class Range1DBatch(datatypes.Range1DBatch, ComponentBatchMixin): _ARROW_TYPE = Range1DType() + + +# This is patched in late to avoid circular dependencies. +Range1D._BATCH_TYPE = Range1DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/resolution.py b/rerun_py/rerun_sdk/rerun/components/resolution.py index 3c2e345c43df..8602e1591050 100644 --- a/rerun_py/rerun_sdk/rerun/components/resolution.py +++ b/rerun_py/rerun_sdk/rerun/components/resolution.py @@ -6,18 +6,22 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Resolution", "ResolutionBatch", "ResolutionType"] -class Resolution(datatypes.Vec2D): +class Resolution(datatypes.Vec2D, ComponentMixin): """ **Component**: Pixel resolution width & height, e.g. of a camera sensor. Typically in integer units, but for some use cases floating point may be used. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of ResolutionExt in resolution_ext.py # Note: there are no fields here because Resolution delegates to datatypes.Vec2D @@ -30,3 +34,7 @@ class ResolutionType(datatypes.Vec2DType): class ResolutionBatch(datatypes.Vec2DBatch, ComponentBatchMixin): _ARROW_TYPE = ResolutionType() + + +# This is patched in late to avoid circular dependencies. +Resolution._BATCH_TYPE = ResolutionBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/rotation3d.py b/rerun_py/rerun_sdk/rerun/components/rotation3d.py index ad08284bc13b..b96e9374e4c1 100644 --- a/rerun_py/rerun_sdk/rerun/components/rotation3d.py +++ b/rerun_py/rerun_sdk/rerun/components/rotation3d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Rotation3D", "Rotation3DBatch", "Rotation3DType"] -class Rotation3D(datatypes.Rotation3D): +class Rotation3D(datatypes.Rotation3D, ComponentMixin): """**Component**: A 3D rotation, represented either by a quaternion or a rotation around axis.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Rotation3DExt in rotation3d_ext.py # Note: there are no fields here because Rotation3D delegates to datatypes.Rotation3D @@ -26,3 +30,7 @@ class Rotation3DType(datatypes.Rotation3DType): class Rotation3DBatch(datatypes.Rotation3DBatch, ComponentBatchMixin): _ARROW_TYPE = Rotation3DType() + + +# This is patched in late to avoid circular dependencies. +Rotation3D._BATCH_TYPE = Rotation3DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/scalar.py b/rerun_py/rerun_sdk/rerun/components/scalar.py index fd5c83d1ecdd..275693b7292e 100644 --- a/rerun_py/rerun_sdk/rerun/components/scalar.py +++ b/rerun_py/rerun_sdk/rerun/components/scalar.py @@ -12,19 +12,26 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Scalar", "ScalarArrayLike", "ScalarBatch", "ScalarLike", "ScalarType"] @define(init=False) -class Scalar: +class Scalar(ComponentMixin): """ **Component**: A double-precision scalar. Used for time series plots. """ + _BATCH_TYPE = None + def __init__(self: Any, value: ScalarLike): """Create a new instance of the Scalar component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/stroke_width.py b/rerun_py/rerun_sdk/rerun/components/stroke_width.py index ade3c93cc6c9..1b4ae4e56911 100644 --- a/rerun_py/rerun_sdk/rerun/components/stroke_width.py +++ b/rerun_py/rerun_sdk/rerun/components/stroke_width.py @@ -12,15 +12,22 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["StrokeWidth", "StrokeWidthArrayLike", "StrokeWidthBatch", "StrokeWidthLike", "StrokeWidthType"] @define(init=False) -class StrokeWidth: +class StrokeWidth(ComponentMixin): """**Component**: The width of a stroke specified in UI points.""" + _BATCH_TYPE = None + def __init__(self: Any, width: StrokeWidthLike): """Create a new instance of the StrokeWidth component.""" diff --git a/rerun_py/rerun_sdk/rerun/components/tensor_data.py b/rerun_py/rerun_sdk/rerun/components/tensor_data.py index cedd8a8c75d6..26a3edd595bb 100644 --- a/rerun_py/rerun_sdk/rerun/components/tensor_data.py +++ b/rerun_py/rerun_sdk/rerun/components/tensor_data.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["TensorData", "TensorDataBatch", "TensorDataType"] -class TensorData(datatypes.TensorData): +class TensorData(datatypes.TensorData, ComponentMixin): """ **Component**: A multi-dimensional `Tensor` of data. @@ -28,6 +31,7 @@ class TensorData(datatypes.TensorData): the shape has to be the shape of the decoded image. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of TensorDataExt in tensor_data_ext.py # Note: there are no fields here because TensorData delegates to datatypes.TensorData @@ -40,3 +44,7 @@ class TensorDataType(datatypes.TensorDataType): class TensorDataBatch(datatypes.TensorDataBatch, ComponentBatchMixin): _ARROW_TYPE = TensorDataType() + + +# This is patched in late to avoid circular dependencies. +TensorData._BATCH_TYPE = TensorDataBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/texcoord2d.py b/rerun_py/rerun_sdk/rerun/components/texcoord2d.py index 485754376aa3..d6ac2f0150df 100644 --- a/rerun_py/rerun_sdk/rerun/components/texcoord2d.py +++ b/rerun_py/rerun_sdk/rerun/components/texcoord2d.py @@ -6,12 +6,15 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Texcoord2D", "Texcoord2DBatch", "Texcoord2DType"] -class Texcoord2D(datatypes.Vec2D): +class Texcoord2D(datatypes.Vec2D, ComponentMixin): """ **Component**: A 2D texture UV coordinate. @@ -31,6 +34,7 @@ class Texcoord2D(datatypes.Vec2D): which places the origin at the bottom-left. """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of Texcoord2DExt in texcoord2d_ext.py # Note: there are no fields here because Texcoord2D delegates to datatypes.Vec2D @@ -43,3 +47,7 @@ class Texcoord2DType(datatypes.Vec2DType): class Texcoord2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): _ARROW_TYPE = Texcoord2DType() + + +# This is patched in late to avoid circular dependencies. +Texcoord2D._BATCH_TYPE = Texcoord2DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/text.py b/rerun_py/rerun_sdk/rerun/components/text.py index d4c29c976c3a..894f3c0c7f7d 100644 --- a/rerun_py/rerun_sdk/rerun/components/text.py +++ b/rerun_py/rerun_sdk/rerun/components/text.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Text", "TextBatch", "TextType"] -class Text(datatypes.Utf8): +class Text(datatypes.Utf8, ComponentMixin): """**Component**: A string of text, e.g. for labels and text documents.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of TextExt in text_ext.py # Note: there are no fields here because Text delegates to datatypes.Utf8 @@ -26,3 +30,7 @@ class TextType(datatypes.Utf8Type): class TextBatch(datatypes.Utf8Batch, ComponentBatchMixin): _ARROW_TYPE = TextType() + + +# This is patched in late to avoid circular dependencies. +Text._BATCH_TYPE = TextBatch # type: ignore[assignment] 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 e6e55360bddd..8896d4ea61e4 100644 --- a/rerun_py/rerun_sdk/rerun/components/text_log_level.py +++ b/rerun_py/rerun_sdk/rerun/components/text_log_level.py @@ -6,13 +6,16 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .text_log_level_ext import TextLogLevelExt __all__ = ["TextLogLevel", "TextLogLevelBatch", "TextLogLevelType"] -class TextLogLevel(TextLogLevelExt, datatypes.Utf8): +class TextLogLevel(TextLogLevelExt, datatypes.Utf8, ComponentMixin): """ **Component**: The severity level of a text log message. @@ -25,6 +28,7 @@ class TextLogLevel(TextLogLevelExt, datatypes.Utf8): * `"TRACE"` """ + _BATCH_TYPE = None # You can define your own __init__ function as a member of TextLogLevelExt in text_log_level_ext.py # Note: there are no fields here because TextLogLevel delegates to datatypes.Utf8 @@ -39,4 +43,8 @@ class TextLogLevelBatch(datatypes.Utf8Batch, ComponentBatchMixin): _ARROW_TYPE = TextLogLevelType() +# This is patched in late to avoid circular dependencies. +TextLogLevel._BATCH_TYPE = TextLogLevelBatch # type: ignore[assignment] + + TextLogLevelExt.deferred_patch_class(TextLogLevel) diff --git a/rerun_py/rerun_sdk/rerun/components/transform3d.py b/rerun_py/rerun_sdk/rerun/components/transform3d.py index 53bb4070c919..7038812728e9 100644 --- a/rerun_py/rerun_sdk/rerun/components/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/components/transform3d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Transform3D", "Transform3DBatch", "Transform3DType"] -class Transform3D(datatypes.Transform3D): +class Transform3D(datatypes.Transform3D, ComponentMixin): """**Component**: An affine transform between two 3D spaces, represented in a given direction.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Transform3DExt in transform3d_ext.py # Note: there are no fields here because Transform3D delegates to datatypes.Transform3D @@ -26,3 +30,7 @@ class Transform3DType(datatypes.Transform3DType): class Transform3DBatch(datatypes.Transform3DBatch, ComponentBatchMixin): _ARROW_TYPE = Transform3DType() + + +# This is patched in late to avoid circular dependencies. +Transform3D._BATCH_TYPE = Transform3DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/triangle_indices.py b/rerun_py/rerun_sdk/rerun/components/triangle_indices.py index 768100844d36..b05e5675999b 100644 --- a/rerun_py/rerun_sdk/rerun/components/triangle_indices.py +++ b/rerun_py/rerun_sdk/rerun/components/triangle_indices.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["TriangleIndices", "TriangleIndicesBatch", "TriangleIndicesType"] -class TriangleIndices(datatypes.UVec3D): +class TriangleIndices(datatypes.UVec3D, ComponentMixin): """**Component**: The three indices of a triangle mesh.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of TriangleIndicesExt in triangle_indices_ext.py # Note: there are no fields here because TriangleIndices delegates to datatypes.UVec3D @@ -26,3 +30,7 @@ class TriangleIndicesType(datatypes.UVec3DType): class TriangleIndicesBatch(datatypes.UVec3DBatch, ComponentBatchMixin): _ARROW_TYPE = TriangleIndicesType() + + +# This is patched in late to avoid circular dependencies. +TriangleIndices._BATCH_TYPE = TriangleIndicesBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/vector2d.py b/rerun_py/rerun_sdk/rerun/components/vector2d.py index 1d199c48240e..b072c0c36e2b 100644 --- a/rerun_py/rerun_sdk/rerun/components/vector2d.py +++ b/rerun_py/rerun_sdk/rerun/components/vector2d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Vector2D", "Vector2DBatch", "Vector2DType"] -class Vector2D(datatypes.Vec2D): +class Vector2D(datatypes.Vec2D, ComponentMixin): """**Component**: A vector in 2D space.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Vector2DExt in vector2d_ext.py # Note: there are no fields here because Vector2D delegates to datatypes.Vec2D @@ -26,3 +30,7 @@ class Vector2DType(datatypes.Vec2DType): class Vector2DBatch(datatypes.Vec2DBatch, ComponentBatchMixin): _ARROW_TYPE = Vector2DType() + + +# This is patched in late to avoid circular dependencies. +Vector2D._BATCH_TYPE = Vector2DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/vector3d.py b/rerun_py/rerun_sdk/rerun/components/vector3d.py index 81601030ee15..4d82a02c8f14 100644 --- a/rerun_py/rerun_sdk/rerun/components/vector3d.py +++ b/rerun_py/rerun_sdk/rerun/components/vector3d.py @@ -6,14 +6,18 @@ from __future__ import annotations from .. import datatypes -from .._baseclasses import ComponentBatchMixin +from .._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["Vector3D", "Vector3DBatch", "Vector3DType"] -class Vector3D(datatypes.Vec3D): +class Vector3D(datatypes.Vec3D, ComponentMixin): """**Component**: A vector in 3D space.""" + _BATCH_TYPE = None # You can define your own __init__ function as a member of Vector3DExt in vector3d_ext.py # Note: there are no fields here because Vector3D delegates to datatypes.Vec3D @@ -26,3 +30,7 @@ class Vector3DType(datatypes.Vec3DType): class Vector3DBatch(datatypes.Vec3DBatch, ComponentBatchMixin): _ARROW_TYPE = Vector3DType() + + +# This is patched in late to avoid circular dependencies. +Vector3D._BATCH_TYPE = Vector3DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py index baccd8390d21..d57fd519038a 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py @@ -12,7 +12,12 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .view_coordinates_ext import ViewCoordinatesExt __all__ = [ @@ -25,7 +30,7 @@ @define(init=False) -class ViewCoordinates(ViewCoordinatesExt): +class ViewCoordinates(ViewCoordinatesExt, ComponentMixin): """ **Component**: How we interpret the coordinate system of an entity/space. @@ -45,6 +50,8 @@ class ViewCoordinates(ViewCoordinatesExt): * Back = 6 """ + _BATCH_TYPE = None + def __init__(self: Any, coordinates: ViewCoordinatesLike): """ Create a new instance of the ViewCoordinates component. diff --git a/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py b/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py index 261c0992801d..32faed8a8a3b 100644 --- a/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py +++ b/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py @@ -10,7 +10,12 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = [ "VisualizerOverrides", @@ -22,9 +27,11 @@ @define(init=False) -class VisualizerOverrides: +class VisualizerOverrides(ComponentMixin): """**Component**: The name of a visualizer.""" + _BATCH_TYPE = None + def __init__(self: Any, value: VisualizerOverridesLike): """Create a new instance of the VisualizerOverrides component.""" diff --git a/rerun_py/rerun_sdk/rerun/datatypes/angle.py b/rerun_py/rerun_sdk/rerun/datatypes/angle.py index d10ff2ac4307..667583ff6864 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/angle.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/angle.py @@ -10,7 +10,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .angle_ext import AngleExt __all__ = ["Angle", "AngleArrayLike", "AngleBatch", "AngleLike", "AngleType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/annotation_info.py b/rerun_py/rerun_sdk/rerun/datatypes/annotation_info.py index fb8e6dea8890..a38178c5fd7e 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/annotation_info.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/annotation_info.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .annotation_info_ext import AnnotationInfoExt __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/bool.py b/rerun_py/rerun_sdk/rerun/datatypes/bool.py index 73007807af0b..4ae5c01eb2c2 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/bool.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/bool.py @@ -11,7 +11,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["Bool", "BoolArrayLike", "BoolBatch", "BoolLike", "BoolType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/class_description.py b/rerun_py/rerun_sdk/rerun/datatypes/class_description.py index adf45829ed73..e560e1c42f41 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/class_description.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/class_description.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .class_description_ext import ClassDescriptionExt __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/class_description_map_elem.py b/rerun_py/rerun_sdk/rerun/datatypes/class_description_map_elem.py index cc99e8ebace5..725ade4a8ec5 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/class_description_map_elem.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/class_description_map_elem.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .class_description_map_elem_ext import ClassDescriptionMapElemExt __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/class_id.py b/rerun_py/rerun_sdk/rerun/datatypes/class_id.py index ee1500192c4d..9287eb8b9d98 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/class_id.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/class_id.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["ClassId", "ClassIdArrayLike", "ClassIdBatch", "ClassIdLike", "ClassIdType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/entity_path.py b/rerun_py/rerun_sdk/rerun/datatypes/entity_path.py index f30dba61d2cf..6b6da2e4dc3b 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/entity_path.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/entity_path.py @@ -10,7 +10,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["EntityPath", "EntityPathArrayLike", "EntityPathBatch", "EntityPathLike", "EntityPathType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/float32.py b/rerun_py/rerun_sdk/rerun/datatypes/float32.py index c42ecd4c1c4c..ac695462ad70 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/float32.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/float32.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["Float32", "Float32ArrayLike", "Float32Batch", "Float32Like", "Float32Type"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/keypoint_id.py b/rerun_py/rerun_sdk/rerun/datatypes/keypoint_id.py index 85cba8c20feb..1887e8dc03fd 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/keypoint_id.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/keypoint_id.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["KeypointId", "KeypointIdArrayLike", "KeypointIdBatch", "KeypointIdLike", "KeypointIdType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/keypoint_pair.py b/rerun_py/rerun_sdk/rerun/datatypes/keypoint_pair.py index 762551957e6d..4e8535531ab2 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/keypoint_pair.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/keypoint_pair.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .keypoint_pair_ext import KeypointPairExt __all__ = ["KeypointPair", "KeypointPairArrayLike", "KeypointPairBatch", "KeypointPairLike", "KeypointPairType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/mat3x3.py b/rerun_py/rerun_sdk/rerun/datatypes/mat3x3.py index 0b6cb4712502..53946a982de4 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/mat3x3.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/mat3x3.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/mat4x4.py b/rerun_py/rerun_sdk/rerun/datatypes/mat4x4.py index e7a4fe086f94..db4af5aaa5f2 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/mat4x4.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/mat4x4.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/material.py b/rerun_py/rerun_sdk/rerun/datatypes/material.py index 356b893c1198..176d863edc7a 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/material.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/material.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .material_ext import MaterialExt __all__ = ["Material", "MaterialArrayLike", "MaterialBatch", "MaterialLike", "MaterialType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/quaternion.py b/rerun_py/rerun_sdk/rerun/datatypes/quaternion.py index b489b61e4b81..673c3191b716 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/quaternion.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/quaternion.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/range1d.py b/rerun_py/rerun_sdk/rerun/datatypes/range1d.py index a0c2aec53ae5..42c7d26a3093 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/range1d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/range1d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float64, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/range2d.py b/rerun_py/rerun_sdk/rerun/datatypes/range2d.py index d94190ed1068..d88ddd7c66d5 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/range2d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/range2d.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["Range2D", "Range2DArrayLike", "Range2DBatch", "Range2DLike", "Range2DType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/rgba32.py b/rerun_py/rerun_sdk/rerun/datatypes/rgba32.py index f12c583aafbb..93775ab4fcf6 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/rgba32.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/rgba32.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .rgba32_ext import Rgba32Ext __all__ = ["Rgba32", "Rgba32ArrayLike", "Rgba32Batch", "Rgba32Like", "Rgba32Type"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/rotation3d.py b/rerun_py/rerun_sdk/rerun/datatypes/rotation3d.py index 0104d833da2b..3e15ca8b783b 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/rotation3d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/rotation3d.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .rotation3d_ext import Rotation3DExt __all__ = ["Rotation3D", "Rotation3DArrayLike", "Rotation3DBatch", "Rotation3DLike", "Rotation3DType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py index 9e2875a23abe..7f89387a0b25 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .rotation_axis_angle_ext import RotationAxisAngleExt __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/scale3d.py b/rerun_py/rerun_sdk/rerun/datatypes/scale3d.py index e0db841280c9..bfc6ca42213c 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/scale3d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/scale3d.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .scale3d_ext import Scale3DExt __all__ = ["Scale3D", "Scale3DArrayLike", "Scale3DBatch", "Scale3DLike", "Scale3DType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/tensor_buffer.py b/rerun_py/rerun_sdk/rerun/datatypes/tensor_buffer.py index 8e7383bf0aae..e5212e1f642c 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/tensor_buffer.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/tensor_buffer.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .tensor_buffer_ext import TensorBufferExt __all__ = ["TensorBuffer", "TensorBufferArrayLike", "TensorBufferBatch", "TensorBufferLike", "TensorBufferType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/tensor_data.py b/rerun_py/rerun_sdk/rerun/datatypes/tensor_data.py index 7290ae847421..e636adc68da6 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/tensor_data.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/tensor_data.py @@ -12,7 +12,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .tensor_data_ext import TensorDataExt __all__ = ["TensorData", "TensorDataArrayLike", "TensorDataBatch", "TensorDataLike", "TensorDataType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/tensor_dimension.py b/rerun_py/rerun_sdk/rerun/datatypes/tensor_dimension.py index a89d3db305bc..8de9c1cfafcf 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/tensor_dimension.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/tensor_dimension.py @@ -10,7 +10,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( str_or_none, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/time_int.py b/rerun_py/rerun_sdk/rerun/datatypes/time_int.py index ac2ed851d824..21c60fd7a331 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/time_int.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/time_int.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .time_int_ext import TimeIntExt __all__ = ["TimeInt", "TimeIntArrayLike", "TimeIntBatch", "TimeIntLike", "TimeIntType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/time_range.py b/rerun_py/rerun_sdk/rerun/datatypes/time_range.py index eb7989b8d27e..44e666d02877 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/time_range.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/time_range.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["TimeRange", "TimeRangeArrayLike", "TimeRangeBatch", "TimeRangeLike", "TimeRangeType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/time_range_boundary.py b/rerun_py/rerun_sdk/rerun/datatypes/time_range_boundary.py index 0f42bafe314a..7075a185e38a 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/time_range_boundary.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/time_range_boundary.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .time_range_boundary_ext import TimeRangeBoundaryExt __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/transform3d.py b/rerun_py/rerun_sdk/rerun/datatypes/transform3d.py index 885e6f1cb11f..d4153456fc02 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/transform3d.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .transform3d_ext import Transform3DExt __all__ = ["Transform3D", "Transform3DArrayLike", "Transform3DBatch", "Transform3DLike", "Transform3DType"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/translation_and_mat3x3.py b/rerun_py/rerun_sdk/rerun/datatypes/translation_and_mat3x3.py index 9b18be25296d..84eb6ca1d54c 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/translation_and_mat3x3.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/translation_and_mat3x3.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .translation_and_mat3x3_ext import TranslationAndMat3x3Ext __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/translation_rotation_scale3d.py b/rerun_py/rerun_sdk/rerun/datatypes/translation_rotation_scale3d.py index 2b424afba61d..f29c215ac119 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/translation_rotation_scale3d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/translation_rotation_scale3d.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .translation_rotation_scale3d_ext import TranslationRotationScale3DExt __all__ = [ diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uint32.py b/rerun_py/rerun_sdk/rerun/datatypes/uint32.py index fe71bf7dc5f1..f87e89bb0ce0 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uint32.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uint32.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["UInt32", "UInt32ArrayLike", "UInt32Batch", "UInt32Like", "UInt32Type"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uint64.py b/rerun_py/rerun_sdk/rerun/datatypes/uint64.py index 21107e68514e..6879cb0fbaf1 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uint64.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uint64.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["UInt64", "UInt64ArrayLike", "UInt64Batch", "UInt64Like", "UInt64Type"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/utf8.py b/rerun_py/rerun_sdk/rerun/datatypes/utf8.py index 6dbb18b4098b..4fff9ecad4b9 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/utf8.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/utf8.py @@ -10,7 +10,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = ["Utf8", "Utf8ArrayLike", "Utf8Batch", "Utf8Like", "Utf8Type"] diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uuid.py b/rerun_py/rerun_sdk/rerun/datatypes/uuid.py index b7dc3cda881a..4eca0ddf0bfd 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uuid.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uuid.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_uint8, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uvec2d.py b/rerun_py/rerun_sdk/rerun/datatypes/uvec2d.py index d0ae0abc5526..d730cec9a4e7 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uvec2d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uvec2d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_uint32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uvec3d.py b/rerun_py/rerun_sdk/rerun/datatypes/uvec3d.py index 854d35b64dbe..ae4ec3f8d23e 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uvec3d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uvec3d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_uint32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/uvec4d.py b/rerun_py/rerun_sdk/rerun/datatypes/uvec4d.py index 987b90a10854..5daf18eedaa0 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/uvec4d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/uvec4d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_uint32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/vec2d.py b/rerun_py/rerun_sdk/rerun/datatypes/vec2d.py index 54f9e6923610..1bbc5cb8164e 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/vec2d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/vec2d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/vec3d.py b/rerun_py/rerun_sdk/rerun/datatypes/vec3d.py index ccd152d33e67..949e661bf2b3 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/vec3d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/vec3d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/vec4d.py b/rerun_py/rerun_sdk/rerun/datatypes/vec4d.py index b53dfef5f4b9..ebc228825835 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/vec4d.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/vec4d.py @@ -12,7 +12,10 @@ import pyarrow as pa from attrs import define, field -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .._converters import ( to_np_float32, ) diff --git a/rerun_py/rerun_sdk/rerun/datatypes/visible_time_range.py b/rerun_py/rerun_sdk/rerun/datatypes/visible_time_range.py index 8e78998c0689..ddf6eea06aa5 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/visible_time_range.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/visible_time_range.py @@ -11,7 +11,10 @@ from attrs import define, field from .. import datatypes -from .._baseclasses import BaseBatch, BaseExtensionType +from .._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .visible_time_range_ext import VisibleTimeRangeExt __all__ = [ diff --git a/rerun_py/tests/test_types/archetypes/affix_fuzzer1.py b/rerun_py/tests/test_types/archetypes/affix_fuzzer1.py index f0c87eda052a..ac021946410b 100644 --- a/rerun_py/tests/test_types/archetypes/affix_fuzzer1.py +++ b/rerun_py/tests/test_types/archetypes/affix_fuzzer1.py @@ -8,7 +8,9 @@ from typing import Any from attrs import define, field -from rerun._baseclasses import Archetype +from rerun._baseclasses import ( + Archetype, +) from rerun.error_utils import catch_and_log_exceptions from .. import components, datatypes diff --git a/rerun_py/tests/test_types/archetypes/affix_fuzzer2.py b/rerun_py/tests/test_types/archetypes/affix_fuzzer2.py index 66ab1810de23..58f9d7df78cb 100644 --- a/rerun_py/tests/test_types/archetypes/affix_fuzzer2.py +++ b/rerun_py/tests/test_types/archetypes/affix_fuzzer2.py @@ -8,7 +8,9 @@ from typing import Any from attrs import define, field -from rerun._baseclasses import Archetype +from rerun._baseclasses import ( + Archetype, +) from rerun.error_utils import catch_and_log_exceptions from .. import components, datatypes diff --git a/rerun_py/tests/test_types/archetypes/affix_fuzzer3.py b/rerun_py/tests/test_types/archetypes/affix_fuzzer3.py index 75b47e0c1be5..45588ae924a2 100644 --- a/rerun_py/tests/test_types/archetypes/affix_fuzzer3.py +++ b/rerun_py/tests/test_types/archetypes/affix_fuzzer3.py @@ -8,7 +8,9 @@ from typing import Any from attrs import define, field -from rerun._baseclasses import Archetype +from rerun._baseclasses import ( + Archetype, +) from rerun.error_utils import catch_and_log_exceptions from .. import components, datatypes diff --git a/rerun_py/tests/test_types/archetypes/affix_fuzzer4.py b/rerun_py/tests/test_types/archetypes/affix_fuzzer4.py index 58d745945694..777bbdedc77d 100644 --- a/rerun_py/tests/test_types/archetypes/affix_fuzzer4.py +++ b/rerun_py/tests/test_types/archetypes/affix_fuzzer4.py @@ -8,7 +8,9 @@ from typing import Any from attrs import define, field -from rerun._baseclasses import Archetype +from rerun._baseclasses import ( + Archetype, +) from rerun.error_utils import catch_and_log_exceptions from .. import components, datatypes diff --git a/rerun_py/tests/test_types/components/affix_fuzzer1.py b/rerun_py/tests/test_types/components/affix_fuzzer1.py index 2fca6cef3c66..08be22d45ac1 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer1.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer1.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer1", "AffixFuzzer1Batch", "AffixFuzzer1Type"] -class AffixFuzzer1(datatypes.AffixFuzzer1): +class AffixFuzzer1(datatypes.AffixFuzzer1, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer1Ext in affix_fuzzer1_ext.py # Note: there are no fields here because AffixFuzzer1 delegates to datatypes.AffixFuzzer1 @@ -25,3 +29,7 @@ class AffixFuzzer1Type(datatypes.AffixFuzzer1Type): class AffixFuzzer1Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer1Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer1._BATCH_TYPE = AffixFuzzer1Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer10.py b/rerun_py/tests/test_types/components/affix_fuzzer10.py index d52107e682db..be41cd72e47b 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer10.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer10.py @@ -9,7 +9,12 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from rerun._converters import ( str_or_none, ) @@ -18,7 +23,9 @@ @define(init=False) -class AffixFuzzer10: +class AffixFuzzer10(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, single_string_optional: str | None = None): """Create a new instance of the AffixFuzzer10 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer11.py b/rerun_py/tests/test_types/components/affix_fuzzer11.py index 244f06cf5ac7..e99806044480 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer11.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer11.py @@ -11,7 +11,12 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from rerun._converters import ( to_np_float32, ) @@ -20,7 +25,9 @@ @define(init=False) -class AffixFuzzer11: +class AffixFuzzer11(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_floats_optional: npt.ArrayLike | None = None): """Create a new instance of the AffixFuzzer11 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer12.py b/rerun_py/tests/test_types/components/affix_fuzzer12.py index 4dc7fd1c6c62..5d9e298efa8a 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer12.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer12.py @@ -9,13 +9,20 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["AffixFuzzer12", "AffixFuzzer12ArrayLike", "AffixFuzzer12Batch", "AffixFuzzer12Like", "AffixFuzzer12Type"] @define(init=False) -class AffixFuzzer12: +class AffixFuzzer12(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_strings_required: AffixFuzzer12Like): """Create a new instance of the AffixFuzzer12 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer13.py b/rerun_py/tests/test_types/components/affix_fuzzer13.py index 5cf2de6bea60..4ea8e5b97df7 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer13.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer13.py @@ -9,13 +9,20 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["AffixFuzzer13", "AffixFuzzer13ArrayLike", "AffixFuzzer13Batch", "AffixFuzzer13Like", "AffixFuzzer13Type"] @define(init=False) -class AffixFuzzer13: +class AffixFuzzer13(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_strings_optional: list[str] | None = None): """Create a new instance of the AffixFuzzer13 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer14.py b/rerun_py/tests/test_types/components/affix_fuzzer14.py index 4982f03f74bf..89f31b2a83ed 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer14.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer14.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer14", "AffixFuzzer14Batch", "AffixFuzzer14Type"] -class AffixFuzzer14(datatypes.AffixFuzzer3): +class AffixFuzzer14(datatypes.AffixFuzzer3, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer14Ext in affix_fuzzer14_ext.py # Note: there are no fields here because AffixFuzzer14 delegates to datatypes.AffixFuzzer3 @@ -25,3 +29,7 @@ class AffixFuzzer14Type(datatypes.AffixFuzzer3Type): class AffixFuzzer14Batch(datatypes.AffixFuzzer3Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer14Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer14._BATCH_TYPE = AffixFuzzer14Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer15.py b/rerun_py/tests/test_types/components/affix_fuzzer15.py index 174df8541c50..2f8dce2f757d 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer15.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer15.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer15", "AffixFuzzer15Batch", "AffixFuzzer15Type"] -class AffixFuzzer15(datatypes.AffixFuzzer3): +class AffixFuzzer15(datatypes.AffixFuzzer3, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer15Ext in affix_fuzzer15_ext.py # Note: there are no fields here because AffixFuzzer15 delegates to datatypes.AffixFuzzer3 @@ -25,3 +29,7 @@ class AffixFuzzer15Type(datatypes.AffixFuzzer3Type): class AffixFuzzer15Batch(datatypes.AffixFuzzer3Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer15Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer15._BATCH_TYPE = AffixFuzzer15Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer16.py b/rerun_py/tests/test_types/components/affix_fuzzer16.py index 327db242d0fc..622a4fd8abed 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer16.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer16.py @@ -9,7 +9,12 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes @@ -17,7 +22,9 @@ @define(init=False) -class AffixFuzzer16: +class AffixFuzzer16(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_required_unions: AffixFuzzer16Like): """Create a new instance of the AffixFuzzer16 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer17.py b/rerun_py/tests/test_types/components/affix_fuzzer17.py index 83a17dbb882a..d65b96156a90 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer17.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer17.py @@ -9,7 +9,12 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes @@ -17,7 +22,9 @@ @define(init=False) -class AffixFuzzer17: +class AffixFuzzer17(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_optional_unions: datatypes.AffixFuzzer3ArrayLike | None = None): """Create a new instance of the AffixFuzzer17 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer18.py b/rerun_py/tests/test_types/components/affix_fuzzer18.py index 0083ce15683c..39dd3c089f9f 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer18.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer18.py @@ -9,7 +9,12 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes @@ -17,7 +22,9 @@ @define(init=False) -class AffixFuzzer18: +class AffixFuzzer18(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_optional_unions: datatypes.AffixFuzzer4ArrayLike | None = None): """Create a new instance of the AffixFuzzer18 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer19.py b/rerun_py/tests/test_types/components/affix_fuzzer19.py index 84864fc31d33..eefe3ee48719 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer19.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer19.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer19", "AffixFuzzer19Batch", "AffixFuzzer19Type"] -class AffixFuzzer19(datatypes.AffixFuzzer5): +class AffixFuzzer19(datatypes.AffixFuzzer5, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer19Ext in affix_fuzzer19_ext.py # Note: there are no fields here because AffixFuzzer19 delegates to datatypes.AffixFuzzer5 @@ -25,3 +29,7 @@ class AffixFuzzer19Type(datatypes.AffixFuzzer5Type): class AffixFuzzer19Batch(datatypes.AffixFuzzer5Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer19Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer19._BATCH_TYPE = AffixFuzzer19Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer2.py b/rerun_py/tests/test_types/components/affix_fuzzer2.py index 1d0368db5b1e..45d8000887bd 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer2.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer2.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer2", "AffixFuzzer2Batch", "AffixFuzzer2Type"] -class AffixFuzzer2(datatypes.AffixFuzzer1): +class AffixFuzzer2(datatypes.AffixFuzzer1, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer2Ext in affix_fuzzer2_ext.py # Note: there are no fields here because AffixFuzzer2 delegates to datatypes.AffixFuzzer1 @@ -25,3 +29,7 @@ class AffixFuzzer2Type(datatypes.AffixFuzzer1Type): class AffixFuzzer2Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer2Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer2._BATCH_TYPE = AffixFuzzer2Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer20.py b/rerun_py/tests/test_types/components/affix_fuzzer20.py index 67a450028d76..631e43510f1a 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer20.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer20.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer20", "AffixFuzzer20Batch", "AffixFuzzer20Type"] -class AffixFuzzer20(datatypes.AffixFuzzer20): +class AffixFuzzer20(datatypes.AffixFuzzer20, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer20Ext in affix_fuzzer20_ext.py # Note: there are no fields here because AffixFuzzer20 delegates to datatypes.AffixFuzzer20 @@ -25,3 +29,7 @@ class AffixFuzzer20Type(datatypes.AffixFuzzer20Type): class AffixFuzzer20Batch(datatypes.AffixFuzzer20Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer20Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer20._BATCH_TYPE = AffixFuzzer20Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer21.py b/rerun_py/tests/test_types/components/affix_fuzzer21.py index e7e7c8233898..f0451452794f 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer21.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer21.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer21", "AffixFuzzer21Batch", "AffixFuzzer21Type"] -class AffixFuzzer21(datatypes.AffixFuzzer21): +class AffixFuzzer21(datatypes.AffixFuzzer21, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer21Ext in affix_fuzzer21_ext.py # Note: there are no fields here because AffixFuzzer21 delegates to datatypes.AffixFuzzer21 @@ -25,3 +29,7 @@ class AffixFuzzer21Type(datatypes.AffixFuzzer21Type): class AffixFuzzer21Batch(datatypes.AffixFuzzer21Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer21Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer21._BATCH_TYPE = AffixFuzzer21Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer22.py b/rerun_py/tests/test_types/components/affix_fuzzer22.py index 5f31614ca9b7..5bf9bde1de65 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer22.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer22.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer22", "AffixFuzzer22Batch", "AffixFuzzer22Type"] -class AffixFuzzer22(datatypes.AffixFuzzer22): +class AffixFuzzer22(datatypes.AffixFuzzer22, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer22Ext in affix_fuzzer22_ext.py # Note: there are no fields here because AffixFuzzer22 delegates to datatypes.AffixFuzzer22 @@ -25,3 +29,7 @@ class AffixFuzzer22Type(datatypes.AffixFuzzer22Type): class AffixFuzzer22Batch(datatypes.AffixFuzzer22Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer22Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer22._BATCH_TYPE = AffixFuzzer22Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer3.py b/rerun_py/tests/test_types/components/affix_fuzzer3.py index 4e5335747f82..969084164eac 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer3.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer3.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer3", "AffixFuzzer3Batch", "AffixFuzzer3Type"] -class AffixFuzzer3(datatypes.AffixFuzzer1): +class AffixFuzzer3(datatypes.AffixFuzzer1, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer3Ext in affix_fuzzer3_ext.py # Note: there are no fields here because AffixFuzzer3 delegates to datatypes.AffixFuzzer1 @@ -25,3 +29,7 @@ class AffixFuzzer3Type(datatypes.AffixFuzzer1Type): class AffixFuzzer3Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer3Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer3._BATCH_TYPE = AffixFuzzer3Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer4.py b/rerun_py/tests/test_types/components/affix_fuzzer4.py index bf4c4423869b..7b8f4023ccf1 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer4.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer4.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer4", "AffixFuzzer4Batch", "AffixFuzzer4Type"] -class AffixFuzzer4(datatypes.AffixFuzzer1): +class AffixFuzzer4(datatypes.AffixFuzzer1, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer4Ext in affix_fuzzer4_ext.py # Note: there are no fields here because AffixFuzzer4 delegates to datatypes.AffixFuzzer1 @@ -25,3 +29,7 @@ class AffixFuzzer4Type(datatypes.AffixFuzzer1Type): class AffixFuzzer4Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer4Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer4._BATCH_TYPE = AffixFuzzer4Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer5.py b/rerun_py/tests/test_types/components/affix_fuzzer5.py index 6e8f08c64850..97403e45fa55 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer5.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer5.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer5", "AffixFuzzer5Batch", "AffixFuzzer5Type"] -class AffixFuzzer5(datatypes.AffixFuzzer1): +class AffixFuzzer5(datatypes.AffixFuzzer1, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer5Ext in affix_fuzzer5_ext.py # Note: there are no fields here because AffixFuzzer5 delegates to datatypes.AffixFuzzer1 @@ -25,3 +29,7 @@ class AffixFuzzer5Type(datatypes.AffixFuzzer1Type): class AffixFuzzer5Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer5Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer5._BATCH_TYPE = AffixFuzzer5Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer6.py b/rerun_py/tests/test_types/components/affix_fuzzer6.py index d33929aa0a98..e5a3743cf6ad 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer6.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer6.py @@ -5,14 +5,18 @@ from __future__ import annotations -from rerun._baseclasses import ComponentBatchMixin +from rerun._baseclasses import ( + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes __all__ = ["AffixFuzzer6", "AffixFuzzer6Batch", "AffixFuzzer6Type"] -class AffixFuzzer6(datatypes.AffixFuzzer1): +class AffixFuzzer6(datatypes.AffixFuzzer1, ComponentMixin): + _BATCH_TYPE = None # You can define your own __init__ function as a member of AffixFuzzer6Ext in affix_fuzzer6_ext.py # Note: there are no fields here because AffixFuzzer6 delegates to datatypes.AffixFuzzer1 @@ -25,3 +29,7 @@ class AffixFuzzer6Type(datatypes.AffixFuzzer1Type): class AffixFuzzer6Batch(datatypes.AffixFuzzer1Batch, ComponentBatchMixin): _ARROW_TYPE = AffixFuzzer6Type() + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer6._BATCH_TYPE = AffixFuzzer6Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer7.py b/rerun_py/tests/test_types/components/affix_fuzzer7.py index 56b50b5a6435..8a668ae0b870 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer7.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer7.py @@ -9,7 +9,12 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from .. import datatypes @@ -17,7 +22,9 @@ @define(init=False) -class AffixFuzzer7: +class AffixFuzzer7(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, many_optional: datatypes.AffixFuzzer1ArrayLike | None = None): """Create a new instance of the AffixFuzzer7 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer8.py b/rerun_py/tests/test_types/components/affix_fuzzer8.py index c0b64f64bd87..da79ee6dab96 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer8.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer8.py @@ -11,7 +11,12 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) from rerun._converters import ( float_or_none, ) @@ -20,7 +25,9 @@ @define(init=False) -class AffixFuzzer8: +class AffixFuzzer8(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, single_float_optional: float | None = None): """Create a new instance of the AffixFuzzer8 component.""" diff --git a/rerun_py/tests/test_types/components/affix_fuzzer9.py b/rerun_py/tests/test_types/components/affix_fuzzer9.py index 840e58841417..7b552ffb7097 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer9.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer9.py @@ -9,13 +9,20 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, + ComponentMixin, +) __all__ = ["AffixFuzzer9", "AffixFuzzer9ArrayLike", "AffixFuzzer9Batch", "AffixFuzzer9Like", "AffixFuzzer9Type"] @define(init=False) -class AffixFuzzer9: +class AffixFuzzer9(ComponentMixin): + _BATCH_TYPE = None + def __init__(self: Any, single_string_required: AffixFuzzer9Like): """Create a new instance of the AffixFuzzer9 component.""" diff --git a/rerun_py/tests/test_types/components/enum_test.py b/rerun_py/tests/test_types/components/enum_test.py index c3c89f3ba8a6..694c6754b5be 100644 --- a/rerun_py/tests/test_types/components/enum_test.py +++ b/rerun_py/tests/test_types/components/enum_test.py @@ -8,7 +8,11 @@ from typing import Literal, Sequence, Union import pyarrow as pa -from rerun._baseclasses import BaseBatch, BaseExtensionType, ComponentBatchMixin +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, + ComponentBatchMixin, +) __all__ = ["EnumTest", "EnumTestArrayLike", "EnumTestBatch", "EnumTestLike", "EnumTestType"] diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer1.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer1.py index 9f03af752197..1cd411083051 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer1.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer1.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from rerun._converters import ( bool_or_none, float_or_none, diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer2.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer2.py index b070fc31b786..b3b3b34db63c 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer2.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer2.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from rerun._converters import ( float_or_none, ) diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer20.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer20.py index 52bd084e7e4f..8e0a7415432a 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer20.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer20.py @@ -9,7 +9,10 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .. import datatypes diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer21.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer21.py index 2e489c2faf4f..08e21ace619f 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer21.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer21.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from rerun._converters import ( to_np_float16, ) diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer22.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer22.py index 0637fdebc2bb..bfdb2c13aad8 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer22.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer22.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from rerun._converters import ( to_np_uint8, ) diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer3.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer3.py index d67c8bb8a8b4..3c5654655d2d 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer3.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer3.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .. import datatypes diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer4.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer4.py index 6842874de246..76f06114bbc5 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer4.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer4.py @@ -9,7 +9,10 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .. import datatypes diff --git a/rerun_py/tests/test_types/datatypes/affix_fuzzer5.py b/rerun_py/tests/test_types/datatypes/affix_fuzzer5.py index 8329d9c865a4..629df688b05e 100644 --- a/rerun_py/tests/test_types/datatypes/affix_fuzzer5.py +++ b/rerun_py/tests/test_types/datatypes/affix_fuzzer5.py @@ -9,7 +9,10 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) from .. import datatypes diff --git a/rerun_py/tests/test_types/datatypes/flattened_scalar.py b/rerun_py/tests/test_types/datatypes/flattened_scalar.py index d36a3506c39b..661efbeff0e7 100644 --- a/rerun_py/tests/test_types/datatypes/flattened_scalar.py +++ b/rerun_py/tests/test_types/datatypes/flattened_scalar.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = [ "FlattenedScalar", diff --git a/rerun_py/tests/test_types/datatypes/primitive_component.py b/rerun_py/tests/test_types/datatypes/primitive_component.py index 456cee1634ba..3a29cbf49248 100644 --- a/rerun_py/tests/test_types/datatypes/primitive_component.py +++ b/rerun_py/tests/test_types/datatypes/primitive_component.py @@ -11,7 +11,10 @@ import numpy.typing as npt import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = [ "PrimitiveComponent", diff --git a/rerun_py/tests/test_types/datatypes/string_component.py b/rerun_py/tests/test_types/datatypes/string_component.py index 711d34f56fe6..7466b07ce2fc 100644 --- a/rerun_py/tests/test_types/datatypes/string_component.py +++ b/rerun_py/tests/test_types/datatypes/string_component.py @@ -9,7 +9,10 @@ import pyarrow as pa from attrs import define, field -from rerun._baseclasses import BaseBatch, BaseExtensionType +from rerun._baseclasses import ( + BaseBatch, + BaseExtensionType, +) __all__ = [ "StringComponent", From ce41334db03993ae39451c952661fa72d345e565 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 11 Jun 2024 20:04:32 -0400 Subject: [PATCH 4/5] Fix codegen for non-delegating batches --- .../src/codegen/python/mod.rs | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/crates/re_types_builder/src/codegen/python/mod.rs b/crates/re_types_builder/src/codegen/python/mod.rs index 1fcb8b2f13d7..7b5ffe4dd255 100644 --- a/crates/re_types_builder/src/codegen/python/mod.rs +++ b/crates/re_types_builder/src/codegen/python/mod.rs @@ -784,7 +784,23 @@ fn code_for_struct( match kind { ObjectKind::Archetype => (), - ObjectKind::Datatype | ObjectKind::Component => { + ObjectKind::Component => { + code.push_indented( + 0, + quote_arrow_support_from_obj(reporter, arrow_registry, ext_class, objects, obj), + 1, + ); + + code.push_indented( + 0, + format!( + "# This is patched in late to avoid circular dependencies. +{name}._BATCH_TYPE = {name}Batch # type: ignore[assignment]" + ), + 1, + ); + } + ObjectKind::Datatype => { code.push_indented( 0, quote_arrow_support_from_obj(reporter, arrow_registry, ext_class, objects, obj), @@ -1837,9 +1853,6 @@ fn quote_arrow_support_from_obj( class {extension_batch}{batch_superclass_decl}: _ARROW_TYPE = {extension_type}() - - # This is patched in late to avoid circular dependencies. - {name}._BATCH_TYPE = {extension_batch} # type: ignore[assignment] "# )) } From a0dc7cc6334604a87af8d3674ab8c8e2e3cb6b9f Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 11 Jun 2024 20:04:39 -0400 Subject: [PATCH 5/5] codegen --- rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py | 4 ++++ .../rerun_sdk/rerun/blueprint/components/auto_space_views.py | 4 ++++ rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py | 4 ++++ .../rerun/blueprint/components/entity_properties_component.py | 4 ++++ rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py | 4 ++++ rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py | 4 ++++ rerun_py/rerun_sdk/rerun/blueprint/components/visible.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/annotation_context.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/blob.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/depth_meter.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/disconnected_space.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/draw_order.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/line_strip2d.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/line_strip3d.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/marker_size.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/media_type.py | 1 - rerun_py/rerun_sdk/rerun/components/radius.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/scalar.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/stroke_width.py | 4 ++++ rerun_py/rerun_sdk/rerun/components/text_log_level.py | 1 - rerun_py/rerun_sdk/rerun/components/view_coordinates.py | 3 +++ rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer10.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer11.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer12.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer13.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer16.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer17.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer18.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer7.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer8.py | 4 ++++ rerun_py/tests/test_types/components/affix_fuzzer9.py | 4 ++++ 33 files changed, 123 insertions(+), 2 deletions(-) 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 d275b7fac36f..ff2e50911830 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/auto_layout.py @@ -64,3 +64,7 @@ class AutoLayoutBatch(BaseBatch[AutoLayoutArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: AutoLayoutArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.bool_).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +AutoLayout._BATCH_TYPE = AutoLayoutBatch # type: ignore[assignment] 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 6bfad3287527..6f55456b0434 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 @@ -70,3 +70,7 @@ class AutoSpaceViewsBatch(BaseBatch[AutoSpaceViewsArrayLike], ComponentBatchMixi def _native_to_pa_array(data: AutoSpaceViewsArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.bool_).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +AutoSpaceViews._BATCH_TYPE = AutoSpaceViewsBatch # type: ignore[assignment] 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 96ff7883ebf2..c05694ae519e 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/column_share.py @@ -80,3 +80,7 @@ class ColumnShareBatch(BaseBatch[ColumnShareArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: ColumnShareArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +ColumnShare._BATCH_TYPE = ColumnShareBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py b/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py index c892d260a96c..60ce38f016a6 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/entity_properties_component.py @@ -74,3 +74,7 @@ def _native_to_pa_array(data: EntityPropertiesComponentArrayLike, data_type: pa. raise NotImplementedError( "Arrow serialization of EntityPropertiesComponent not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in entity_properties_component_ext.py + + +# This is patched in late to avoid circular dependencies. +EntityPropertiesComponent._BATCH_TYPE = EntityPropertiesComponentBatch # type: ignore[assignment] 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 39cfefea9f0e..251d0146bbef 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/grid_columns.py @@ -83,3 +83,7 @@ class GridColumnsBatch(BaseBatch[GridColumnsArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: GridColumnsArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.uint32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +GridColumns._BATCH_TYPE = GridColumnsBatch # type: ignore[assignment] 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 6b36b9a426a3..39bafb363634 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/row_share.py @@ -80,3 +80,7 @@ class RowShareBatch(BaseBatch[RowShareArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: RowShareArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +RowShare._BATCH_TYPE = RowShareBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py b/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py index 7e48919d4555..df8176434473 100644 --- a/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py +++ b/rerun_py/rerun_sdk/rerun/blueprint/components/visible.py @@ -64,3 +64,7 @@ class VisibleBatch(BaseBatch[VisibleArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: VisibleArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.bool_).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +Visible._BATCH_TYPE = VisibleBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/annotation_context.py b/rerun_py/rerun_sdk/rerun/components/annotation_context.py index ac23a4616c20..2f871771e9f7 100644 --- a/rerun_py/rerun_sdk/rerun/components/annotation_context.py +++ b/rerun_py/rerun_sdk/rerun/components/annotation_context.py @@ -153,3 +153,7 @@ class AnnotationContextBatch(BaseBatch[AnnotationContextArrayLike], ComponentBat @staticmethod def _native_to_pa_array(data: AnnotationContextArrayLike, data_type: pa.DataType) -> pa.Array: return AnnotationContextExt.native_to_pa_array_override(data, data_type) + + +# This is patched in late to avoid circular dependencies. +AnnotationContext._BATCH_TYPE = AnnotationContextBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/blob.py b/rerun_py/rerun_sdk/rerun/components/blob.py index 68c5c245c0f1..8f20e1e7e02e 100644 --- a/rerun_py/rerun_sdk/rerun/components/blob.py +++ b/rerun_py/rerun_sdk/rerun/components/blob.py @@ -68,3 +68,7 @@ class BlobBatch(BaseBatch[BlobArrayLike], ComponentBatchMixin): @staticmethod def _native_to_pa_array(data: BlobArrayLike, data_type: pa.DataType) -> pa.Array: return BlobExt.native_to_pa_array_override(data, data_type) + + +# This is patched in late to avoid circular dependencies. +Blob._BATCH_TYPE = BlobBatch # type: ignore[assignment] 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 2204da65c5fd..c4c21a7f93ba 100644 --- a/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py +++ b/rerun_py/rerun_sdk/rerun/components/clear_is_recursive.py @@ -79,3 +79,7 @@ class ClearIsRecursiveBatch(BaseBatch[ClearIsRecursiveArrayLike], ComponentBatch def _native_to_pa_array(data: ClearIsRecursiveArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.bool_).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +ClearIsRecursive._BATCH_TYPE = ClearIsRecursiveBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/depth_meter.py b/rerun_py/rerun_sdk/rerun/components/depth_meter.py index 3dcc430fee2e..f6368bf5c0dd 100644 --- a/rerun_py/rerun_sdk/rerun/components/depth_meter.py +++ b/rerun_py/rerun_sdk/rerun/components/depth_meter.py @@ -69,3 +69,7 @@ class DepthMeterBatch(BaseBatch[DepthMeterArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: DepthMeterArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +DepthMeter._BATCH_TYPE = DepthMeterBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py index eba0a505dd52..e544d00ec77c 100644 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py @@ -77,3 +77,7 @@ class DisconnectedSpaceBatch(BaseBatch[DisconnectedSpaceArrayLike], ComponentBat def _native_to_pa_array(data: DisconnectedSpaceArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.bool_).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +DisconnectedSpace._BATCH_TYPE = DisconnectedSpaceBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/draw_order.py b/rerun_py/rerun_sdk/rerun/components/draw_order.py index 2ea567a28333..d392e3435145 100644 --- a/rerun_py/rerun_sdk/rerun/components/draw_order.py +++ b/rerun_py/rerun_sdk/rerun/components/draw_order.py @@ -77,3 +77,7 @@ class DrawOrderBatch(BaseBatch[DrawOrderArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: DrawOrderArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +DrawOrder._BATCH_TYPE = DrawOrderBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/line_strip2d.py b/rerun_py/rerun_sdk/rerun/components/line_strip2d.py index 7e7cc8538259..b29de48d435b 100644 --- a/rerun_py/rerun_sdk/rerun/components/line_strip2d.py +++ b/rerun_py/rerun_sdk/rerun/components/line_strip2d.py @@ -84,3 +84,7 @@ class LineStrip2DBatch(BaseBatch[LineStrip2DArrayLike], ComponentBatchMixin): @staticmethod def _native_to_pa_array(data: LineStrip2DArrayLike, data_type: pa.DataType) -> pa.Array: return LineStrip2DExt.native_to_pa_array_override(data, data_type) + + +# This is patched in late to avoid circular dependencies. +LineStrip2D._BATCH_TYPE = LineStrip2DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/line_strip3d.py b/rerun_py/rerun_sdk/rerun/components/line_strip3d.py index 6ce74eae63cc..f323f4b53650 100644 --- a/rerun_py/rerun_sdk/rerun/components/line_strip3d.py +++ b/rerun_py/rerun_sdk/rerun/components/line_strip3d.py @@ -84,3 +84,7 @@ class LineStrip3DBatch(BaseBatch[LineStrip3DArrayLike], ComponentBatchMixin): @staticmethod def _native_to_pa_array(data: LineStrip3DArrayLike, data_type: pa.DataType) -> pa.Array: return LineStrip3DExt.native_to_pa_array_override(data, data_type) + + +# This is patched in late to avoid circular dependencies. +LineStrip3D._BATCH_TYPE = LineStrip3DBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/marker_size.py b/rerun_py/rerun_sdk/rerun/components/marker_size.py index 0f1b6517fda8..1e92dd48deec 100644 --- a/rerun_py/rerun_sdk/rerun/components/marker_size.py +++ b/rerun_py/rerun_sdk/rerun/components/marker_size.py @@ -69,3 +69,7 @@ class MarkerSizeBatch(BaseBatch[MarkerSizeArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: MarkerSizeArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +MarkerSize._BATCH_TYPE = MarkerSizeBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/media_type.py b/rerun_py/rerun_sdk/rerun/components/media_type.py index 0f34ea535b59..55233515c42d 100644 --- a/rerun_py/rerun_sdk/rerun/components/media_type.py +++ b/rerun_py/rerun_sdk/rerun/components/media_type.py @@ -41,5 +41,4 @@ class MediaTypeBatch(datatypes.Utf8Batch, ComponentBatchMixin): # This is patched in late to avoid circular dependencies. MediaType._BATCH_TYPE = MediaTypeBatch # type: ignore[assignment] - MediaTypeExt.deferred_patch_class(MediaType) diff --git a/rerun_py/rerun_sdk/rerun/components/radius.py b/rerun_py/rerun_sdk/rerun/components/radius.py index 930ff2c0412b..95ddd04fed1a 100644 --- a/rerun_py/rerun_sdk/rerun/components/radius.py +++ b/rerun_py/rerun_sdk/rerun/components/radius.py @@ -69,3 +69,7 @@ class RadiusBatch(BaseBatch[RadiusArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: RadiusArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +Radius._BATCH_TYPE = RadiusBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/scalar.py b/rerun_py/rerun_sdk/rerun/components/scalar.py index 275693b7292e..2a0b69cd90dc 100644 --- a/rerun_py/rerun_sdk/rerun/components/scalar.py +++ b/rerun_py/rerun_sdk/rerun/components/scalar.py @@ -73,3 +73,7 @@ class ScalarBatch(BaseBatch[ScalarArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: ScalarArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float64).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +Scalar._BATCH_TYPE = ScalarBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/stroke_width.py b/rerun_py/rerun_sdk/rerun/components/stroke_width.py index 1b4ae4e56911..3d21d9afbbf6 100644 --- a/rerun_py/rerun_sdk/rerun/components/stroke_width.py +++ b/rerun_py/rerun_sdk/rerun/components/stroke_width.py @@ -69,3 +69,7 @@ class StrokeWidthBatch(BaseBatch[StrokeWidthArrayLike], ComponentBatchMixin): def _native_to_pa_array(data: StrokeWidthArrayLike, data_type: pa.DataType) -> pa.Array: array = np.asarray(data, dtype=np.float32).flatten() return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +StrokeWidth._BATCH_TYPE = StrokeWidthBatch # type: ignore[assignment] 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 8896d4ea61e4..63bcd69d309c 100644 --- a/rerun_py/rerun_sdk/rerun/components/text_log_level.py +++ b/rerun_py/rerun_sdk/rerun/components/text_log_level.py @@ -46,5 +46,4 @@ class TextLogLevelBatch(datatypes.Utf8Batch, ComponentBatchMixin): # This is patched in late to avoid circular dependencies. TextLogLevel._BATCH_TYPE = TextLogLevelBatch # type: ignore[assignment] - TextLogLevelExt.deferred_patch_class(TextLogLevel) diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py index d57fd519038a..4913d61ec99f 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py @@ -103,4 +103,7 @@ def _native_to_pa_array(data: ViewCoordinatesArrayLike, data_type: pa.DataType) return ViewCoordinatesExt.native_to_pa_array_override(data, data_type) +# This is patched in late to avoid circular dependencies. +ViewCoordinates._BATCH_TYPE = ViewCoordinatesBatch # type: ignore[assignment] + ViewCoordinatesExt.deferred_patch_class(ViewCoordinates) diff --git a/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py b/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py index 32faed8a8a3b..b0ca7da33cc9 100644 --- a/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py +++ b/rerun_py/rerun_sdk/rerun/components/visualizer_overrides.py @@ -65,3 +65,7 @@ def _native_to_pa_array(data: VisualizerOverridesArrayLike, data_type: pa.DataTy raise NotImplementedError( "Arrow serialization of VisualizerOverrides not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in visualizer_overrides_ext.py + + +# This is patched in late to avoid circular dependencies. +VisualizerOverrides._BATCH_TYPE = VisualizerOverridesBatch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer10.py b/rerun_py/tests/test_types/components/affix_fuzzer10.py index be41cd72e47b..9d065486e2e5 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer10.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer10.py @@ -62,3 +62,7 @@ def _native_to_pa_array(data: AffixFuzzer10ArrayLike, data_type: pa.DataType) -> array = [str(data)] return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer10._BATCH_TYPE = AffixFuzzer10Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer11.py b/rerun_py/tests/test_types/components/affix_fuzzer11.py index e99806044480..bea6dfa33c4e 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer11.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer11.py @@ -65,3 +65,7 @@ def _native_to_pa_array(data: AffixFuzzer11ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer11 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer11_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer11._BATCH_TYPE = AffixFuzzer11Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer12.py b/rerun_py/tests/test_types/components/affix_fuzzer12.py index 5d9e298efa8a..824953142d55 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer12.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer12.py @@ -56,3 +56,7 @@ def _native_to_pa_array(data: AffixFuzzer12ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer12 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer12_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer12._BATCH_TYPE = AffixFuzzer12Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer13.py b/rerun_py/tests/test_types/components/affix_fuzzer13.py index 4ea8e5b97df7..bd6913510e77 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer13.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer13.py @@ -56,3 +56,7 @@ def _native_to_pa_array(data: AffixFuzzer13ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer13 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer13_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer13._BATCH_TYPE = AffixFuzzer13Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer16.py b/rerun_py/tests/test_types/components/affix_fuzzer16.py index 622a4fd8abed..952a836cf76a 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer16.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer16.py @@ -120,3 +120,7 @@ def _native_to_pa_array(data: AffixFuzzer16ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer16 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer16_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer16._BATCH_TYPE = AffixFuzzer16Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer17.py b/rerun_py/tests/test_types/components/affix_fuzzer17.py index d65b96156a90..6ddd16b31eca 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer17.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer17.py @@ -120,3 +120,7 @@ def _native_to_pa_array(data: AffixFuzzer17ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer17 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer17_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer17._BATCH_TYPE = AffixFuzzer17Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer18.py b/rerun_py/tests/test_types/components/affix_fuzzer18.py index 39dd3c089f9f..e851be58727e 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer18.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer18.py @@ -236,3 +236,7 @@ def _native_to_pa_array(data: AffixFuzzer18ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer18 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer18_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer18._BATCH_TYPE = AffixFuzzer18Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer7.py b/rerun_py/tests/test_types/components/affix_fuzzer7.py index 8a668ae0b870..6bee65bc652a 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer7.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer7.py @@ -97,3 +97,7 @@ def _native_to_pa_array(data: AffixFuzzer7ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer7 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer7_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer7._BATCH_TYPE = AffixFuzzer7Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer8.py b/rerun_py/tests/test_types/components/affix_fuzzer8.py index da79ee6dab96..593752885fad 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer8.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer8.py @@ -63,3 +63,7 @@ def _native_to_pa_array(data: AffixFuzzer8ArrayLike, data_type: pa.DataType) -> raise NotImplementedError( "Arrow serialization of AffixFuzzer8 not implemented: We lack codegen for arrow-serialization of general structs" ) # You need to implement native_to_pa_array_override in affix_fuzzer8_ext.py + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer8._BATCH_TYPE = AffixFuzzer8Batch # type: ignore[assignment] diff --git a/rerun_py/tests/test_types/components/affix_fuzzer9.py b/rerun_py/tests/test_types/components/affix_fuzzer9.py index 7b552ffb7097..7e3f97743a02 100644 --- a/rerun_py/tests/test_types/components/affix_fuzzer9.py +++ b/rerun_py/tests/test_types/components/affix_fuzzer9.py @@ -65,3 +65,7 @@ def _native_to_pa_array(data: AffixFuzzer9ArrayLike, data_type: pa.DataType) -> array = [str(data)] return pa.array(array, type=data_type) + + +# This is patched in late to avoid circular dependencies. +AffixFuzzer9._BATCH_TYPE = AffixFuzzer9Batch # type: ignore[assignment]