Skip to content

v1.11.3#592

Merged
rsforbes merged 14 commits intoswar:masterfrom
rsforbes:feature/retire-boxscoreplayertrackv2
Nov 14, 2025
Merged

v1.11.3#592
rsforbes merged 14 commits intoswar:masterfrom
rsforbes:feature/retire-boxscoreplayertrackv2

Conversation

@rsforbes
Copy link
Copy Markdown
Contributor

The NBA API no longer supports BoxScorePlayerTrackV2 and returns HTTP 500 errors. Users should use BoxScorePlayerTrackV3 instead.

Removed:

  • src/nba_api/stats/endpoints/boxscoreplayertrackv2.py (endpoint class)
  • docs/nba_api/stats/endpoints/boxscoreplayertrackv2.md (documentation)
  • docs/nba_api/stats/endpoints_output/boxscoreplayertrackv2_output.md (examples)
  • Import from src/nba_api/stats/endpoints/init.py
  • Reference from docs/table_of_contents.md
  • Deferred endpoint from tests/integration/deferred_endpoints.py
  • Mapping from tools/stats/library/mapping.py
  • Entry from docs/examples/Basics.ipynb endpoint list
  • analysis_archive/stats/analysis.json (archive file)

The NBA API no longer supports this endpoint and returns HTTP 500 errors.
Users should use BoxScorePlayerTrackV3 instead.

Removed:
- src/nba_api/stats/endpoints/boxscoreplayertrackv2.py (endpoint class)
- docs/nba_api/stats/endpoints/boxscoreplayertrackv2.md (documentation)
- docs/nba_api/stats/endpoints_output/boxscoreplayertrackv2_output.md (examples)
- Import from src/nba_api/stats/endpoints/__init__.py
- Reference from docs/table_of_contents.md
- Deferred endpoint from tests/integration/deferred_endpoints.py
- Mapping from tools/stats/library/mapping.py
- Entry from docs/examples/Basics.ipynb endpoint list
- analysis_archive/stats/analysis.json (archive file)
…war#562)

- Remove BoxScorePlayerTrackV2 endpoint (NBA API returns HTTP 500)
- Fix LeagueIDNullable default value to prevent empty responses
- NBA API now requires explicit LeagueID instead of empty string
- Bump version to 1.11.3
@rsforbes rsforbes linked an issue Nov 13, 2025 that may be closed by this pull request
- Remove PlayerFantasyProfile endpoint class and all references
- Remove documentation and test references
- Update endpoint mappings and analysis tools
- Endpoint removed due to NBA.com API discontinuation
- Use .get() with default empty dataset for Coaches
- NBA API sometimes omits Coaches dataset
- Returns empty dataset with proper headers when missing
- Add comprehensive unit tests for CommonTeamRoster endpoint
- Test coverage includes missing dataset scenario
)

- Added PLAYER_SLUG and TEAM_SLUG to expected_data in CommonAllPlayers endpoint
- These fields are returned by the NBA API but were previously not included
- Updated CHANGELOG.MD with fix details and note about POSITION field limitation
- Fixed typo in CONTRIBUTING.md (activate -> eval \$(poetry env activate))

Closes swar#550
@rsforbes rsforbes linked an issue Nov 13, 2025 that may be closed by this pull request
- Added PlayerFantasyProfile to v1.11.3 Removed section
- Endpoint was removed in commit 0b6a694 but not documented in changelog
- Added missing GAME_ID field to CareerHighs expected_data
- Fixed field name from STATS_VALUE to STAT_VALUE (singular)
- Updated CHANGELOG.MD with fix details and clarification

Note: Investigation confirmed that CareerHighs correctly returns regular
season career highs (not playoff highs). All game IDs have "002" prefix
indicating regular season games.

Closes swar#536
- Changed city from "Golden State" to "San Francisco" in static teams data
- Updated both data.py and template.py
- Team name remains "Golden State Warriors" (unchanged)
- Updated data timestamp to Nov 13, 2025

Closes swar#434
…ar#448)

- Added comprehensive class docstring documenting NBA API bug with plus_minus='Y'
- Added runtime UserWarning when plus_minus='Y' is used
- Documented that plus_minus='Y' returns incorrect differential/delta values
- Provided example showing incorrect data (FGM=-0.3 instead of 39.3)
- Recommended workaround: use plus_minus='N' (default)
- Updated CHANGELOG.MD under "Changed" section

Note: This is an NBA.com API bug, not an nba_api issue. The warning helps
users avoid incorrect data by steering them away from the broken parameter.

Closes swar#448
Refactored the PlayByPlayV3 parser to eliminate fragile dynamic key
extraction and follow CLAUDE.md V3 parser best practices.

Changes:
- Replace dynamic key indexing with explicit field access
- Use defensive .get() calls with defaults throughout
- Define all 24 action fields explicitly in headers tuple
- Handle edge cases (missing meta, empty actions, missing fields)

Testing:
- Added 11 comprehensive unit tests covering all edge cases
- Created test fixtures for unit testing
- Verified with real API calls (475 plays processed successfully)
- All 448 unit tests pass

Fixes swar#443
…eFinder (swar#446)

The NBA Stats API ignores the game_id_nullable parameter and returns
unfiltered results. This fix addresses the issue by:

- Adding runtime UserWarning when game_id_nullable is used
- Documenting the limitation in module docstring with workaround examples
- Adding integration tests to verify API behavior
- Adding unit tests to verify warning emission

Users are now warned at runtime and directed to filter results client-side:
df[df['GAME_ID'] == 'game_id_value']

Also documents date_from_nullable/date_to_nullable work correctly (swar#526).
@rsforbes rsforbes changed the title v1.12.0 v1.11.3 Nov 13, 2025
…ion test validation

Restore endpoints:
- TeamGameLog and TeamGameLogs endpoints (retired in v1.11.0) are working again
- Both endpoints fully functional with all parameters
- Added comprehensive unit tests (6 for TeamGameLog, 6 for TeamGameLogs)
- Added integration tests (4 test cases for TeamGameLog, 5 for TeamGameLogs)
- Generated documentation files in docs/nba_api/stats/endpoints/

Enhanced integration test validation:
- Added dataset structure validation to prevent false retirements
- Validates dataset names match expected_data keys
- Validates column structure for each dataset
- Logs per-dataset row counts for better diagnostics
- Opt-in validation via validate_structure flag (default: False)
- Refactored validation logic to reduce code complexity

The enhanced validation catches:
- Missing datasets that should be present
- Column mismatches in expected_data definitions
- API response structure changes
- Empty datasets when data is expected

Root cause analysis:
- Endpoints were incorrectly retired Nov 2, 2025 based on GitHub issue
- Integration test framework was created Nov 5, 2025 (3 days later)
- No automated validation existed at time of retirement
- Enhanced validation prevents similar false retirements in the future

Files changed:
- src/nba_api/stats/endpoints/teamgamelog.py (restored)
- src/nba_api/stats/endpoints/teamgamelogs.py (restored)
- tests/unit/stats/endpoints/test_teamgamelog.py (12 unit tests)
- tests/integration/data/teamgamelog.py (4 test cases)
- tests/integration/data/teamgamelogs.py (5 test cases)
- tests/integration/test_endpoints.py (enhanced validation logic)
- tests/integration/data/README.md (documentation)
- docs/ (endpoint documentation)

Test results:
- All 37 integration tests passing
- All 460 unit tests passing
- All flake8 checks passing
@rsforbes rsforbes force-pushed the feature/retire-boxscoreplayertrackv2 branch from 9e71482 to 23df07e Compare November 14, 2025 13:23
@rsforbes rsforbes merged commit 0d01088 into swar:master Nov 14, 2025
4 checks passed
@rsforbes rsforbes deleted the feature/retire-boxscoreplayertrackv2 branch November 14, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment