Skip to content
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

Merged
merged 5 commits into from
Dec 26, 2023

Conversation

DriesDeprest
Copy link
Contributor

Follow-up on #243

) in event_formation_change_info.items():
generic_event_args.update(
{
"event_id": None,
Copy link
Contributor

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 (
Copy link
Contributor

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}")
Copy link
Contributor

@koenvo koenvo Dec 8, 2023

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.

Copy link
Collaborator

@JanVanHaaren JanVanHaaren left a 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!

@koenvo
Copy link
Contributor

koenvo commented Dec 13, 2023

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.

@koenvo koenvo merged commit 789f34b into PySport:master Dec 26, 2023
19 checks passed
@koenvo koenvo added this to the 3.14 - Pi milestone Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants