Skip to content

An API supporting the the MBTA Lite Map - a Raspberry Pi powered LED map of the MBTA Red Line in Boston.

Notifications You must be signed in to change notification settings

Shallow-Dives/mbta-lite-map-api

Repository files navigation

MBTA Lite Map API

API supporting the MBTA Lite Map Project.

Develop workflow

The development workflow commands are aliased in the Makefile.

  1. Install development dependencies

     make devel-install
    
  2. Create and populate a .env file based on .env.template

     cp .env.template .env
    

    The USER_API_KEY is required to access any restricted endpoints in this application. A user API key can be generated with uuid-gen and then provided to the Raspberry Pi frontend node(s). Keys to access any external APIs should also be added via .env.

  3. Lint and reformat any new code

      make format          # Reformats all code
    
      make format-check    # Reports issues but doesn't auto-format
    
  4. Run tests with Pytest

      make test
    

    The pytest configuration is specified and can be updated in tests/pytest.ini.

  5. Build and run the API image

      make devel-build
    
      make devel-run
    

    This kicks off a multi-stage docker build to create a pared down final image running a Gunicorn server.

Deploy workflow

TODO

docker compose up

Resources

About

An API supporting the the MBTA Lite Map - a Raspberry Pi powered LED map of the MBTA Red Line in Boston.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published