Tests for restart checking analysis#1069
Open
TeachMeTW wants to merge 1 commit intoe-mission:masterfrom
Open
Conversation
introduces a new test suite, `TestRestartChecking`, which includes unit tests for the `ongoing_motion_in_loc_df` and `tracking_restarted_in_loc_df` functions. The tests cover various scenarios, including empty dataframes, motion timestamps relative to location points, and real example data with transitions. The tests ensure the correctness of the restart checking logic in the analysis module.
JGreenlee
reviewed
May 13, 2025
Member
There was a problem hiding this comment.
I think this should be under analysisTests.intakeTests
a2a9a44 to
e50e9f3
Compare
cd45974 to
30c4273
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unit tests for the restart detection functionality in restart_checking.py to document and validate how np.searchsorted maps timestamps between different data streams.
Changes
Testing
Ran and passed. Test output includes detailed logging of how timestamps map to indices, providing clear examples:
Restart timestamp 1673851361.154 maps to location index 29 with ts 1673916151.673see:
e-mission/e-mission-docs#1105 (comment)