Skip to content

Commit

Permalink
build!: release 0.5.0
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Introducing new dependency and build. Python requirement changes from {3.8, 3.9, 3.10} to {3.10, 3.11, 3.12}, other dependencies are updated (notably introducing numpy v2)
  • Loading branch information
draabe authored Sep 10, 2024
2 parents aed684a + 411f5de commit 21305a6
Show file tree
Hide file tree
Showing 29 changed files with 2,497 additions and 751 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.9, '3.10']
poetry-version: [1.1.11]
python-version: ['3.10', '3.11', '3.12']
poetry-version: [1.8.3]

env:
MPLBACKEND: Agg # https://github.com/microsoft/azure-pipelines-tasks/issues/16426
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- name: Check out source repository
uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: "3.8"
python-version: "3.10"

- name: flake8 Lint
uses: py-actions/flake8@v1
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 24.8.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
rev: 7.1.1
hooks:
- id: flake8
args: [--max-line-length=88]
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.20.0
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
34 changes: 22 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Changelog

## 0.4.0 (2023-02-03)
## 0.5.0 (2024-09-10)

#### New Features

* parser skillcorner open dataset ([#143](https://github.com/floodlight-sports/floodlight/issues/143))
* add IDSSE dataset ([#147](https://github.com/floodlight-sports/floodlight/issues/147))
* add delimiter option ([#149](https://github.com/floodlight-sports/floodlight/issues/149))
* add discretized voronoi model ([#124](https://github.com/floodlight-sports/floodlight/issues/124))
* add parser for metadata and teamsheets in json format ([#113](https://github.com/floodlight-sports/floodlight/issues/113))
* integrate teamsheet logic to tracab parser ([#112](https://github.com/floodlight-sports/floodlight/issues/112))
Expand Down Expand Up @@ -33,6 +36,11 @@
* streamline IO function names ([#115](https://github.com/floodlight-sports/floodlight/issues/115))
#### Docs

* update readme
* update and fix docs
* fix poetry install command ([#133](https://github.com/floodlight-sports/floodlight/issues/133))
* update changelog
* update docs build
* fix butterworth cutoff freq doc ([#94](https://github.com/floodlight-sports/floodlight/issues/94))
* update tutorial matchsheets ([#95](https://github.com/floodlight-sports/floodlight/issues/95))
* update changelog
Expand All @@ -43,6 +51,8 @@
* add paper reference
#### Others

* refresh package build ([#148](https://github.com/floodlight-sports/floodlight/issues/148))
* bump version
* bump version
* add dependency pytest-cov
* add dependency coverage
Expand All @@ -54,7 +64,7 @@
* update module init
* update columns in tests

Full set of changes: [`0.3.1...0.4.0`](https://github.com/floodlight-sports/floodlight/compare/0.3.1...0.4.0)
Full set of changes: [`0.3.1...0.5.0`](https://github.com/floodlight-sports/floodlight/compare/0.3.1...0.5.0)

## 0.3.1 (2022-06-06)

Expand Down Expand Up @@ -112,17 +122,13 @@ Full set of changes: [`0.3.0...0.3.1`](https://github.com/floodlight-sports/floo
#### New Features

* add butterworth and savgol lowpass filter ([#51](https://github.com/floodlight-sports/floodlight/issues/51))
* add data transformation for eigd dataset
* add statsperform parser - standard format ([#41](https://github.com/floodlight-sports/floodlight/issues/41))
* add statsbomb open data parser and dataset ([#59](https://github.com/floodlight-sports/floodlight/issues/59))
* adds xy plotting methods with tests and docs ([#61](https://github.com/floodlight-sports/floodlight/issues/61))
* add pitch.plot method for football and handball ([#44](https://github.com/floodlight-sports/floodlight/issues/44))
* add vis module
* add slice and get_event_stream methods ([#60](https://github.com/floodlight-sports/floodlight/issues/60))
* add metabolic power model ([#48](https://github.com/floodlight-sports/floodlight/issues/48))
* add require_fit decorator
* add kinematics module - distance, velocity, acceleration models ([#45](https://github.com/floodlight-sports/floodlight/issues/45))
* create io eigd dataset ([#55](https://github.com/floodlight-sports/floodlight/issues/55))
* add is_fitted property
* add centroid-based model and measures
* add base-, team-, and dyadic properties
Expand All @@ -134,6 +140,10 @@ Full set of changes: [`0.3.0...0.3.1`](https://github.com/floodlight-sports/floo
* add comparison dunder methods
* add models module
* add playerproperty class
* add data transformation for eigd dataset
* add statsperform parser - standard format ([#41](https://github.com/floodlight-sports/floodlight/issues/41))
* add statsbomb open data parser and dataset ([#59](https://github.com/floodlight-sports/floodlight/issues/59))
* create io eigd dataset ([#55](https://github.com/floodlight-sports/floodlight/issues/55))
#### Fixes

* broken link
Expand All @@ -144,29 +154,29 @@ Full set of changes: [`0.3.0...0.3.1`](https://github.com/floodlight-sports/floo
* broken link
* dfl events parser warnings, statsperform xID ([#66](https://github.com/floodlight-sports/floodlight/issues/66))
* minor fixes ([#65](https://github.com/floodlight-sports/floodlight/issues/65))
* typo
* typo
* xID indexing for dfl parser
* xID indexing for tracab parser
* extracting of zip with temorary file ([#58](https://github.com/floodlight-sports/floodlight/issues/58))
* typo
* typo
* dfl parser xml element access and memory release ([#52](https://github.com/floodlight-sports/floodlight/issues/52))
#### Refactorings

* refactor get and convert as general function
* sample_data.py -> ToyDataset() ([#57](https://github.com/floodlight-sports/floodlight/issues/57))
* change axis arguments from {0, 1} to {'x', 'y'}
* colum checks return empty lists instead of None
* sample_data.py -> ToyDataset() ([#57](https://github.com/floodlight-sports/floodlight/issues/57))
#### Docs

* update changelog
* add core module reference page
* add transforms module reference page
* add models module referene page
* add vis submodule
* add property module reference
* add io module reference page
* correct xID indexing documentation
* include datasets in docs
* add property module reference
#### Others

* release 0.3.0
Expand All @@ -180,8 +190,6 @@ Full set of changes: [`0.3.0...0.3.1`](https://github.com/floodlight-sports/floo
* update templates
* explicitly loop through players
* docstrings and errors
* add tests for dataset templates
* add test for eigd transform
* add tests for geometry model
* add test for require fit decorator
* add tests for base model
Expand All @@ -191,6 +199,8 @@ Full set of changes: [`0.3.0...0.3.1`](https://github.com/floodlight-sports/floo
* add tests for is_metrical property
* add tests for find_sequences method
* add tests for dunder methods
* add tests for dataset templates
* add test for eigd transform

Full set of changes: [`0.2.1...0.3.0`](https://github.com/floodlight-sports/floodlight/compare/0.2.1...0.3.0)

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ and if you want to add more just open an issue!
- Tracking data
- Event data
- Pitch information
- Teamsheets with player information (*new*)
- Teamsheets with player information
- Codes such as ball possession information
- Properties such as distances or advanced computations

Expand All @@ -110,14 +110,16 @@ and if you want to add more just open an issue!
- **DFL/STS**: Tracking data, Event data, Teamsheets, Codes
- **Kinexon**: Tracking data
- **Opta**: Event data (F24 feeds)
- **Second Spectrum**: Tracking data, Event data (*new*)
- **Sportradar**: Event data (*new*)
- **Second Spectrum**: Tracking data, Event data
- **Skillcorner**: Tracking data from the Skillcorner Open Dataset (*new*)
- **Sportradar**: Event data
- **StatsPerform**: Tracking data, Event data (with URL access)
- **StatsBomb**: Event data

#### Datasets

- EIGD-H (Handball tracking data)
- IDSSE (Football tracking and event data) (*new*)
- StatsBomb OpenData (Football event data)

#### Manipulation and Plotting
Expand All @@ -133,7 +135,7 @@ and if you want to add more just open an issue!
- Centroids
- Distances, Velocities & Accelerations
- Metabolic Power & Equivalent Distances
- Voronoi Space Control (*new*)
- Voronoi Space Control

### Installation

Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==4.2.0
sphinx-rtd-theme==1.0.0
sphinx-autodoc-typehints==1.12.0
sphinx==7.4.7
sphinx-rtd-theme==2.0.0
sphinx-autodoc-typehints==2.3.0
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
import os
import sys

from floodlight import __version__

# -- Path setup --------------------------------------------------------------
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("../.."))

import floodlight # noqa: 402


# -- Project information -----------------------------------------------------
project = "floodlight"
version = floodlight.__version__
year = datetime.datetime.now().year
author = "Dominik Raabe"
copyright = f"{year}, {author}"

release = f"{__version__}"
release = f"v{version}"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/guides/contrib_manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Poetry requires a system-wide installation that's different on Windows and MacOS

.. code-block:: shell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py -UseBasicParsing).Content | python -
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
3. The installer will tell you the path of the installed executable. Add the path to your system ``PATH`` if that's not done automatically.
Expand Down
10 changes: 10 additions & 0 deletions docs/source/modules/io/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Collection of file parsing functionalities for different data providers as well
kinexon
opta
secondspectrum
skillcorner
sportradar
statsbomb
statsperform
Expand All @@ -27,6 +28,7 @@ Collection of file parsing functionalities for different data providers as well
:nosignatures:

EIGDDataset
IDSSEDataset
StatsBombOpenDataset
ToyDataset

Expand Down Expand Up @@ -71,6 +73,14 @@ Collection of file parsing functionalities for different data providers as well
read_event_data_jsonl
read_teamsheets_from_meta_json

.. rubric:: Skillcorner

.. currentmodule:: floodlight.io.skillcorner
.. autosummary::
:nosignatures:

read_position_data_json

.. rubric:: Sportradar

.. currentmodule:: floodlight.io.sportradar
Expand Down
6 changes: 6 additions & 0 deletions docs/source/modules/io/skillcorner.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=========================
floodlight.io.skillcorner
=========================

.. automodule:: floodlight.io.skillcorner
:members:
6 changes: 3 additions & 3 deletions docs/source/modules/utils/types.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===================
floodlight.io.types
===================
======================
floodlight.utils.types
======================

floodlight specific typing objects

Expand Down
2 changes: 1 addition & 1 deletion floodlight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"XY",
]

__version__ = "0.4.0"
__version__ = "0.5.0"

__doc__ = """
A high-level, data-driven sports analytics framework
Expand Down
6 changes: 3 additions & 3 deletions floodlight/core/xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def translate(self, shift: Tuple[Numeric, Numeric]):
it previously has a non-floating dtype.
"""
# cast to float
if self.xy.dtype not in [np.float_, np.float64, np.float32, float]:
if self.xy.dtype not in [np.float64, np.float32, float]:
self.xy = self.xy.astype(np.float32, copy=False)

self.x = np.round(self.x + shift[0], 3)
Expand All @@ -162,7 +162,7 @@ def scale(self, factor: float, axis: str = None):
it previously has a non-floating dtype.
"""
# cast to float
if self.xy.dtype not in [np.float_, np.float64, np.float32, float]:
if self.xy.dtype not in [np.float64, np.float32, float]:
self.xy = self.xy.astype(np.float32, copy=False)

if axis is None:
Expand Down Expand Up @@ -210,7 +210,7 @@ def rotate(self, alpha: float):
f"Expected alpha to be from -360 to 360, got {alpha} instead"
)
# cast to float
if self.xy.dtype not in [np.float_, np.float64, np.float32, float]:
if self.xy.dtype not in [np.float64, np.float32, float]:
self.xy = self.xy.astype(np.float32, copy=False)

# construct rotation matrix
Expand Down
Loading

0 comments on commit 21305a6

Please sign in to comment.