Scripts for processing MBTA performance data both from LAMP and from monthly historical files
- Python 3.12
- uv - Fast Python package manager
- Install:
curl -LsSf https://astral.sh/uv/install.sh | sh - Verify:
uv --version
- Install:
-
Install dependencies:
uv sync --group dev
-
Set up pre-commit hooks:
uv run pre-commit install
-
Configure AWS credentials (required for running locally):
- Add
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYto your shell environment, OR - Configure with awscli:
aws configure
- Add
Run tests with pytest:
uv run pytest mbta-performanceCheck code style with Ruff:
uv run ruff check mbta-performance
uv run ruff format mbta-performanceuv run python -m mbta-performance.chalicelib.lamp.ingestuv run python -m mbta-performance.chalicelib.lamp.backfill.mainuv run python -m mbta-performance.chalicelib.historic.backfill.main