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 python serialization for ContainerBlueprint #5390

Merged
merged 18 commits into from
Mar 5, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Mar 4, 2024

What

Cherry-picked over the Name / Visibillity changes from andreas/serializable-spaceviewblueprint, so we'll need to navigate merge conflicts there.

Standard implementation of serializers and a unit-test for them:

After talking to @Wumpf I moved some of the list-types up a level to simplify the serialization code, but this raised an issue with mismatched dimensions. Need to discuss if we want to remove this check (in light of the instance-key simplification), or push things back down to mono-components with internal lists.

TODO

[2024-03-04T23:10:53Z WARN  re_log::result_extensions] crates/re_viewport/src/container.rs:240 Failed to create Container blueprint.: Each cell must contain either 0, 1 or `num_instances` instances, but cell 'rerun.blueprint.components.RowShare' in '/container/439ad7ad-829c-4085-833b-eb30efae0810' holds 2 instances (expected 3)

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!

@jleibs jleibs changed the title Jleibs/container blueprint serialize Introduce python serialization for ContainerBlueprint Mar 4, 2024
@jleibs jleibs added 🐍 Python API Python logging API 🟦 blueprint The data that defines our UI exclude from changelog PRs with this won't show up in CHANGELOG.md labels Mar 4, 2024
@jleibs jleibs marked this pull request as ready for review March 4, 2024 23:23
@jleibs jleibs requested a review from Wumpf March 4, 2024 23:23
@jleibs jleibs force-pushed the jleibs/container_blueprint_serialize branch from 6c2fa96 to 84aafb6 Compare March 4, 2024 23:37
@jleibs jleibs changed the base branch from andreas/serializable-included-space-view2 to main March 4, 2024 23:37
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.

some confusion around aliases and float/double. Otherwise looks good! Your test makes a little bit more sense than the ones I have - I should also feed in more arrays with the component type already provided.
We'll have to fix the grid stuff first ofc as well as you pointed out

"attr.rerun.scope": "blueprint",
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord",
"attr.rust.repr": "transparent"
"attr.rust.repr": "transparent",
"attr.rust.tuple_struct"
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised we don't have a python alias defined here, I got mypy errors when I didn't put bool in there explicitely

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is something that come over partially from the cherry-pick

let mandatory_docstring = format!(
r#""""Extension for [{name}][rerun.{kind}.{name}].""""#,
r#""""Extension for [{name}][rerun.{scope}{kind}.{name}].""""#,
Copy link
Member

Choose a reason for hiding this comment

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

ah good fix, I just yielded to the broken version so far

@jleibs jleibs force-pushed the jleibs/container_blueprint_serialize branch from 84aafb6 to 007b5cd Compare March 5, 2024 14:27
@Wumpf Wumpf self-requested a review March 5, 2024 16:58
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.

👍

@jleibs jleibs merged commit bdc987c into main Mar 5, 2024
39 of 40 checks passed
@jleibs jleibs deleted the jleibs/container_blueprint_serialize branch March 5, 2024 20:26
jleibs added a commit that referenced this pull request Mar 5, 2024
### What

Plus the usual amount of plumbing, following overall similar patterns
than the previous PRs in this area

* Sister PR to #5390
* Part of #4167

### 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 newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5401/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5401/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5401/index.html?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)!

- [PR Build Summary](https://build.rerun.io/pr/5401)
- [Docs
preview](https://rerun.io/preview/4095985db6d11b3625e845b512983983c0bbea7a/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/4095985db6d11b3625e845b512983983c0bbea7a/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Jeremy Leibs <[email protected]>
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 exclude from changelog PRs with this won't show up in CHANGELOG.md 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants