Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 01feaf9

Browse files
committed
Issue 303: The feed_info.txt proposal has been officially adopted
This patch does the bulk of the work of supporting feed_info.txt in the main package. Reviewed in http://codereview.appspot.com/5240052/
1 parent 7fe7f3f commit 01feaf9

File tree

9 files changed

+352
-452
lines changed

9 files changed

+352
-452
lines changed

extensions/googletransit/README

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ List of changes to the default behavior:
1313
"add agency_id column to fare_attributes.txt" at
1414
http://groups.google.com/group/gtfs-changes/browse_frm/thread/4e74c23bb1f80480
1515
- adds new field 'agency_id' and function ValidateAgencyId()
16-
* extensions.googletransit.FeedInfo:
17-
- new class for validating feedinfo.txt as poposed in
18-
https://sites.google.com/site/gtfschanges/spec-changes-summary#feed_info
19-
- validates fields 'feed_publisher_name', 'feed_publisher_url', 'feed_lang',
20-
'feed_timezone', 'feed_valid_from' and 'feed_valid_until'
21-
- recognizes field 'feed_version'
22-
- The valid dates range specified by 'feed_valid_from' and 'feed_valid_until'
23-
is only used to check the feed validity. It's not used for other purposes.
24-
In particular, services and service exceptions are not dropped or reduced if
25-
they are defined outside this valid dates range.
2616
* extensions.googletransit.Route
2717
- extension of transitfeed.Route as proposed in
2818
https://sites.google.com/site/gtfschanges/spec-changes-summary#routes and
@@ -32,17 +22,6 @@ List of changes to the default behavior:
3222
extensions.googletransit.Stop for validating field vehicle_type.
3323
The HVT values are derived from the European TPEG standard, see discussion
3424
at http://groups.google.com/group/gtfs-changes/msg/ed917a69cf8c5bef
35-
* extensions.googletransit.Schedule:
36-
- extension of transitfeed.Schedule for being able to validate
37-
interrelationships between the new fields and data sets introduced in this
38-
extension
39-
- new feed_info variable and AddFeedInfoObject() method in order to be able to
40-
register a extensions.googletransit.FeedInfo object in the Schedule
41-
- validates FeedInfo.feed_lang against Agency.agency_lang
42-
- validates FeedInfo.feed_timezone against Agency.agency_timezone
43-
- checks that all Agencies have the same timezone
44-
- overrides ValidateFeedStartAndExpirationDates() in order to take
45-
FeedInfo.feed_valid_from and FeedInfo.feed_valid_until into account
4625
* extensions.googletransit.Stop
4726
- extension of transitfeed.Stop as proposed in
4827
https://sites.google.com/site/gtfschanges/spec-changes-summary#stops

extensions/googletransit/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
from agency import *
1818
from fareattribute import *
19-
from feedinfo import *
2019
from route import *
21-
from schedule import *
2220
from setup_extension import *
2321
from stop import *

extensions/googletransit/schedule.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

extensions/googletransit/setup_extension.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
import agency
2020
import fareattribute
21-
import feedinfo
2221
import route
23-
import schedule
2422
import stop
2523

2624
def GetGtfsFactory(factory = None):
@@ -33,18 +31,9 @@ def GetGtfsFactory(factory = None):
3331
# FareAttribute class extension
3432
factory.UpdateClass('FareAttribute', fareattribute.FareAttribute)
3533

36-
# FeedInfo class
37-
factory.AddMapping('feed_info.txt',
38-
{'required': False, 'loading_order': 100,
39-
'classes': ['FeedInfo']})
40-
factory.AddClass('FeedInfo', feedinfo.FeedInfo)
41-
4234
# Route class extension
4335
factory.UpdateClass('Route', route.Route)
4436

45-
# Schedule class extension
46-
factory.UpdateClass('Schedule', schedule.Schedule)
47-
4837
# Stop class extension
4938
factory.UpdateClass('Stop', stop.Stop)
5039

0 commit comments

Comments
 (0)