-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add artificial formation change event in Wyscout deserializer #250
Add artificial formation change event in Wyscout deserializer #250
Conversation
) in event_formation_change_info.items(): | ||
generic_event_args.update( | ||
{ | ||
"event_id": None, |
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.
It would be good to give this event an id. I checked the Metrica implementation which also creates synthetic events and it seems it's reusing the original event id.
The eventIds should be unique over a match. Maybe you can add a prefix to the original eventId and use that one?
And would be good to use the term 'synthetic' instead of 'artificial'.
@@ -56,6 +56,10 @@ def test_correct_v3_deserialization(self, event_v3_data: Path): | |||
) | |||
assert dataset.events[9].event_type == EventType.CLEARANCE | |||
assert dataset.events[12].event_type == EventType.INTERCEPTION | |||
assert ( |
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.
Great!
event["opponentTeam"]["formation"] | ||
] | ||
else: | ||
raise DeserializationError(f"Unknown team_id {team.team_id}") |
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.
Great to see you used this existing exception.
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 pull request looks good to me. Thanks!
Thanks! I merged all aproved PR's so far. This caused a merge conflict in this PR. Can you please merge master in this branch? When the conflict is resolved I'll merge it. |
Follow-up on #243