Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Jul 11, 2025

cc @ntjohnson1 as this replaces set_active_partition_url - do we have to update some notebooks?

viewer = Viewer()

dna = "https://app.rerun.io/version/nightly/examples/dna.rrd"
rgbd = "https://app.rerun.io/version/nightly/examples/rgbd.rrd"

viewer.open_url(dna)
viewer.open_url(rgbd)

# later

viewer.close_url(rgbd)

Also reworked the _data_queue+_table_queue into a single _event_queue which all calls to send go through now. This means not only rrd/table data, but all events will be buffered in the same way, and in the right order relative to each other.

@jprochazk jprochazk added sdk-python Python logging API notebook Jupyter notebooks etc include in changelog labels Jul 11, 2025
Copy link

github-actions bot commented Jul 11, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
1d57732 https://rerun.io/viewer/pr/10602 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link
Member

@ntjohnson1 ntjohnson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the workflow in the PR description. I see it now

If we do

url_a = <>
url_b = <>
viewer = Viewer(<>)
viewer.open_url(url_a)
# wait to show a
time.sleep(<>)
viewer.open_url(url_b)
# wait to show b
viewer.open_url(url_a)

Does this do the right thing by showing a, then b, then a? I don't know the next level deeper enough to know how opening the same url twice behaves. If we can have a bunch of things open my first attempt in updating my code would be to open ALL my urls, then call open a second time to bring a preloaded url to the main view.

@jprochazk
Copy link
Member Author

jprochazk commented Jul 11, 2025

Does this do the right thing by showing a, then b, then a?

There are no uniqueness constraints on data sources, so this will open A, then B, then A again, resulting in 3 open recordings. It will fetch A's data twice.

If we can have a bunch of things open my first attempt in updating my code would be to open ALL my urls, then call open a second time to bring a preloaded url to the main view.

We don't have a way to activate a recording by its URL. If you want the exact same behavior as before, you'd do

viewer = Viewer()
current_url = None

# ...
current_url = dataset.partition_url(...)
viewer.open_url(current_url)

# ... later
viewer.close_url(current_url)
current_url = dataset.partition_url(...)
viewer.open_url(current_url)

But there should be no harm in leaving the older partitions open, no? So you'd have this instead:

viewer = Viewer()

viewer.open_url(dataset.partition_url(...))

# later, open another one
viewer.open_url(dataset.partition_url(...))

@jprochazk jprochazk merged commit 32322c9 into main Jul 15, 2025
41 checks passed
@jprochazk jprochazk deleted the jan/open-url branch July 15, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog notebook Jupyter notebooks etc sdk-python Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants