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 bboxes sample data #231

Closed sfmig closed 2 days ago

sfmig commented 1 week ago

Description

What is this PR

Why is this PR needed? We are adding a bounding boxes dataset and we need sample data to test it.

In the GIN repository for the test data, I added a sample VIA tracks file and updated the metadata file. To distinguish between pose and bounding boxes data, I added a type field in the metadata.yaml file.

This PR adapts the code to take that into account.

What does this PR do? Adapts the sample_data module to load the sample bounding boxes file.

The data is not loaded yet as a dataset, since that is the focus of PR #229. As a result, that bit is not fully tested (yet), and codecov shows fail.

References

\

How has this PR been tested?

Tests pass locally and in CI.

Is this a breaking change?

We should be able to load old versions of the sample data, but I am not sure that is actually a functionality we want to support. Tests wouldn't pass with the old metadata file though (because we check the keys are the expected ones, which now include 'type').

Does this PR require an update to the documentation?

Yes, the CONTRIBUTING.md file has been updated.

Checklist:

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 99.70%. Comparing base (2e406e1) to head (aab31c3).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #231 +/- ## ======================================= Coverage 99.70% 99.70% ======================================= Files 12 12 Lines 678 681 +3 ======================================= + Hits 676 679 +3 Misses 2 2 ```

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

lochhh commented 2 days ago

I also had a go at refactoring fetch_dataset_paths and went ahead with replacing "pose"-related docstrings in sample_data.py with the more generic "data" as you've done with the var names.

sonarcloud[bot] commented 2 days ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

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

See analysis details on SonarCloud