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

Simplify and expand filtering tests for bboxes #267

Merged
merged 6 commits into from
Aug 16, 2024

Conversation

sfmig
Copy link
Contributor

@sfmig sfmig commented Aug 8, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
We want to ensure the filtering methods work for bboxes datasets.

What does this PR do?

  • Simplifies filtering tests
    • Combines median and savgol filters tests into a single test, to reduce code duplication
    • Make test for interpolation more compact
  • Expands tests to bboxes datasets.

References

Overflow from PR #246

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 reviewed the docstrings to check references to poses data but only did a minor change.

I changed some references from "filtering" to "smoothing" for consistency within the docstring, but open to other opinions.

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

@sfmig sfmig changed the title Extend filtering tests Simplify and expand filtering tests for bboxes Aug 8, 2024
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.77%. Comparing base (96c3cd7) to head (f556832).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #267   +/-   ##
=======================================
  Coverage   99.77%   99.77%           
=======================================
  Files          14       14           
  Lines         883      883           
=======================================
  Hits          881      881           
  Misses          2        2           

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

@sfmig sfmig marked this pull request as ready for review August 8, 2024 13:30
@sfmig sfmig requested a review from niksirbi August 8, 2024 13:30
@sfmig sfmig force-pushed the smg/extend-filtering-tests branch from a4fe242 to 93ec8da Compare August 8, 2024 13:36
@sfmig sfmig mentioned this pull request Aug 8, 2024
6 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.

I think there is an error in scaling the time-unit for frames vs seconds in the interpolation test, so pleas have another look at that.

Otherwise, I'm on-board with this refactoring 👍🏼

movement/filtering.py Show resolved Hide resolved
tests/test_unit/test_filtering.py Outdated Show resolved Hide resolved
tests/test_unit/test_filtering.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Aug 16, 2024

@sfmig sfmig requested a review from niksirbi August 16, 2024 18:19
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.

LGTM!

@niksirbi niksirbi added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit abeaff1 Aug 16, 2024
17 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