-
Notifications
You must be signed in to change notification settings - Fork 10
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
Adapt move accessor to bboxes datasets #255
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #255 +/- ##
=======================================
Coverage 99.76% 99.76%
=======================================
Files 14 14
Lines 854 866 +12
=======================================
+ Hits 852 864 +12
Misses 2 2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aef5267
to
3c72e6a
Compare
thanks @lochhh! for the great points and the extra commits, super helpful 🚀 For the tests with invalid datasets that have missing dimensions / data variables, I followed your suggestion and removed the whole-string comparison - online people agreed this is best practice as it is less brittle 🌟 However, I kept the whole-string comparison for the list of missing dimensions (or data vars). This is because in the test we don't want to check if a subset of the missing dimensions is reported in the error message. Instead we want to check the full list of missing dimensions (or data vars) is exactly as expected. The easiest way is to print the list of missing dimensions in a reproducible manner, so I kept the Let me know if you think differently - if all good I am happy to merge |
3acb001
to
534157b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @sfmig for addressing all comments!
Just made a couple more changes:
- updated docstrings in move_accessor
- removed the wrappers around
ds.rename
andds.drop_vars
inconftest.py
, in preference to the more familiar, one-liner xarray syntax
Think we are good to go 🚀
This reverts commit fab0bc6.
4bfb237
to
f8ce80b
Compare
Quality Gate passedIssues Measures |
thanks @lochhh for the edits! always eagle-eyed 🚀 ✨ 👏 |
Description
What is this PR
Why is this PR needed?
This PR extends the
move.validate()
method to bounding boxes dataset.What does this PR do?
validate
method of themove
accessor to consider a bounding boxes dataset.move
accessor to cover the cases with bounding boxes dataset. To do so:invalid_poses_dataset
fixture into separate fixtures. This allows us to reusue fixtures that are valid for both types of datasets (e.g.,empty_dataset
).move.validate()
method.I am not sure I fully understand the move accessor so feel free to suggest better implementations!
References
This came up while working on #246 - we missed the move accessor bits while implementing the bounding boxes dataset.
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?
No.
Checklist: