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

Expose all Rerun enums and types to main module scope #1598

Merged
merged 6 commits into from Mar 20, 2023

Conversation

nikolausWest
Copy link
Member

@nikolausWest nikolausWest commented Mar 15, 2023

Expose AnnotationInfo, ClassDescription, LogLevel, MeshFormat, RectFormat, and ImageFormat to the top level rerun module scope so you only need to import rerun as rr to use these types.

Note: no change of user code is needed

The old ways of importing these types (e.g. from rerun.log.annotation import AnnotationInfo will continue to work like before. However, these types will now be easier to access as they are available directly under the main module scope (e.g. rr.AnnotationInfo) without requiring an explicit import.

TODO

Checklist

@nikolausWest nikolausWest added 🐍 Python API Python logging API 😤 annoying Something in the UI / SDK is annoying to use labels Mar 15, 2023
@nikolausWest nikolausWest changed the title Expose enums to main rerun module scope Expose all Rerun enums and types to main module scope Mar 16, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Looks good!

Does the old code (from rerun.log.annotation import AnnotationInfo) still work?

In any case, please add a short migration guide to the PR description for our users, listing all identifiers that are now found under rr.

@nikolausWest
Copy link
Member Author

Does the old code (from rerun.log.annotation import AnnotationInfo) still work?

Yes

@nikolausWest nikolausWest merged commit c11266d into main Mar 20, 2023
@nikolausWest nikolausWest deleted the niko/export-python-enums branch March 20, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants