Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WNBA static data. #444

Merged
merged 7 commits into from
Jun 10, 2024
Merged

Add WNBA static data. #444

merged 7 commits into from
Jun 10, 2024

Conversation

cosmicac
Copy link
Contributor

@cosmicac cosmicac commented May 22, 2024

Tip

Review commit-by-commit!

This PR tackles adding static WNBA data, sparked by the discussion here (#439).

The general approach taken is to update the /tools/stats/static_players_update/update.py to also fetch and write WNBA players in addition to the existing NBA players. The WNBA teams data was manually populated, since I didn't see a corresponding workflow for teams. There's only 12 teams so this wasn't so bad.

I did have to introduce WnbaSeasonYear and WnbaSeason classes in order to get the CommonAllPlayers endpoint to work correctly when fetching WNBA data. The issue was that WNBA seasons are a single year (e.g "2024" instead of "2023-2024").

Also updated src/nba_api/stats/static/teams.py and src/nba_api/stats/static/players.py to support WNBA static data. I refactored these files slightly so that both the NBA and WNBA interfaces can use the same underlying functions.

Added to existing documentation. Didn't write too many tests other than the one unit test I could see that existed - LMK if I should write more.

There should be no breaking changes.

Please let me know how this looks! Happy to revise as necessary 🙏.

@cosmicac
Copy link
Contributor Author

@rsforbes - let me know how this looks, happy to adjust as necessary.

@rsforbes
Copy link
Collaborator

rsforbes commented Jun 8, 2024

@cosmicac - Will get this look at this weekend.

@rsforbes rsforbes merged commit 5ed2cb1 into swar:master Jun 10, 2024
4 checks passed
@rsforbes rsforbes linked an issue Oct 9, 2024 that may be closed by this pull request
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.

[Feature Request] WNBA players & teams in static data
2 participants