neuroinformatics-unit / movement

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

Add bbox centroid fix #303

Closed sfmig closed 2 weeks ago

sfmig commented 2 weeks ago

Description

What is this PR

Why is this PR needed? When loading bboxes datasets from a VIA tracks file, we stored the coordinates of the top-left corner of each bbox in the dataset. This is inconsistent with the current description in the docs (which always refer to the centroid of the bboxes), and also somewhat inconsistent with the rest of the tools we support.

Fixes #302

What does this PR do?

Opinions on the tests are particularly welcome. I aimed to reduce the circularity but not sure if there is a better way.

How has this PR been tested?

Tests pass locally and in CI.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No, but docstrings of the relevant private functions have been updated.

Checklist:

codecov[bot] commented 2 weeks ago

Codecov Report

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

Project coverage is 99.77%. Comparing base (f4f46df) to head (8bdf271). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #303 +/- ## ======================================= Coverage 99.77% 99.77% ======================================= Files 14 14 Lines 883 884 +1 ======================================= + Hits 881 882 +1 Misses 2 2 ```

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

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud