diff --git a/kloppy/infra/serializers/event/wyscout/deserializer_v2.py b/kloppy/infra/serializers/event/wyscout/deserializer_v2.py index 26cfb1fe..2ef37b64 100644 --- a/kloppy/infra/serializers/event/wyscout/deserializer_v2.py +++ b/kloppy/infra/serializers/event/wyscout/deserializer_v2.py @@ -712,7 +712,7 @@ def deserialize(self, inputs: WyscoutInputs) -> EventDataset: pitch_dimensions=transformer.get_to_coordinate_system().pitch_dimensions, score=None, frame_rate=None, - orientation=Orientation.BALL_OWNING_TEAM, + orientation=Orientation.ACTION_EXECUTING_TEAM, flags=None, provider=Provider.WYSCOUT, coordinate_system=transformer.get_to_coordinate_system(), diff --git a/kloppy/infra/serializers/event/wyscout/deserializer_v3.py b/kloppy/infra/serializers/event/wyscout/deserializer_v3.py index 54bfb1fb..a19ce11a 100644 --- a/kloppy/infra/serializers/event/wyscout/deserializer_v3.py +++ b/kloppy/infra/serializers/event/wyscout/deserializer_v3.py @@ -684,7 +684,7 @@ def deserialize(self, inputs: WyscoutInputs) -> EventDataset: pitch_dimensions=transformer.get_to_coordinate_system().pitch_dimensions, score=None, frame_rate=None, - orientation=Orientation.BALL_OWNING_TEAM, + orientation=Orientation.ACTION_EXECUTING_TEAM, flags=None, provider=Provider.WYSCOUT, coordinate_system=transformer.get_to_coordinate_system(), diff --git a/kloppy/tests/test_wyscout.py b/kloppy/tests/test_wyscout.py index c1d0f42b..3cd6b516 100644 --- a/kloppy/tests/test_wyscout.py +++ b/kloppy/tests/test_wyscout.py @@ -16,6 +16,7 @@ GoalkeeperActionType, CardQualifier, CardType, + Orientation, ) from kloppy import wyscout @@ -52,6 +53,9 @@ def dataset(self, event_v2_data) -> EventDataset: data_version="V2", ) assert dataset.dataset_type == DatasetType.EVENT + assert ( + dataset.metadata.orientation == Orientation.ACTION_EXECUTING_TEAM + ) return dataset def test_shot_event(self, dataset: EventDataset): @@ -130,6 +134,9 @@ def dataset(self, event_v3_data: Path) -> EventDataset: data_version="V3", ) assert dataset.dataset_type == DatasetType.EVENT + assert ( + dataset.metadata.orientation == Orientation.ACTION_EXECUTING_TEAM + ) return dataset def test_coordinates(self, dataset: EventDataset):