Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d3d53fe
feat: `direction_id` no longer experimental (#210)
paulswartz Apr 27, 2020
270830c
Add occupancy_percentage (#213)
gcamp Apr 28, 2020
8521cee
Mark severity level as final (#214)
gcamp Apr 28, 2020
4eeb3b4
Mention pathways.txt and attributions.txt in translations.txt
aababilov Apr 27, 2020
e92edf7
fix: Add translations.txt to the files table (#218)
barbeau May 5, 2020
6aeb49f
Add GTFS-ContinousStops (#208)
timMillet May 13, 2020
030c158
Move pathways, levels and attributions to the list of translatable ta…
aababilov Apr 29, 2020
044ea68
Update comment for pathways.signposted_as to allow translations
aababilov May 7, 2020
102179f
Updated revision history for GTFS CHANGES.md (#225)
sccmcca Jun 2, 2020
422b461
feat: Add GitHub CI Action for GTFS-RT .proto validation (#232)
barbeau Jul 10, 2020
2ae5df1
feat: Label GTFS-RT ADDED trips as not fully specified (#230)
barbeau Jul 15, 2020
24f8f38
fix: Fix a typo in occupancy_percentage description (#234)
barbeau Jul 20, 2020
fec428e
Fix a typo can can
aababilov Jul 22, 2020
df73737
feat: Alert `tts_header_text`, `tts_description_text` no longer exper…
barbeau Jul 23, 2020
770ffee
Proposal: Support DUPLICATED trips in GTFS-RT (#221)
barbeau Jul 29, 2020
993c2c0
fix: Add extensions to TripProperties, remove extra comment (#238)
barbeau Aug 10, 2020
b28d6ef
Proposal: Support multi-car crowding in GTFS-RT (#237)
lfontolliet Sep 10, 2020
0fb98c3
Change type of headway_secs to positive integer
aababilov Sep 28, 2020
480ad2e
Proposal: Support stop assignments in GTFS-RT (#219)
barbeau Nov 12, 2020
e60c620
Define positive and non-null number field types (#251)
aababilov Jan 4, 2021
3d94a4c
Clarification of stop_times.stop_id (#258)
timMillet Jan 4, 2021
729503b
Clarification of GTFS Realtime occupancy descriptions (#259)
Feb 1, 2021
6e5663d
Add CrowdLevel
Feb 3, 2021
a429337
style
Feb 3, 2021
e96617f
Updates from review
Feb 4, 2021
f612ddc
Fix value of CrowdLevel in VehiclePosition
Feb 9, 2021
94f849e
Fix NO_DATA value
Feb 11, 2021
c79bf37
Fix field number
Feb 11, 2021
802b677
review
Feb 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/validate-proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validate GTFS-realtime .proto file

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Install Protoc
uses: arduino/setup-protoc@master
- name: Compile Java bindings
run: protoc --java_out=gtfs-realtime/proto gtfs-realtime/proto/gtfs-realtime.proto
233 changes: 211 additions & 22 deletions gtfs-realtime/proto/gtfs-realtime.proto

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions gtfs-realtime/spec/en/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
### Plain text feed examples

The following examples show a textual representation of feeds. During development it is more convenient to produce ASCII protocol buffer output for easier debugging. You can compare your text output with these examples to check for the validity of data.

* [Alerts](alerts.asciipb)
* [Trip update (full dataset)](trip-updates-full.asciipb)

### Migration guides

The following migration guides can help consumers and producers transition from "unofficial" practices to new "official" features of the spec:
* [Transition from ADDED to DUPLICATED trips](migration-duplicated.md) - A duplicated trip is new trip that is the same as an existing scheduled trip except for service start date and time. This [migration guide](migration-duplicated.md) defines how existing producers and consumers that were using the `ADDED` enumeration to represent duplicated trips should transition to the `DUPLICATED` enumeration.
104 changes: 104 additions & 0 deletions gtfs-realtime/spec/en/examples/migration-duplicated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
## Migration Guide - Transition from ADDED to DUPLICATED trips

The GTFS-realtime `trip.schedule_relationship` of `DUPLICATED` represents a new trip that is the same as an existing scheduled trip except for service start date and time.

This migration guide defines how existing producers and consumers that were using the `ADDED` enumeration to represent duplicated trips should transition to the `DUPLICATED` enumeration. The goal is to minimize disruption to producers and consumers during the transition.

*If you are a producer or consumer that has **not** used the `ADDED` enumeration to describe duplicated trips, no action is required - you can produce/consume `DUPLICATED` trips without producing/consuming any `ADDED` entities.*

For a full history of the `DUPLICATED` enumeration, see the [`DUPLICATED` proposal on GitHub](https://github.com/google/transit/pull/221).

### Using ADDED and DUPLICATED entities in same feed

#### Producers

If you are a producer who has been using the `ADDED` enumeration for duplicated trips, to avoid disruption to existing consumers it is recommended that you continue to produce `ADDED` entities for these trips but also add `DUPLICATED` entities for the same trip.

However, to prevent consumers from accidentally adding the same trip twice, the entities referencing the same trip **must** be linked using the same `trip_id`. You can link the two entities in **one** of two ways:

1. `trip.trip_id` of both entities **must** be the same, OR
2. `trip.trip_id` of the `ADDED` trip **must** be the same as the `DUPLICATED` trip `trip_properties.trip_id`

Here's an example of the first option (1) to duplicate GTFS `trip_id 1`, with the `trip.trip_id` matching in the `ADDED` and `DUPLICATED` entities:

~~~
entity {
id: "ei0"
trip_update {
trip: {
trip_id: "1" // <-- trip_id from static GTFS to copy
schedule_relationship: ADDED
start_date: "20200821" // <-- New trip date
start_time: "11:30:00" // <-- New trip time
}
stop_time_update {
...
}
}
}

entity {
id: "ei10"
trip_update {
trip: {
trip_id: "1" // <-- trip_id from static GTFS to copy
schedule_relationship: DUPLICATED
}
trip_properties {
trip_id: "NewTripId987" // <-- New trip_id unique to this trip
start_date: "20200821" // <-- New trip date
start_time: "11:30:00" // <-- New trip time
}
stop_time_update {
...
}
}
}
~~~

Here's an example of the second option (2) to duplicate GTFS `trip_id 1`, with the `trip.trip_id` of the `ADDED` trip matching the `DUPLICATED` trip `trip_properties.trip_id`:

~~~
entity {
id: "ei0"
trip_update {
trip: {
trip_id: "NewTripId987" // <-- New trip_id unique to this trip
schedule_relationship: ADDED
start_date: "20200821" // <-- New trip date
start_time: "11:30:00" // <-- New trip time
}
stop_time_update {
...
}
}
}

entity {
id: "ei10"
trip_update {
trip: {
trip_id: "1" // <-- trip_id from static GTFS to copy
schedule_relationship: DUPLICATED
}
trip_properties {
trip_id: "NewTripId987" // <-- Matches the ADDED trip.trip_id
start_date: "20200821" // <-- New trip date
start_time: "11:30:00" // <-- New trip time
}
stop_time_update {
...
}
}
}
~~~

It is suggested that you notify existing consumers (e.g., via a developer mailing list) that the use of `ADDED` for duplicated trips is being deprecated by a set deadline and that consumers should start consuming the `DUPLICATED` trips instead. The above strategy being used to match `ADDED` and `DUPLICATED` trip entities should also be mentioned and a link to this migration guide should be included. After the deadline passes, you can remove the `ADDED` entities from your feed and publish only the `DUPLICATED` entities for duplicated trips.

#### Consumers

As mentioned above, producers will transition from `ADDED` to `DUPLICATED` enumerations by initially publishing two entities for each duplicated trip, using one of the two above options for matching IDs between the entities.

Therefore, when a consumer implements support for `DUPLICATED` trips, it is important that consumers:
1. Ignore any `ADDED` trips that have the same `trip.trip_id` as a `DUPLICATED` trip `trip.trip_id`
1. Ignore any `ADDED` trips that have the same `trip.trip_id` as a `DUPLICATED` trip `trip_properties.trip_id`
Loading