🏹 Adjustments to the Regular Right of Way
asdf- Add
erlang,elixir, andnodejsplugins - Install additional requirements for
nodejsplugin
- Add
direnv- PostgreSQL 15
- Can be run as a container via docker-compose by running
docker-compose up -din this repository (seedocker-compose.yml) - Using Homebrew:
brew install postgresql@15
- Can be run as a container via docker-compose by running
- OpenRouteService
- Can use https://api.openrouteservice.org/ with an API key requested through their console
- Or the docker-compose setup with Docker Desktop alternative, no API key needed
asdf installmix deps.getmix esbuild.installnpm install --prefix assetscp .envrc.example .envrc- Update
.envrcwith your local Postgres username and password - Update
.envrcwith your AWS credentials or ensure they are available in your shell - Update
.envrcwith OpenRouteService setup - Update
.envrcwith the Arrow Dev Keycloak client secret (found in 1Password) direnv allowmix ecto.setupbrew install chromedriver- Add your Arrow API key from https://arrow.mbta.com/mytoken to
.envrc mix copy_dbto seed your database (With Prod data for v1 disruptions, you may not need this)mix import_gtfs [optional/path/to/local/MBTA_GTFS.zip]to populate your database'sgtfs_*tables from a GTFS-static feed- Run
iex -S mixand in the prompt runOban.insert(Arrow.SyncWorker.new(%{}))to sync Shapes and Stops from prod
- Run the app:
mix phx.server(visit http://localhost:4000/) - Elixir:
mix test— run testsmix test.integration— run integration testsmix dialyzer— check typespecsmix format— format codemix credo— lint code
- JavaScript:
cd assetsand...npm run test— run testsnpm run test -- --watch— run tests continuously for changed codenpm run format— format codenpm run lint— lint code (and fix automatically if possible)