-
Notifications
You must be signed in to change notification settings - Fork 366
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
MVP Blueprint APIs for layout and contents #5408
Conversation
680ac6f
to
50d6106
Compare
50d6106
to
6664cf3
Compare
@@ -218,6 +218,9 @@ def log_components( | |||
if None, use the global default from `rerun.strict_mode()` | |||
|
|||
""" | |||
# Convert to a native recording | |||
recording = RecordingStream.to_native(recording) |
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.
This was just an error before on this API. Apparently we don't use stream-overrides in any of our other examples.
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.
Both Container
and SpaceView
are veeery close to just being extension methods to ContainerBlueprint
and SpaceViewBlueprint
. I think that would be still worth considering as it means we have less types around and things will look less magic overall, making it a little bit more transparent what's going on - it's arguably both an advantage and disadvantage that this would expose the archetype's properties directly.
The derived Spatial2D/3D/Vertical/Horizontal etc. classes can still work the exact same way then I reckon
Love how easy and small api.py is. I'd recommend getting this in with above higher level comment(s) unresolved so we can all get our hands at the actual API asap :)
# Handle the cases for SpaceViewContentsLike | ||
if isinstance(self.contents, str): | ||
# str | ||
contents = SpaceViewContents(query=self.contents) | ||
elif isinstance(self.contents, Sequence) and len(self.contents) > 0 and isinstance(self.contents[0], str): | ||
# list[str] | ||
contents = SpaceViewContents(query="\n".join(self.contents)) | ||
elif isinstance(self.contents, SpaceViewContents): | ||
# SpaceViewContents | ||
contents = self.contents | ||
else: | ||
# Anything else we let SpaceViewContents handle | ||
contents = SpaceViewContents(query=self.contents) # type: ignore[arg-type] |
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.
it would be nicer if these were handled by SpaceViewContents
in such a way that passing any of them to SpaceViewContents
gives you a new usable SpaceViewContents
That way we can also unit test that separately
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.
Good call out.
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.
Uggh, this is a bit annoying. Leaving a TODO.
Size changes
|
What
rerun_py/rerun_sdk/rerun/blueprint/api.py
which defines the beginning of an API surfaceVec<LogMsg>
Known issues:
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io