diff --git a/CHANGELOG.md b/CHANGELOG.md index bab3d4a..9a8833e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# nflreadpy devel + +- update load_participation() season assertions to use improved week-level logic. + +--- # nflreadpy v0.1.5 Release date: 2025-11-19 diff --git a/src/nflreadpy/load_participation.py b/src/nflreadpy/load_participation.py index 54771b0..b81fd20 100644 --- a/src/nflreadpy/load_participation.py +++ b/src/nflreadpy/load_participation.py @@ -3,7 +3,7 @@ import polars as pl from .downloader import get_downloader -from .utils_date import get_current_season +from .utils_date import get_current_season, get_current_week def load_participation(seasons: int | list[int] | bool | None = None) -> pl.DataFrame: @@ -27,8 +27,14 @@ def load_participation(seasons: int | list[int] | bool | None = None) -> pl.Data Data Dictionary: """ - # participation only available on a historical basis from FTN - max_season = get_current_season(roster=True) - 1 + # we expect to have participation data available after the final week of the + # season from FTN + current_week = get_current_week(use_date=False) + if current_week == 22: + max_season = get_current_season() + else: + max_season = get_current_season() - 1 + if seasons is None: seasons = [max_season] elif seasons is True: