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 log_mesh_file: accept either path or bytes #2098

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented May 12, 2023

We had a user who accidentally passed in a path instead of bytes.

That is an argument for named arguments, and for supporting both paths and file contents.

This is a breaking change, but one that mypy catches:

mypy --no-warn-unused-ignore
examples/python/deep_sdf/main.py:110: error: Too many positional arguments for "log_mesh_file"  [misc]

…so let's hope our users uses mypy!

Checklist

PR Build Summary: https://build.rerun.io/pr/2098

We had a user who accidentally passed in a path instead of bytes.

That is an argument for named arguments, and for supporting both
paths and file contents.
@emilk emilk changed the title Python log_mesh_file: accept either path or bytes Python log_mesh_file: accept either path or bytes May 12, 2023
@emilk emilk added enhancement New feature or request 🐍 Python API Python logging API labels May 12, 2023
@Wumpf Wumpf self-requested a review May 12, 2023 07:39
@@ -67,7 +67,7 @@ def get_mesh_format(mesh: Trimesh) -> rr.MeshFormat:
try:
return {
".glb": rr.MeshFormat.GLB,
# ".gltf": MeshFormat.GLTF,
# ".gltf": rr.MeshFormat.GLTF,
Copy link
Member

Choose a reason for hiding this comment

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

this is strange actually. We do support gltf.

Copy link
Member Author

Choose a reason for hiding this comment

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

Until we have a test for it, I wouldn't say we do…

@emilk emilk merged commit 3895b35 into main May 12, 2023
16 of 17 checks passed
@emilk emilk deleted the emilk/log-mesh-by-path branch May 12, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants