Skip to content

Commit

Permalink
FEAT: Add last_trip to ingestion Trip Descriptor for GTFS-RT (#456)
Browse files Browse the repository at this point in the history
add last_trip field to gtfs trip descriptor

Asana Task: https://app.asana.com/0/1205827492903547/1208279222032058
  • Loading branch information
rymarczy authored Oct 24, 2024
1 parent 5364e27 commit 68bbfee
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions src/lamp_py/ingestion/config_rt_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,51 +75,51 @@ def import_schema(self) -> pyarrow.schema:
(
"severity",
pyarrow.uint16(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"created_timestamp",
pyarrow.uint64(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"last_modified_timestamp",
pyarrow.uint64(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"last_push_notification_timestamp",
pyarrow.uint64(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"closed_timestamp",
pyarrow.int64(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"alert_lifecycle",
pyarrow.string(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"duration_certainty",
pyarrow.string(),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"reminder_times",
pyarrow.list_(pyarrow.uint64()),
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"short_header_text",
translated_string,
), # not in message Alert struct spec
(
"service_effect_text",
translated_string,
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"timeframe_text",
translated_string,
), # not in message Alert struct spec
), # MBTA Enhanced field
(
"recurrence_text",
translated_string,
), # not in message Alert struct spec
), # MBTA Enhanced field
]
),
),
Expand Down
3 changes: 2 additions & 1 deletion src/lamp_py/ingestion/gtfs_rt_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
("tm_trip_id", pyarrow.string()), # Only used by Busloc
("overload_id", pyarrow.int64()), # Only used by Busloc
("overload_offset", pyarrow.int64()), # Only used by Busloc
("revenue", pyarrow.bool_()),
("revenue", pyarrow.bool_()), # MBTA Enhanced Field
("last_trip", pyarrow.bool_()), # MBTA Enhanced Field
]
)

Expand Down
Binary file modified tests/test_files/ingestion_BUSLOC_TU.parquet
Binary file not shown.
Binary file modified tests/test_files/ingestion_BUSLOC_VP.parquet
Binary file not shown.
Binary file modified tests/test_files/ingestion_GTFS-RT_TU.parquet
Binary file not shown.
Binary file modified tests/test_files/ingestion_GTFS-RT_TU_OLD.parquet
Binary file not shown.
Binary file modified tests/test_files/ingestion_GTFS-RT_VP.parquet
Binary file not shown.
Binary file modified tests/test_files/ingestion_GTFS-RT_VP_OLD.parquet
Binary file not shown.

0 comments on commit 68bbfee

Please sign in to comment.