-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate legacy Points{2|3}D
and all their components
#2768
Conversation
7ca7b0d
to
33ac381
Compare
8f05cdf
to
25b60c3
Compare
4e656a9
to
b3ba377
Compare
c9587f7
to
77c1f92
Compare
b3ba377
to
155b472
Compare
Point2D
, use new Point2D
all the way throughPoint{2|3}D
, use new Point{2|3}D
all the way through
Point{2|3}D
, use new Point{2|3}D
all the way throughPoints{2|3}D
, use new Points{2|3}D
all the way through
281c7d0
to
d4403d0
Compare
Points{2|3}D
, use new Points{2|3}D
all the way throughPoints{2|3}D
and all their components
edb792f
to
d70ec97
Compare
b348b39
to
0bfbd10
Compare
This is fine because A) this won't ever be released and B) as [1] shows, nobody as ever used ``` rr.log_points("a/b/c", colors=[red, blue, blue]) ``` since that simply never worked. [1] https://github.com/rerun-io/rerun/blob/main/rerun_py/rerun_sdk/rerun/log/points.py#L225-L226
96c777e
to
d0f296f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 🚢
@@ -49,6 +49,7 @@ arrow2 = { workspace = true, features = [ | |||
"compute_concatenate", | |||
] } | |||
anyhow.workspace = true | |||
arrow2_convert.workspace = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pain is temporary :|
fn try_to_arrow( | ||
&self, | ||
) -> re_types::SerializationResult< | ||
Vec<( | ||
re_viewer::external::arrow2::datatypes::Field, | ||
Box<dyn re_viewer::external::arrow2::array::Array>, | ||
)>, | ||
> { | ||
unimplemented!() | ||
} | ||
|
||
fn try_from_arrow( | ||
_data: impl IntoIterator< | ||
Item = ( | ||
re_viewer::external::arrow2::datatypes::Field, | ||
Box<dyn re_viewer::external::arrow2::array::Array>, | ||
), | ||
>, | ||
) -> re_viewer::external::re_types::DeserializationResult<Self> | ||
where | ||
Self: Sized, | ||
{ | ||
unimplemented!() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we were able to compress the visual space of this somehow it wouldn't be too bad 🤔
|
||
|
||
# NOTE: This has to live here for now, while we migrate to archetypes (circular experimental imports). | ||
def splat() -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would still appreciate calling this instance_key_splat
to make it clear what we're splatting
The
points2d
andpoints3d
views are now both implemented in terms of the new components (that was already the case for points2d).This PR removes all of these:
DrawOrder
Point2D
Point3D
Radius
InstanceKey
and deprecates all of those:
Color
Label
ClassId
KeypointId
The reason these last four are merely deprecated rather than removed entirely is that the legacy
AnnotationContext
depends on them, and more specifically depends on their respective implementations ofarrow2-convert
's traits.Still, they have been confined into tight corners as much as possible.
The deprecated type are prefixed with
Legacy
, e.g.LegacyLabel
.In particular,
ColorRGBA
is nowLegacyColor
.In Rust, the new components aren't hidden behind an
experimental
module anymore, instead they are transparently merged with the rest of the components.The new
Point2D
component implements the oldLegacyComponent
trait to allow all of the oldre_query
test suites to continue working, until we remove them all soon.The legacy point logging APIs,
log_point
&log_points
, have been rewritten in terms of thePoints2D
&Points3D
archetypes.In order to do so, I had to make their
position
argument mandatory, i.e. you can not write this anymore:rr.log_points("a/b/c", colors=[red, red, blue])
.This is not a problem for two reasons:
cc @Wumpf, the custom view example got a bit more verbose and should get much much better once we tackle #2778. We could also just modify it to use an existing archetype instead (which would have to be either
Points2D
orPoints3D
at the moment).Fixes #2790
What
Checklist