Skip to content

transitmatters/mbta-performance

Repository files navigation

🏮 MBTA Performance Processing (LAMPLighter)

Scripts for processing MBTA performance data both from LAMP and from monthly historical files

Setup

Requirements

  • Python 3.12
  • uv - Fast Python package manager
    • Install: curl -LsSf https://astral.sh/uv/install.sh | sh
    • Verify: uv --version

Installation

  1. Install dependencies:

    uv sync --group dev
  2. Set up pre-commit hooks:

    uv run pre-commit install
  3. Configure AWS credentials (required for running locally):

    • Add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to your shell environment, OR
    • Configure with awscli: aws configure

Development

Testing

Run tests with pytest:

uv run pytest mbta-performance

Linting & Formatting

Check code style with Ruff:

uv run ruff check mbta-performance
uv run ruff format mbta-performance

Run Locally

Run today's LAMP ingest

uv run python -m mbta-performance.chalicelib.lamp.ingest

Backfill LAMP

uv run python -m mbta-performance.chalicelib.lamp.backfill.main

Backfill Historic

uv run python -m mbta-performance.chalicelib.historic.backfill.main

About

For processing performance data for the data dashboard

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •