Skip to content

improve: add supported options to deprecated loader errors#860

Open
dhruv1955 wants to merge 1 commit intoneuroinformatics-unit:mainfrom
dhruv1955:improve/deprecated-loader-error-messages
Open

improve: add supported options to deprecated loader errors#860
dhruv1955 wants to merge 1 commit intoneuroinformatics-unit:mainfrom
dhruv1955:improve/deprecated-loader-error-messages

Conversation

@dhruv1955
Copy link
Contributor

@dhruv1955 dhruv1955 commented Mar 1, 2026

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other (error-message UX improvement for deprecated loaders)

Why is this PR needed?

Deprecated loader wrappers (load_poses.from_file and load_bboxes.from_file) raised generic unsupported-source errors that did not tell users which values are valid. This made troubleshooting harder, especially when migrating to the unified loading API.

What does this PR do?

  • Improves unsupported source_software errors in:
    • movement.io.load_poses.from_file
    • movement.io.load_bboxes.from_file
  • New error text now includes:
    • the invalid value (quoted)
    • a "Supported options are: ..." list of valid values
  • Updates unit tests to verify:
    • "Unsupported source software" appears
    • "Supported options are:" appears
    • expected valid source names are included in the message

References

No linked issue for this PR.

How has this PR been tested?

  • Ran lint checks on modified files:
    • ruff check movement/io/load_poses.py movement/io/load_bboxes.py tests/test_unit/test_io/test_load_poses.py tests/test_unit/test_io/test_load_bboxes.py
    • Result: passed
  • Ran direct runtime checks for both updated error paths and confirmed expected message content.
  • Note: targeted pytest invocation is currently blocked in this environment by external sample-data download timeouts from GIN during tests/conftest.py session startup.

Is this a breaking change?

No.
This change only improves error messages and test assertions for deprecated wrapper functions. No functional behavior or API contract is changed.

Does this PR require an update to the documentation?

No.
No public API behavior changed beyond clearer error messaging.

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

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.

1 participant