Skip to content

Commit

Permalink
Add registration support to python remote API (#7995)
Browse files Browse the repository at this point in the history
### What
- Builds on top of: #7994 to add
support for a `register` API

Example:
```python
import rerun as rr
import pyarrow as pa

rr.init("rerun_example_reds")
rr.save("/tmp/test.rrd")
rr.log("test", rr.TextLog("Hello, world!"))

conn = rr.remote.connect("http://0.0.0.0:51234")

resp = conn.register(
    "file:///tmp/test.rrd",
    {
        "my_col": pa.array(["c"]),
    },
)
print(f"Registered recording with id: {resp}")
```

Verified in the catalog:
```
┌─────────────────────────────────┬─────────────┬──────────────────────┬────────────────┬────────┐
│ id                              ┆ description ┆ storage_url          ┆ recording_type ┆ my_col │
│ ---                             ┆ ---         ┆ ---                  ┆ ---            ┆ ---    │
│ str                             ┆ str         ┆ str                  ┆ cat            ┆ str    │
╞═════════════════════════════════╪═════════════╪══════════════════════╪════════════════╪════════╡
│ a82d7976-f9a5-49e2-825e-ab2771… ┆             ┆ file:///tmp/test.rrd ┆ rrd            ┆ c      │
└─────────────────────────────────┴─────────────┴──────────────────────┴────────────────┴────────┘
```

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7995?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7995?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7995)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
  • Loading branch information
jleibs authored Nov 5, 2024
1 parent dab6eb5 commit fb5a4c6
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 14 deletions.
Loading

0 comments on commit fb5a4c6

Please sign in to comment.