Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use last predicted stop as added trip headsign #839

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Whoops
Copy link
Collaborator

@Whoops Whoops commented Nov 15, 2024

Summary of changes

Asana Ticket: 🍎 Adjust API headsign logic for ADDED trips

[Please include a brief description of what was changed]

Copy link

Coverage of commit 3e27228

Summary coverage rate:
  lines......: 89.0% (4216 of 4736 lines)
  functions..: 70.2% (2285 of 3257 functions)
  branches...: no data found

Files changed coverage rate:
                                                                        |Lines       |Functions  |Branches    
  Filename                                                              |Rate     Num|Rate    Num|Rate     Num
  ============================================================================================================
  apps/state/lib/state/trip/added.ex                                    | 100%     32|72.7%    44|    -      0

Download coverage report

@Whoops
Copy link
Collaborator Author

Whoops commented Nov 18, 2024

Comparison from today's RL disruption with service suspended between Harvard and Broadway:
prod:

{
  "data": {
    "attributes": {
      "bikes_allowed": 0,
      "block_id": null,
      "direction_id": 0,
      "headsign": "Braintree",
      "name": "",
      "revenue": "REVENUE",
      "wheelchair_accessible": 1
    },
    "id": "ADDED-1582142747",
    "links": {
      "self": "/trips/ADDED-1582142747"
    },
    "relationships": {
      "route": {
        "data": {
          "id": "Red",
          "type": "route"
        }
      },
      "route_pattern": {
        "data": {
          "id": "Red-3-0",
          "type": "route_pattern"
        }
      },
      "service": {
        "data": null
      },
      "shape": {
        "data": {
          "id": "canonical-933_0009",
          "type": "shape"
        }
      }
    },
    "type": "trip"
  },
  "jsonapi": {
    "version": "1.0"
  }
}

dev-green:

{
  "data": {
    "attributes": {
      "bikes_allowed": 0,
      "block_id": null,
      "direction_id": 0,
      "headsign": "Harvard",
      "name": "",
      "revenue": "REVENUE",
      "wheelchair_accessible": 1
    },
    "id": "ADDED-1590682122",
    "links": {
      "self": "/trips/ADDED-1590682122"
    },
    "relationships": {
      "route": {
        "data": {
          "id": "Red",
          "type": "route"
        }
      },
      "route_pattern": {
        "data": {
          "id": "Red-3-0",
          "type": "route_pattern"
        }
      },
      "service": {
        "data": null
      },
      "shape": {
        "data": {
          "id": "canonical-933_0009",
          "type": "shape"
        }
      }
    },
    "type": "trip"
  },
  "jsonapi": {
    "version": "1.0"
  }
}

(Added trip IDs are not consistent between environments. I found these to compare by downloading the Prod/Green RT feeds and finding the predictions for vehicle R-547FBF60)

@Whoops Whoops requested review from a team and bfauble and removed request for a team November 18, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant