neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
77 stars 7 forks source link

Rename pose_tracks to position #149

Closed niksirbi closed 3 months ago

niksirbi commented 3 months ago

Description

What is this PR

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:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lochhh commented 3 months ago

note: update poster examples

sonarcloud[bot] commented 3 months ago

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 commented 3 months ago

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