-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fixing metrica epts loader #159
Fixing metrica epts loader #159
Conversation
jcnunezmoreno
commented
Oct 4, 2022
- Frame count name is load from xml file instead of use hardcoded value (Metrica EPTS loader doen't read the frameCount name from DataFormataSpecification #158)
- Including verification before indexing the sensor value to avoid crash (Metrica EPTS loader fails when sensor is defined but player channel doen't use this information #157)
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 for this PR!
Could you update a Metrica EPTS test so it will test this behavior? And one minor code improvement comment.
@@ -54,11 +54,11 @@ def _frame_from_row( | |||
|
|||
other_data = {} | |||
for sensor in other_sensors: | |||
player_sensor_field_str = f"player_{player.player_id}_{sensor.channels[0].channel_id}" | |||
player_sensor_val = None if player_sensor_field_str not in row else row[player_sensor_field_str] |
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.
player_sensor_val = row.get(player_sensor_field_str)
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.
Done!
Thanks you so much for the quick response. I've added a test now, and fixed the if statement. :) |
Sorry for the delay. Thanks for the changes! Looking good to me. Can you also run code formatting? |
Done! Thanks!! |