-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python codegen: support for Transform3D (#2639)
### What This PR adds support for `Transform3D` to the new-gen Python SDK, including: - adding the relevant fbs - implementing codegen'd union types - adding all required hand-coded overrides - adding typed-checked test to demonstrate/assess API - full typing compliance for both mypy and pyright (required `disallow_untyped_calls = False` in `.mypy.ini`) **Note**: - The `from_parent` field is moved from `Transform3D` to both `Translation*` objects, to comply with the 1-comp-1-datatype rule. - The `from_parent` field has been made `nullable` though it has a default value, which are not yet implemented (#2641). TODO: - [x] arrow serialisation (basic, to be tested) - [x] `rr.arch.Transform3D()` serialisation tests - [x] default types (`from_parent`) (including proper field sorting) - [x] ~~`ruff --fix` seems to always fail~~ (config error on my side) TODO @teh-cmc and/or @jleibs : - [x] deal with commented-out hack in `rerun_py/src/arrow.rs` - [x] fix Rust codegen - [x] fix restriction on nullable union (see discussion in #2619) - [x] teach me how to properly indent text (in `python.rs`) ### 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 [demo.rerun.io](https://demo.rerun.io/pr/2639) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2639) - [Docs preview](https://rerun.io/preview/pr%3Aantoine%2Fhope-python-transforms-new/docs) - [Examples preview](https://rerun.io/preview/pr%3Aantoine%2Fhope-python-transforms-new/examples) --------- Co-authored-by: Jeremy Leibs <jeremy@rerun.io>
- Loading branch information
Showing
71 changed files
with
2,105 additions
and
754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This is a sha256 hash for all direct and indirect dependencies of this crate's build script. | ||
# It can be safely removed at anytime to force the build script to run again. | ||
# Check out build.rs to see how it's computed. | ||
48b1929d5cb17125eaae7733df116017fed8e27f5202d2365146e68e9a1a5b16 | ||
114ba22844997f4dc1a9fc81ad83419d80cf124c412777c44e1b9b71b3e50510 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.