Skip to content

Conversation

@lochhh
Copy link
Member

@lochhh lochhh commented Nov 17, 2025

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Closes #241 #210

What does this PR do?

  • Reorganises the datasets validators to subclass from a _BaseValidDataset
  • Rewrites the relevant tests to reduce duplication - what have been tested in the parent class are not repeated in the subclasses
  • Enforces uniqueness in keypoint_names, individual_names supplied (in addition to length check)
  • Replaces hardcoded index numbers (e.g. fragile assumption that -1 refers to the individuals dim) by inferring based on DIM_NAMES

References

#241, #210 part of #667

How has this PR been tested?

Unit tests have been rewritten

Is this a breaking change?

No, one should still be able to use the Validators (i.e. ValidPosesDataset, ValidBboxesDataset) as before.

Does this PR require an update to the documentation?

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

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5413011) to head (6e9107d).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #706   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         2022      2083   +61     
=========================================
+ Hits          2022      2083   +61     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

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.

Refactor validators to reduce code duplication between bboxes and poses

2 participants