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

Update the protobuf definitions with script to keep the up to date #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions mtaproto/feedresponse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from mtaproto import nyct_subway_pb2
from pytz import timezone
import datetime
from pytz import timezone

from . import nyct_subway_pb2

TZ = timezone('US/Eastern')

Expand Down
13 changes: 7 additions & 6 deletions mtaproto/gtfs-realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
// https://github.com/google/transit/tree/master/gtfs-realtime

syntax = "proto2";
option java_package = "com.google.transit.realtime";

package transit_realtime;

option java_package = "com.google.transit.realtime";

// The contents of a feed message.
// A feed is a continuous stream of feed messages. Each message in the stream is
// obtained as a response to an appropriate HTTP GET request.
Expand Down Expand Up @@ -362,7 +364,6 @@ message VehiclePosition {

// The vehicle is not accepting additional passengers.
NOT_ACCEPTING_PASSENGERS = 6;

}
optional OccupancyStatus occupancy_status = 9;

Expand All @@ -385,10 +386,10 @@ message Alert {
// Cause of this alert.
enum Cause {
UNKNOWN_CAUSE = 1;
OTHER_CAUSE = 2; // Not machine-representable.
OTHER_CAUSE = 2; // Not machine-representable.
TECHNICAL_PROBLEM = 3;
STRIKE = 4; // Public transit agency employees stopped working.
DEMONSTRATION = 5; // People are blocking the streets.
STRIKE = 4; // Public transit agency employees stopped working.
DEMONSTRATION = 5; // People are blocking the streets.
ACCIDENT = 6;
HOLIDAY = 7;
WEATHER = 8;
Expand Down Expand Up @@ -511,7 +512,7 @@ message TripDescriptor {
// The initially scheduled start time of this trip instance.
// When the trip_id corresponds to a non-frequency-based trip, this field
// should either be omitted or be equal to the value in the GTFS feed. When
// the trip_id correponds to a frequency-based trip, the start_time must be
// the trip_id corresponds to a frequency-based trip, the start_time must be
// specified for trip updates and vehicle positions. If the trip corresponds
// to exact_times=1 GTFS record, then start_time must be some multiple
// (including zero) of headway_secs later than frequencies.txt start_time for
Expand Down
1,333 changes: 57 additions & 1,276 deletions mtaproto/gtfs_realtime_pb2.py

Large diffs are not rendered by default.

1,036 changes: 1,036 additions & 0 deletions mtaproto/gtfs_realtime_pb2.pyi

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mtaproto/nyct-subway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
option java_package = "com.google.transit.realtime";

import "gtfs-realtime.proto";
message TripReplacementPeriod {
// The replacement period is for this route
optional string route_id = 1;
Expand Down
301 changes: 23 additions & 278 deletions mtaproto/nyct_subway_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.