Skip to content
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

Introduce new python API for setting overides #6650

Merged
merged 20 commits into from
Jun 28, 2024
Merged

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jun 25, 2024

What

The new API takes the form of a dict where the keys are entity paths and the values are lists of component batches.

Also adds serializer and support for VisualizerOverrides.

Example:

"""Log a scalar over time and override the visualizer."""

from math import cos, sin, tau

import rerun as rr
import rerun.blueprint as rrb

rr.init("rerun_example_series_line_overrides", spawn=True)

# Log the data on a timeline called "step".
for t in range(0, int(tau * 2 * 10.0)):
    rr.set_time_sequence("step", t)

    rr.log("trig/sin", rr.Scalar(sin(float(t) / 10.0)))
    rr.log("trig/cos", rr.Scalar(cos(float(t) / 10.0)))

# Use the SeriesPoint visualizer for the sin series.
rr.send_blueprint(
    rrb.TimeSeriesView(
        overrides={
            "trig/sin": [
                rrb.VisualizerOverrides(rrb.visualizers.SeriesPoint),
            ]
        },
    ),
)

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jleibs jleibs added 🟦 blueprint The data that defines our UI 🐍 Python API Python logging API include in changelog labels Jun 25, 2024
@jleibs jleibs changed the title WIP: add override API Introduce new python API for setting overides Jun 27, 2024
@jleibs jleibs force-pushed the jleibs/component_overrides branch from d8af2c9 to d372239 Compare June 27, 2024 18:19
Copy link

github-actions bot commented Jun 27, 2024

Deployed docs

Commit Link
5371a05 https://landing-f3prs2ilh-rerun.vercel.app/docs

@jleibs jleibs marked this pull request as ready for review June 27, 2024 18:20
@emilk emilk self-requested a review June 28, 2024 06:09
@jleibs jleibs force-pushed the jleibs/component_overrides branch from eea2015 to f72bd0f Compare June 28, 2024 14:12
@jleibs jleibs merged commit 09750d2 into main Jun 28, 2024
39 of 41 checks passed
@jleibs jleibs deleted the jleibs/component_overrides branch June 28, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI include in changelog 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blueprint APIs for component overrides
3 participants