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

Add a ValidVIAtracksCSV class (2/4) #219

Open sfmig opened 2 weeks ago

sfmig commented 2 weeks ago

Rebase after #230 is merged.


Description

What is this PR

Why is this PR needed? We want to be able to load track bounding boxes annotations written in the VIA format.

What does this PR do? It adds a ValidVIAtracksCSV class that validates VIA output files.

The validator is a bit more strict in its checks than the currently existing ones. This is because when we later load the VIA file data into a bounding box class, we make assumptions about it that are not necessarily enforced in the annotator tool per se (e.g. having unique bounding boxes IDs per frame).

The checks are roughly:

The fixtures in conftest.py have increased quite a bit though, but I left that for a future PR (issue #222).

References

167

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?

I updated api_index.rst (but this won't be needed anymore soon! 🥳 #213)

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.72%. Comparing base (2e406e1) to head (0736d62).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #219 +/- ## ========================================== + Coverage 99.70% 99.72% +0.02% ========================================== Files 12 12 Lines 678 735 +57 ========================================== + Hits 676 733 +57 Misses 2 2 ```

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

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

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

See analysis details on SonarCloud