Skip to content

Commit

Permalink
Merge branch 'main' into jan/grpc-log-sink
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk authored Jan 17, 2025
2 parents c44ce18 + cae7a6a commit e5ca91e
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 14 deletions.
6 changes: 5 additions & 1 deletion crates/utils/re_arrow_util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ re_log.workspace = true
re_tracing.workspace = true

arrow.workspace = true
arrow2.workspace = true
arrow2 = { workspace = true, features = [
"compute_concatenate",
"compute_filter",
"compute_take",
] }
itertools.workspace = true
12 changes: 6 additions & 6 deletions docs/snippets/INDEX.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions docs/snippets/all/tutorials/any_values.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//! Log arbitrary data.
use std::sync::Arc;

use rerun::external::arrow;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_any_values").spawn()?;

let confidences = rerun::SerializedComponentBatch::new(
Arc::new(arrow::array::Float64Array::from(vec![1.2, 3.4, 5.6])),
rerun::ComponentDescriptor::new("confidence"),
);

let description = rerun::SerializedComponentBatch::new(
Arc::new(arrow::array::StringArray::from(vec!["Bla bla bla…"])),
rerun::ComponentDescriptor::new("description"),
);

rec.log("any_values", &[confidences, description])?;

Ok(())
}
2 changes: 1 addition & 1 deletion docs/snippets/all/tutorials/extra_values.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Log extra values with a Points2D."""
"""Log extra values with a `Points2D`."""

import rerun as rr
import rerun.blueprint as rrb
Expand Down
22 changes: 22 additions & 0 deletions docs/snippets/all/tutorials/extra_values.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//! Log extra values with a `Points2D`.
use std::sync::Arc;

use rerun::external::arrow;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let rec = rerun::RecordingStreamBuilder::new("rerun_example_extra_values").spawn()?;

let points = rerun::Points2D::new([(-1.0, -1.0), (-1.0, 1.0), (1.0, -1.0), (1.0, 1.0)]);
let confidences = rerun::SerializedComponentBatch::new(
Arc::new(arrow::array::Float64Array::from(vec![0.3, 0.4, 0.5, 0.6])),
rerun::ComponentDescriptor::new("confidence"),
);

rec.log(
"extra_values",
&[&points as &dyn rerun::AsComponents, &confidences],
)?;

Ok(())
}
5 changes: 3 additions & 2 deletions docs/snippets/snippets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
]
"tutorials/any_values" = [ # Not yet implemented
"cpp",
"rust",
]
"tutorials/custom-application-id" = [ # Not a complete examples
"cpp",
Expand All @@ -151,7 +150,9 @@
"rust",
"py",
]
"tutorials/extra_values" = ["cpp", "rust"] # Missing examples
"tutorials/extra_values" = [ # Missing examples
"cpp",
]
"tutorials/log-file" = [ # Not a complete examples
"cpp",
"rust",
Expand Down
10 changes: 6 additions & 4 deletions lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,15 @@ exclude = [
# '^file:///', # Ignore local file links. They need to be tested, but it's useful for external links we have to ping.

# Snippets that haven't been released yet.
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.py',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.py',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.cpp',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.cpp',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.py',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates.rs',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.cpp',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.py',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_partial_updates_legacy.rs',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.py',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.cpp',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.py',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/transform3d_partial_updates.rs',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.rs',
'https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.rs',
]

0 comments on commit e5ca91e

Please sign in to comment.