Skip to content

mbta/arrow

Repository files navigation

Arrow

🏹 Adjustments to the Regular Right of Way

Setup

Requirements

Instructions

  • asdf install
  • mix deps.get
  • mix esbuild.install
  • npm install --prefix assets
  • cp .envrc.example .envrc
  • Update .envrc with your local Postgres username and password
  • Update .envrc with your AWS credentials or ensure they are available in your shell
  • Update .envrc with OpenRouteService setup
  • Update .envrc with the Arrow Dev Keycloak client secret (found in 1Password)
  • direnv allow
  • mix ecto.setup
  • brew install chromedriver
  • Add your Arrow API key from https://arrow.mbta.com/mytoken to .envrc
  • mix copy_db to 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's gtfs_* tables from a GTFS-static feed
  • Run iex -S mix and in the prompt run Oban.insert(Arrow.SyncWorker.new(%{})) to sync Shapes and Stops from prod

Useful commands

  • Run the app: mix phx.server (visit http://localhost:4000/)
  • Elixir:
    • mix test — run tests
    • mix test.integration — run integration tests
    • mix dialyzer — check typespecs
    • mix format — format code
    • mix credo — lint code
  • JavaScript: cd assets and...
    • npm run test — run tests
    • npm run test -- --watch — run tests continuously for changed code
    • npm run format — format code
    • npm run lint — lint code (and fix automatically if possible)

About

Adjustments to the Regular Right of Way

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 21