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

Rename pose_tracks to position #149

Merged
merged 8 commits into from
Mar 25, 2024
Merged

Rename pose_tracks to position #149

merged 8 commits into from
Mar 25, 2024

Conversation

niksirbi
Copy link
Member

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

With the addition of kinematic data variables named displacement, velocity, acceleration etc., it's awkward to keep calling the variable containing poses pose_tracks. All of these variables are "tracks", in the sense that they are time-series.

What does this PR do?

It renames the xarray.DataArray previously known as pose_tracks to position. This is more consistent with the naming of the other variables. I also did some additional renaming in comments/docstrings and in a few variables/functions/class names, to ensure that they are consistent with the new terminology.

Note that in many places in the docs and in comments/docstrings I decided to keep using the term "pose tracks". But this usage refers to the overall type of the data - i.e. tracks of poses over time - not the particular variable/attribute. This should become clearer once we address #69.

References

Closes #100

How has this PR been tested?

This kind of change would be very painful without existing tests. Our nearly universal test coverage allowed me to catch the few instances I'd missed. I fixed them and the tests all pass now.

Does this PR require an update to the documentation?

Yes, and I went through the docs and updated all instances I (and my IDEs) could find.
I've also updated an image that contained the term pose_tracks as the name of the corresponding DataArray.

How to review

The diff of this PR will be impossible to review directly, as almost all files have been affected. Perhaps it's more critical to go over our public docs and double-check that the term is used consistently there.

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

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.28%. Comparing base (7455216) to head (58bc960).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #149   +/-   ##
=======================================
  Coverage   99.28%   99.28%           
=======================================
  Files           9        9           
  Lines         556      557    +1     
=======================================
+ Hits          552      553    +1     
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niksirbi niksirbi marked this pull request as ready for review March 19, 2024 20:04
@niksirbi niksirbi requested a review from lochhh March 19, 2024 20:04
@lochhh
Copy link
Collaborator

lochhh commented Mar 21, 2024

note: update poster examples

Copy link
Collaborator

@lochhh lochhh left a comment

Choose a reason for hiding this comment

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

LGTM and thanks @niksirbi! Made a couple of suggestions here and there but nothing major.

examples/load_and_explore_poses.py Outdated Show resolved Hide resolved
movement/filtering.py Outdated Show resolved Hide resolved
movement/io/save_poses.py Outdated Show resolved Hide resolved
movement/move_accessor.py Outdated Show resolved Hide resolved
tests/test_unit/test_filtering.py Outdated Show resolved Hide resolved
tests/test_unit/test_save_poses.py Outdated Show resolved Hide resolved
tests/test_unit/test_validators.py Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@niksirbi
Copy link
Member Author

Thanks for the very thorough review @lochhh! I've implemented your suggestions.

@niksirbi niksirbi merged commit 736eaaa into main Mar 25, 2024
27 checks passed
@niksirbi niksirbi deleted the rename-position branch March 25, 2024 13:04
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.

Rename 'pose_tracks' to 'position'
2 participants