Parse duration-string TestTime/StepTime columns to seconds#4
Open
simontaurus wants to merge 1 commit into
Open
Parse duration-string TestTime/StepTime columns to seconds#4simontaurus wants to merge 1 commit into
simontaurus wants to merge 1 commit into
Conversation
Maccor Export 1 and MIMS Client 2 text exports report TestTime/StepTime as duration strings (Nd HH:MM:SS[,ff]) instead of seconds, leaving those columns non-numeric. Add parse_duration_to_seconds and apply it to TestTime/StepTime when they are non-numeric, so every text format yields numeric seconds. Add a unit test for the helper and an integration test over trimmed Export 1 and MIMS Client 2 sample files (a few complete cycles each).
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.
Problem
Maccor Export 1andMIMS Client 2exportTestTime/StepTimeas durationstrings (
Nd HH:MM:SS[,ff], decimal comma possible) instead of seconds, so thosecolumns come back non-numeric. The other text formats already provide seconds.
Fix
maccor_utility.helper_functions.parse_duration_to_seconds(numeric inputspass through; unrecognised values become NaN).
MaccorDataTxtFile.read, apply it to theTestTime/StepTimecolumns whenthey are non-numeric.
Tests
complete cycles each, under
tests/data/):TestTimeis numeric, NaN-free,and monotonically non-decreasing.