diff --git a/docs/changelog.md b/docs/changelog.md index c4e7572b..264a4838 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,10 @@ Find out all changes between different kloppy versions +## 2.2.2 (2021-11-10) + +- Don't break when wyscout doesn't include end position of shot/pass + ## 2.2.1 (2021-10-31) - Fix import load_second_spectrum_tracking_data diff --git a/kloppy/__init__.py b/kloppy/__init__.py index b3fa350d..bc5e809b 100644 --- a/kloppy/__init__.py +++ b/kloppy/__init__.py @@ -13,4 +13,4 @@ ) from .domain.services.state_builder import add_state -__version__ = "2.2.1" +__version__ = "2.2.2" diff --git a/kloppy/infra/serializers/event/wyscout/serializer.py b/kloppy/infra/serializers/event/wyscout/serializer.py index 671425ff..f7c5e090 100644 --- a/kloppy/infra/serializers/event/wyscout/serializer.py +++ b/kloppy/infra/serializers/event/wyscout/serializer.py @@ -120,7 +120,9 @@ def _parse_shot(raw_event: Dict, next_event: Dict) -> Dict: "result_coordinates": Point( x=float(raw_event["positions"][1]["x"]), y=float(raw_event["positions"][1]["y"]), - ) if len(raw_event['positions']) > 1 else None, + ) + if len(raw_event["positions"]) > 1 + else None, "qualifiers": qualifiers, } @@ -177,7 +179,9 @@ def _parse_pass(raw_event: Dict, next_event: Dict) -> Dict: "receiver_coordinates": Point( x=float(raw_event["positions"][1]["x"]), y=float(raw_event["positions"][1]["y"]), - ) if len(raw_event['positions']) > 1 else None + ) + if len(raw_event["positions"]) > 1 + else None, } diff --git a/mkdocs.yml b/mkdocs.yml index 23d478c0..a2831509 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: kloppy 2.2.1 +site_name: kloppy 2.2.2 site_url: https://kloppy.pysport.org repo_url: https://github.com/PySport/kloppy repo_name: 'GitHub'