Skip to content

handle empty team data#66

Open
mborrus wants to merge 2 commits intodcstats:2.1.3from
mborrus:fix/handle-empty-team-map
Open

handle empty team data#66
mborrus wants to merge 2 commits intodcstats:2.1.3from
mborrus:fix/handle-empty-team-map

Conversation

@mborrus
Copy link
Copy Markdown

@mborrus mborrus commented Feb 28, 2026

each year, there is new team data which relies on static csvs.

This pr allows for a fallback catch if the data hasn't been updated under the idea that most teams and conferences don't change YOY.

I also added the script I used to scrape the 2026 data since 2027 is just around the corner. Feel free to drop that if you don't want your repo clogged up.

Changes this year:

East Texas A&M -> Texas A&M-Commerce 
Saint Francis  -> St. Francis (PA)   
New Haven      -> (new to D1)    (Rah rah rah, new haven mentioned)

And 3 teams dropped: Lindenwood, Queens University, Southern Indiana.

Finally, added 2 new tests for this.

Let me know if you prefer to handle these issues yourself and would prefer me to just file an issue in the future.

When _get_id_from_team or _get_teams_from_conference are called with a
season that has no data in the team map (e.g. 2026 before ESPN publishes
it), process.extractOne returns None on an empty choices list. Unpacking
None raises a cryptic TypeError.

Now raises a clear ValueError with the requested season and available
seasons listed, for both team and conference lookup paths.
@mborrus
Copy link
Copy Markdown
Author

mborrus commented Feb 28, 2026

I also have a few runtime bugs that I fixed locally, let me know if you want a PR for those or prefer the fewer changes the better.

@dcstats
Copy link
Copy Markdown
Owner

dcstats commented Mar 17, 2026

@mborrus yes you can do a PR that I can review for those other bugs! I've been busy so I'm just now getting around to this, hoping to have a new version out in the next few days.

@dcstats dcstats self-assigned this Mar 17, 2026
@dcstats dcstats added this to the v2.1.3 milestone Mar 17, 2026
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.

2 participants