API supporting the MBTA Lite Map Project.
The development workflow commands are aliased in the Makefile.
-
Install development dependencies
make devel-install -
Create and populate a
.envfile based on .env.templatecp .env.template .envThe USER_API_KEY is required to access any restricted endpoints in this application. A user API key can be generated with
uuid-genand then provided to the Raspberry Pi frontend node(s). Keys to access any external APIs should also be added via.env. -
Lint and reformat any new code
make format # Reformats all code make format-check # Reports issues but doesn't auto-format -
Run tests with Pytest
make testThe pytest configuration is specified and can be updated in
tests/pytest.ini. -
Build and run the API image
make devel-build make devel-runThis kicks off a multi-stage docker build to create a pared down final image running a Gunicorn server.
TODO
docker compose up