You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add one-command season bootstrap script for local database setup #59
Add a single operational script that prepares a local MLB Visualizer database for a season without requiring developers to remember multiple import commands.
Proposed command:
poetry run python scripts/bootstrap_season.py --season 2025
Motivation
Local setup currently requires separate commands for migrations, league ingestion, and player catalog ingestion. A bootstrap command would make it much easier to get a development database into a known usable state.
Proposed behavior
For the requested season, the script should:
Apply Alembic migrations.
Import the full league season using the existing league ingestion workflow.
Import the player catalog for that season.
Print a concise summary of what completed or failed.
The implementation should reuse the existing service-layer functions where possible rather than shelling out to the existing scripts.
Out of scope
Do not automatically import statistics for every individual player. The player catalog should be populated, while individual player-season statistics remain an explicit/on-demand import to avoid a large number of MLB API requests.
Acceptance criteria
New scripts/bootstrap_season.py entry point.
Supports --season <year>.
Runs database migrations before ingestion.
Performs league-wide season ingestion.
Imports the player catalog for the season.
Exits non-zero when a required bootstrap step fails.
Activity