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

Docs & snippets revamp in preparation for 0.22's new APIs #8881

Merged
merged 10 commits into from
Feb 3, 2025

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Jan 31, 2025

Documentation updates in preparation for the new partial updates and columnar APIs in the upcoming 0.22 release.

There are three big components to this:

  • A lot of new snippets, and cleanup of existing ones.
  • A handful of new doc pages for the website.
  • A migration guide.

Also then there's a bunch of codegen improvements, fixes to existing docs, etc.

Note

I made the conscious decision of not mentioning tagging/sorbet anywhere. It's already a lot of information as-is, and at the moment tags provide no value to end users anyhow. As far are users are concerned, these new APIs exist only because they are a net improvement, and not because they allow us to tag things.
Similarly, no mention of send_dataframes at this point.

Everything is vastly improvable in every way -- feel free to.

New snippets

The new snippets are designed to showcase a few key points:

  • Rerun has row-oriented, stateful APIs, that make it easy to get started.
  • Rerun also has column-oriented, stateless APIs, when the situation calls for it.
  • Both the row-oriented and columnar APIs operate on a "partial update" model.
  • The row and columnar API are very consistent, and switching from one to the other requires very little effort and "makes sense".

Specifically, these are the most important snippets to watch out for. They are not only used in the snippet index but also all over the place in the docs:

("Update rows", [
    "archetypes/scalar_row_updates",
    "archetypes/points3d_row_updates",
    "archetypes/transform3d_row_updates",
]),
("Update columns", [
    "archetypes/scalar_column_updates",
    "archetypes/points3d_column_updates",
    "archetypes/transform3d_column_updates",
    "archetypes/image_column_updates",
]),
("Partial updates", [
    "archetypes/points3d_partial_updates",
    "archetypes/transform3d_partial_updates",
    "archetypes/mesh3d_partial_updates",
]),

The choice of archetypes is not random:

  • Update rows:
    • archetypes/scalar_row_updates: using a "mono-oriented" archetype
    • archetypes/points3d_row_updates: using a run-of-the-mill "batch-oriented" archetype
    • archetypes/transform3d_row_updates: transforms are hard and important, they deserve special focus
  • Update columns:
    • archetypes/scalar_column_updates: using a "mono-oriented" archetype
    • archetypes/points3d_column_updates: using a run-of-the-mill "batch-oriented" archetype
    • archetypes/transform3d_column_updates: transforms are hard and important, they deserve special focus
    • archetypes/image_column_updates: images in a columnar context are important and not trivial to reason about, they deserve special focus
  • Partial updates:
    • archetypes/points3d_partial_updates: using a run-of-the-mill "batch-oriented" archetype
    • archetypes/transform3d_partial_updates: transforms are hard and important, they deserve special focus
    • archetypes/mesh3d_partial_updates: mesh in a partial update context are not trivial to reason about, they deserve special focus

All of these snippets have comparisons enabled for all three languages.

Snippet index (rendered)

New documentation

There are 4 new pages:

  • Concepts > Chunks and Concepts > Latest-at semantics
    These are the most important ones: they are pretty much a port (also known as a copypasta) of Niko's blog post from a while back -- turns out that a lot of valuable information about Rerun has only ever existed in that blog post for the longest time, and was never formalized in the actual docs.
    These pages teach the user about chunks and latest-at semantics, without which it is impossible to understand why, where and how the partial updates & columnar APIs come into play.
  • How to > Send entire columns at once
    This is a rewrite of the existing page that:
    • Explains succintcly why the columnar APIs are useful, and points to Concepts > Chunks for further info.
    • Showcases the new snippets, with inline previews.
    • Demonstrates the relationship between the row and column oriented APIs, with code that shows how to go from one to another and back.
  • How to > Send partial updates over time
    A new page that:
    • Explains succintcly that everything in Rerun is a partial update, and points to Concepts > Latest-at semantics for further info.
    • Showcases the new snippets, with inline previews.

Migration guide

Migration guide (rendered).


Copy link

github-actions bot commented Jan 31, 2025

Latest documentation preview deployed successfully.

Result Commit Link
0c0dc6e https://landing-hrkfe7zmi-rerun.vercel.app/docs

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

Copy link

github-actions bot commented Jan 31, 2025

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

  • I have tested the web viewer
Result Commit Link Manifest
0c0dc6e https://rerun.io/viewer/pr/8881 +nightly +main

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

@teh-cmc teh-cmc force-pushed the cmc/partial_updates_doc branch from 4cb8f3e to de05fff Compare January 31, 2025 16:50
@teh-cmc teh-cmc changed the base branch from main to andreas/cpp/any January 31, 2025 16:51
Base automatically changed from andreas/cpp/any to main January 31, 2025 17:42
@teh-cmc teh-cmc force-pushed the cmc/partial_updates_doc branch 6 times, most recently from a1299b8 to 05adecc Compare February 2, 2025 20:56
@teh-cmc teh-cmc changed the title Doc updates playground Docs & snippets revamp in preparation for 0.22's new APIs Feb 2, 2025
@teh-cmc teh-cmc added 📖 documentation Improvements or additions to documentation examples Issues relating to the Rerun examples ⛴ release Related to shipping or publishing exclude from changelog PRs with this won't show up in CHANGELOG.md labels Feb 2, 2025
@teh-cmc teh-cmc force-pushed the cmc/partial_updates_doc branch 6 times, most recently from 69a41e6 to 2804459 Compare February 2, 2025 21:58
@teh-cmc teh-cmc marked this pull request as ready for review February 2, 2025 22:03
@teh-cmc teh-cmc force-pushed the cmc/partial_updates_doc branch from 2804459 to 2ae8c32 Compare February 2, 2025 22:07
@Wumpf Wumpf self-requested a review February 3, 2025 08:04
@Wumpf Wumpf force-pushed the cmc/partial_updates_doc branch from afd755c to f87128e Compare February 3, 2025 09:37
Comment on lines 16 to +20
/// \example archetypes/transform3d_simple title="Variety of 3D transforms" image="https://static.rerun.io/transform3d_simple/141368b07360ce3fcb1553079258ae3f42bdb9ac/1200w.png"
/// \example archetypes/transform3d_hierarchy title="Transform hierarchy" image="https://static.rerun.io/transform_hierarchy/cb7be7a5a31fcb2efc02ba38e434849248f87554/1200w.png"
/// \example archetypes/transform3d_row_updates title="Update a transform over time" image="https://static.rerun.io/transform3d_column_updates/80634e1c7c7a505387e975f25ea8b6bc1d4eb9db/1200w.png"
/// \example archetypes/transform3d_column_updates title="Update a transform over time, in a single operation" image="https://static.rerun.io/transform3d_column_updates/80634e1c7c7a505387e975f25ea8b6bc1d4eb9db/1200w.png"
/// \example archetypes/transform3d_partial_updates title="Update specific properties of a transform over time" image="https://static.rerun.io/transform3d_partial_updates/11815bebc69ae400847896372b496cdd3e9b19fb/1200w.png"
Copy link
Member

Choose a reason for hiding this comment

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

showing all of those in the api is.. a lot. But I guess rather too much than too little :/

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

Marvelous. Did some small fixes & formulation tweaks here and there but I think this is really really good now already

@Wumpf Wumpf merged commit d3ae65c into main Feb 3, 2025
36 of 37 checks passed
@Wumpf Wumpf deleted the cmc/partial_updates_doc branch February 3, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation examples Issues relating to the Rerun examples exclude from changelog PRs with this won't show up in CHANGELOG.md ⛴ release Related to shipping or publishing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tagged columnar updates: docs Tagged columnar updates New partial updates logging APIs: Docs
2 participants