Skip to content

Commit

Permalink
Fix typo in VisualBounds2DExt causing it to throw (#6342)
Browse files Browse the repository at this point in the history
### What

Oversight in recent visualbounds2d refactor, made _a lot_ harder to
identify by the fact that we never ran tests with strict mode
#6341

### 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/6342?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/6342?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/6342)
- [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`.

---------

Co-authored-by: Jeremy Leibs <jeremy@rerun.io>
  • Loading branch information
Wumpf and jleibs authored May 16, 2024
1 parent 88a74d3 commit 1ff16a8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/re_dev_tools/src/build_examples/snippets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn collect_snippets_recursively(
.cloned()
.unwrap_or_default()
.into_iter()
.map(|value| value.replace("$config_dir", dir.as_str()))
.map(|value| value.replace("$config_dir", snippet_root_path.parent().unwrap().as_str()))
.collect();
snippets.push(Snippet {
extra_args,
Expand Down
3 changes: 1 addition & 2 deletions docs/snippets/compare_snippet_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def extra_args(self) -> list[str]:
for key in [self.subdir, self.subdir + "/" + self.name]:
if key in EXTRA_ARGS:
return [
arg.replace("$config_dir", str(Path(__file__).parent.parent.absolute()))
for arg in EXTRA_ARGS.get(key, [])
arg.replace("$config_dir", str(Path(__file__).parent.absolute())) for arg in EXTRA_ARGS.get(key, [])
]
return []

Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/snippets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ quick_start = [ # These examples don't have exactly the same implementation.

# `$config_dir` will be replaced with the absolute path of `docs/snippets`.
[extra_args]
"archetypes/asset3d_simple" = ["$config_dir/assets/cube.glb"]
"archetypes/asset3d_out_of_tree" = ["$config_dir/assets/cube.glb"]
"archetypes/asset3d_simple" = ["$config_dir/../assets/cube.glb"]
"archetypes/asset3d_out_of_tree" = ["$config_dir/../assets/cube.glb"]
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ def __init__(
"""

with catch_and_log_exceptions(context=self.__class__.__name__):
self.__attrs_init__(range2d=blueprint_components.VisualBounds2D(x_range=x_range, y_range=y_range))
self.__attrs_init__(range=blueprint_components.VisualBounds2D(x_range=x_range, y_range=y_range))
return
self.__attrs_clear__()

0 comments on commit 1ff16a8

Please sign in to comment.