Skip to content

Conversation

KhushamBansal
Copy link

@KhushamBansal KhushamBansal commented Mar 25, 2025

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
This PR is needed to improve the organization and clarity of the movement package's IO functionality by:

  1. Separating loading and saving functions into dedicated modules
  2. Making the function names more descriptive and consistent
  3. Providing a clear deprecation path for old function names

What does this PR do?

  1. Creates new modules:
    • movement/io/load_dataset.py - Contains all loading functions
    • movement/io/save_dataset.py - Contains all saving functions
  2. Updates existing modules:
    • movement/io/load_poses.py - Adds deprecation warnings
    • movement/io/save_poses.py - Adds deprecation warnings
    • movement/io/__init__.py - Handles both old and new functions
  3. Updates example files:
    • examples/load_and_explore_poses.py
    • examples/convert_file_formats.py
  4. Updates documentation in docs/source/user_guide/input_output.md

References

Please reference any existing issues/PRs that relate to this PR.

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.
The changes have been tested by:

  1. Verifying that all new functions exist and are callable
  2. Confirming that old functions raise appropriate deprecation warnings
  3. Testing that old functions correctly forward to new functions
  4. Running example files to ensure they work with new function names
  5. Checking that documentation is accurate and up-to-date

Is this a breaking change?

If this PR breaks any existing functionality, please explain how and why.
No, this is not a breaking change. The PR:

  1. Maintains backward compatibility through deprecation warnings
  2. Keeps old function names working while encouraging use of new ones
  3. Provides clear guidance on migration to new function names

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the
documentation has been updated.
Yes, the documentation has been updated in docs/source/user_guide/input_output.md to:

  1. Document the new function names and modules
  2. Explain the deprecation of old function names
  3. Provide examples using the new function names
  4. Include a migration guide for users

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Closes: #199

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
9.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider renaming load_poses and save_poses to load_dataset and save_dataset

1 participant