Skip to content

Commit

Permalink
Improve many release checks with blueprints (#5561)
Browse files Browse the repository at this point in the history
### What

* Fixes #5477 

### 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/5561/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5561/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/5561/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/5561)
- [Docs
preview](https://rerun.io/preview/84194327e6aed95892948de58f757d177b6e2c21/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/84194327e6aed95892948de58f757d177b6e2c21/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
abey79 authored Mar 18, 2024
1 parent 71cd663 commit 21d010e
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

import numpy as np
import rerun as rr
import rerun.blueprint as rrb

README = """
# Context Menu - Add entity to new space view
## Blueprint tree
#### Blueprint tree
* Reset the blueprint.
* Expend all space views and data result.
* "Expand all" on the Vertical containers.
* Right-click on the `boxes3d` entity and select "Add to new space view" -> "3D". Check a new space view is created _and selected_ with the boxes3d entity and origin set to root.
* In each space view, right-click on the leaf entity, and check that "Add to new space view" recommends at least space views of the same kind.
* Select both the `boxes3d` entity and the `text_logs` entity. Check no space view is recommended (except Dataframe if enabled).
## Streams tree
#### Streams tree
* Right-click on the `bars` entity and check that a Bar Plot space view can successfully be created.
"""
Expand All @@ -29,6 +29,22 @@ def log_readme() -> None:
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True)


def blueprint() -> rrb.BlueprintLike:
return rrb.Viewport(
rrb.Horizontal(
rrb.TextDocumentView(origin="readme"),
rrb.Vertical(
rrb.Spatial3DView(origin="/boxes3d"),
rrb.Spatial2DView(origin="/boxes2d"),
rrb.TextLogView(origin="/text_logs"),
rrb.BarChartView(origin="/bars"),
rrb.TensorView(origin="/tensor"),
),
column_shares=[2, 1],
)
)


def log_some_space_views() -> None:
rr.set_time_sequence("frame_nr", 0)

Expand All @@ -44,7 +60,7 @@ def log_some_space_views() -> None:


def run(args: Namespace) -> None:
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4())
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4(), blueprint=blueprint())

log_readme()
log_some_space_views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from uuid import uuid4

import rerun as rr
import rerun.blueprint as rrb

README = """
# Context Menu - Add entity to new space view
## Blueprint tree
* Reset the blueprint.
* Right-click on Viewport and select "Collapse all". Check everything is collapsed by manually expending everything.
* Right-click on Viewport and select "Collapse all" and then "Expend all". Check everything is expanded.
Expand All @@ -30,17 +30,30 @@ def log_readme() -> None:
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True)


def log_some_space_views() -> None:
# TODO(ab): add a deep-ish container hierarchy blueprint for more collapse/expand fun
def blueprint() -> rrb.BlueprintLike:
return rrb.Viewport(
rrb.Horizontal(
rrb.TextDocumentView(origin="readme"),
rrb.Vertical(
rrb.Horizontal(
rrb.Vertical(
rrb.Spatial3DView(origin="/"),
)
)
),
column_shares=[2, 1],
)
)

rr.set_time_sequence("frame_nr", 0)

def log_some_space_views() -> None:
rr.set_time_sequence("frame_nr", 0)
rr.log("/", rr.Boxes3D(centers=[0, 0, 0], half_sizes=[1, 1, 1]))
rr.log("/world/robot/arm/actuator/thing", rr.Boxes3D(centers=[0.5, 0, 0], half_sizes=[0.1, 0.1, 0.1]))


def run(args: Namespace) -> None:
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4())
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4(), blueprint=blueprint())

log_readme()
log_some_space_views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@
from uuid import uuid4

import rerun as rr
import rerun.blueprint as rrb

README = """
# Context Menu - Invalid sub-container kind
## Preparation
TODO(ab): automate this with blueprints
- Reset the blueprint
- Add a Horizontal container and a Vertical container in the viewport, and move one space view into each.
## Checks
* Single-select a horizontal container, check that it disallow adding a horizontal container inside it.
* Same for a vertical container.
* Single-select the horizontal container, check that it disallow adding a horizontal container inside it.
* Same for the vertical container.
* Single select a space view inside a horizontal container, check that it disallow moving to a new horizontal container.
* Same for a space view inside a vertical container.
"""
Expand All @@ -30,6 +22,24 @@ def log_readme() -> None:
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True)


def blueprint() -> rrb.BlueprintLike:
return rrb.Viewport(
rrb.Horizontal(
rrb.TextDocumentView(origin="readme"),
rrb.Grid(
rrb.Vertical(
rrb.Spatial3DView(origin="/"),
),
rrb.Horizontal(
rrb.Spatial2DView(origin="/"),
),
grid_columns=1,
),
column_shares=[2, 1],
)
)


def log_some_space_views() -> None:
rr.set_time_sequence("frame_nr", 0)

Expand All @@ -38,7 +48,7 @@ def log_some_space_views() -> None:


def run(args: Namespace) -> None:
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4())
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4(), blueprint=blueprint())

log_readme()
log_some_space_views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,69 +5,57 @@
from uuid import uuid4

import rerun as rr
import rerun.blueprint as rrb

README = """
# Context Menu - Multi-selection
## Preparation
TODO(ab): automate this with blueprints
- Reset the blueprint
- Add a Horizontal container in the viewport and move both the 2D and 3D space view into it
## Checks
For each of the multi-selection below, check the context menu content as per the following table.
```plaintext
==========================================================
ITEMS CONTEXT MENU CONTENT
==========================================================
2x Space views Hide all
Remove
Expand all
Collapse all
Move to new Container
+ Horizontal container Hide all
Move to new Container
----------------------------------------------------------
+ Vertical container Hide all
Remove
Expand all
Collapse all
Move to new Container
Move to new Container
----------------------------------------------------------
+ Viewport Hide all
Expand all
Collapse all
--deselect all--
==========================================================
Space view + 'box2d' data result Hide all
Remove
Expand all
Collapse all
--deselect all--
==========================================================
'box2d' data result Hide all
+ 'box3d' entity (streams tree) Expand all
+ 'box3d' entity (streams tree)
Expand all
Collapse all
Add to new Space View
Add to new Space View
----------------------------------------------------------
+ some component Hide all
Expand all
Collapse all
==========================================================
```
"""

Expand All @@ -76,6 +64,19 @@ def log_readme() -> None:
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True)


def blueprint() -> rrb.BlueprintLike:
return rrb.Viewport(
rrb.Horizontal(
rrb.TextDocumentView(origin="readme"),
rrb.Vertical(
rrb.Spatial3DView(origin="/"),
rrb.Spatial2DView(origin="/"),
),
column_shares=[2, 1],
)
)


def log_some_space_views() -> None:
rr.set_time_sequence("frame_nr", 0)

Expand All @@ -84,7 +85,7 @@ def log_some_space_views() -> None:


def run(args: Namespace) -> None:
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4())
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4(), blueprint=blueprint())

log_readme()
log_some_space_views()
Expand Down
Loading

0 comments on commit 21d010e

Please sign in to comment.