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

Python codegen: support for Transform3D #2639

Merged
merged 31 commits into from
Jul 13, 2023
Merged

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Jul 9, 2023

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 (Parse default values during semantic pass #2641).

TODO:

  • arrow serialisation (basic, to be tested)
  • rr.arch.Transform3D() serialisation tests
  • default types (from_parent) (including proper field sorting)
  • ruff --fix seems to always fail (config error on my side)

TODO @teh-cmc and/or @jleibs :

Checklist

@abey79 abey79 added 🐍 Python API Python logging API codegen/idl labels Jul 9, 2023
teh-cmc added a commit that referenced this pull request Jul 11, 2023
- Introduce IDL definitions for the `Transform3D` family of types
- Fixes the top-level nullable union field in struct mess + add related
fuzzing test cases
- Fixes an issue with arrays of booleans + add related fuzzing test case
- Fixes an issue with lists and fixed-size lists of transparent objects
+ add related fuzzing test case
- Other fixes and improvements, see commits

Required for #2639 

### 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/2654) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2654)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Frust_codegend_transforms/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Frust_codegend_transforms/examples)

---------

Co-authored-by: Antoine Beyeler <[email protected]>
@abey79 abey79 force-pushed the antoine/hope-python-transforms-new branch from b236faa to 37c188e Compare July 11, 2023 08:45
@teh-cmc teh-cmc mentioned this pull request Jul 11, 2023
3 tasks
@jleibs jleibs marked this pull request as ready for review July 12, 2023 16:15
@jleibs jleibs merged commit 021979e into main Jul 13, 2023
@jleibs jleibs deleted the antoine/hope-python-transforms-new branch July 13, 2023 21:51
teh-cmc added a commit that referenced this pull request Jul 19, 2023
**Commit by commit!**

This PR makes it so Python and Rust can exchange `Transform3D` data
using the new Archetype-based APIs.

Roughly:
- Fixes serialization issues in Python SDK
- Implements all necessary Rust extensions
- Improves our roundtrip test suite
- Implements cross-language roundtrip tests for `Transform3D`

Fixes #2644 

Requires:
- #2639 
- #2673
- #2708 

---

### 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/2669) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2669)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Fhope_rust_transforms/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Fhope_rust_transforms/examples)

---------

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants