Open
Conversation
for more information, see https://pre-commit.ci
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
What is this PR
Why is this PR needed?
This PR adds initial I/O functionality for BVH formats and establishes a foundation of reliable test coverage. It ensures the loader works correctly with both simple and relatively more complex BVH fixtures generated locally.
What does this PR do?
from_bvh_filefunction that loads BVH files using bvhio into a movement dataset, along with a basic validator.References
closes #299
How has this PR been tested?
This PR has been tested with a dedicated set of unit tests covering BVH loader functionality:
-Dataset validation:
test_load_from_bvh_filechecks that loading both simple and complex BVH fixtures produces a validxarray.Datasetwith correct dimensions, coordinates, and metadata (fps, file_path, source_software, time_unit).
-Joint hierarchy:
test_bvh_joint_namesverifies that the joint names parsed from the BVH hierarchy match the expected structure for bothfixtures.
-FPS handling:
test_bvh_fps_from_frame_timeensures fps is correctly computed from the Frame Time field.test_bvh_fps_noneconfirms that when fps=None is passed, the loader still computes fps from the file.-Validation checks:
test_valid_bvh_fileconfirms that a well‑formed BVH passes validation.test_invalid_bvh_no_hierarchyandtest_invalid_bvh_no_motionassert that missing required sections raiseValueError.test_invalid_bvh_wrong_extensionensures files with incorrect extensions fail validation.All BVH loader tests pass. The next aim would be to add integration tests after the addition perhaps of some sample BVH data on the GIN repo.
Is this a breaking change?
No
Does this PR require an update to the documentation?
Yes, the documentation should be updated to include the new function that allows the user to load BVH files. I will do that after finishing.
Next steps
Checklist: