Replace pyomeca dependency with custom Pyomarkers class#66
Conversation
Co-authored-by: EveCharbie <50926485+EveCharbie@users.noreply.github.com>
| Whether labels should be displayed | ||
| """ | ||
|
|
||
| def __init__( |
There was a problem hiding this comment.
Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
| Whether labels should be displayed | ||
| """ | ||
|
|
||
| def __init__( |
There was a problem hiding this comment.
Function __init__ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
…ample updates Co-authored-by: EveCharbie <50926485+EveCharbie@users.noreply.github.com>
Co-authored-by: EveCharbie <50926485+EveCharbie@users.noreply.github.com>
|
Function init has 7 arguments (exceeds 4 allowed). Consider refactoring. New |
❌ 1 blocking issue (1 total)
|
|
Code Climate has analyzed commit 46d092e and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
This PR implements a complete replacement for the pyomeca dependency by creating a custom
Pyomarkersclass that provides full API compatibility while being self-contained.Summary
The pyomeca package was the only external dependency used for marker data handling. This PR removes that dependency by implementing our own
Pyomarkersclass with all the required functionality.Changes Made
✅ New Pyomarkers Class (
pyorerun/pyomarkers.py)marker_namesandchannelsparameters for compatibilityfrom_c3d()classmethod using ezc3d for direct C3D file importshow_labelsflag to control marker label visibility.shapeproperty.to_numpy()method.channel.valuesfor marker names.attrsdictionary for metadatamarkers /= 1000)✅ Updated Imports
pyorerun/rrc3d.pypyorerun/phase_rerun.pypyorerun/xp_components/markers.pypyorerun/multi_phase_rerun.pytests/test_rerun_c3d.pytests/test_phase_rerun.pyexamples/biorbd/✅ Dependency Cleanup
pyomecafrompyproject.tomlandsetup.pyezc3das direct dependency (now needed for C3D loading)✅ Tests
tests/test_pyomarkers.pyExample Usage
Verification
All existing functionality continues to work exactly as before:
rrc3d()PhaseRerun.add_xp_markers()The implementation maintains 100% backward compatibility while removing the external dependency.
Fixes #65.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
This change is