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

Add a ValidVIAtracksCSV class (2/4) #219

Merged
merged 21 commits into from
Jul 22, 2024
Merged

Add a ValidVIAtracksCSV class (2/4) #219

merged 21 commits into from
Jul 22, 2024

Conversation

sfmig
Copy link
Contributor

@sfmig sfmig commented Jun 13, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

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:

  • a unique frame number must be associated with each image file,
  • the csv file must contain tracked and rectangular bounding boxes,
  • the bounding boxes IDs are unique per frame.

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:

  • 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 Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.74%. Comparing base (4830fd5) to head (8c8beea).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   99.71%   99.74%   +0.02%     
==========================================
  Files          13       13              
  Lines         714      771      +57     
==========================================
+ Hits          712      769      +57     
  Misses          2        2              

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

@sfmig sfmig force-pushed the smg/validator-via-file branch from d9b11c7 to eb2b836 Compare June 18, 2024 15:36
@sfmig sfmig marked this pull request as ready for review June 18, 2024 17:01
Copy link

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

@sfmig sfmig requested a review from niksirbi June 18, 2024 17:33
@sfmig sfmig changed the title Add a ValidVIAtracksCSV class Add a ValidVIAtracksCSV class (2/4) Jun 20, 2024
@sfmig sfmig mentioned this pull request Jun 21, 2024
7 tasks
Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

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

WoW, what a titanic effort to define all those valdations and fixtures. But now you can be sure your parsing is tightly secure :)

Nothing substantial to comment here, other than the (now obvious) need for a fixture refactor, which you've mentioned yourself

docs/source/api_index.rst Outdated Show resolved Hide resolved
movement/validators/files.py Outdated Show resolved Hide resolved
movement/validators/files.py Outdated Show resolved Hide resolved
movement/validators/files.py Outdated Show resolved Hide resolved
movement/validators/files.py Outdated Show resolved Hide resolved
movement/validators/files.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
@sfmig sfmig force-pushed the smg/validator-via-file branch from be7a384 to 24fbf3d Compare July 22, 2024 10:29
@sfmig sfmig force-pushed the smg/validator-via-file branch from 6ba5bca to be1c989 Compare July 22, 2024 10:46
Copy link

@sfmig sfmig added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit 242f532 Jul 22, 2024
15 checks passed
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.

2 participants