-
Notifications
You must be signed in to change notification settings - Fork 11
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
Export SLEAP .h5 analysis files #88
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #88 +/- ##
==========================================
+ Coverage 98.37% 98.51% +0.13%
==========================================
Files 8 8
Lines 369 403 +34
==========================================
+ Hits 363 397 +34
Misses 6 6 ☔ 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.
0e9ade3
to
bf1ea3a
Compare
This reverts commit 6a6e44e.
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.
LGTM! I only left one comment, but I'm not even sure whether it's worth addressing. Up to you to merge when ready.
"SLEAP_three-mice_Aeon_mixed-labels.predictions.slp", | ||
], | ||
) | ||
def test_to_sleap_analysis_file_source_file(self, file, new_h5_file): |
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.
This test seems a bit over-parametrised to me.
Is it really necessary to test all of these cases? It doesn't hurt to be cautious I guess, but I'm a bit worried over the long-term impact on our test time (if we keep being so thorough).
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, good catch! I was just checking if it works in all cases. I've removed all but one test case per file type supported for each of DLC and SLEAP.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
What is this PR
Why is this PR needed?
This PR enables movement datasets to be exported as SLEAP-style .h5 files.
What does this PR do?
to_sleap_analysis_file
which converts an xarray pose tracks dataset (cleaned using_remove_unoccupied_tracks
) to a SLEAP-style .h5 analysis file, and the relevant documentation to the API docssave_poses.py
save_poses.py
as reusable functions.conftest.py
.References
This PR resolves #46.
How has this PR been tested?
Does this PR require an update to the documentation?
to_sleap_analysis_file
to API docsChecklist: