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

Commit

Permalink
Issue 303: The feed_info.txt proposal has been officially adopted
Browse files Browse the repository at this point in the history
This patch does the bulk of the work of supporting feed_info.txt in the main package.  Reviewed in http://codereview.appspot.com/5240052/
  • Loading branch information
bdferris committed Oct 14, 2011
1 parent 7fe7f3f commit 01feaf9
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 452 deletions.
21 changes: 0 additions & 21 deletions extensions/googletransit/README
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ List of changes to the default behavior:
"add agency_id column to fare_attributes.txt" at
http://groups.google.com/group/gtfs-changes/browse_frm/thread/4e74c23bb1f80480
- adds new field 'agency_id' and function ValidateAgencyId()
* extensions.googletransit.FeedInfo:
- new class for validating feedinfo.txt as poposed in
https://sites.google.com/site/gtfschanges/spec-changes-summary#feed_info
- validates fields 'feed_publisher_name', 'feed_publisher_url', 'feed_lang',
'feed_timezone', 'feed_valid_from' and 'feed_valid_until'
- recognizes field 'feed_version'
- The valid dates range specified by 'feed_valid_from' and 'feed_valid_until'
is only used to check the feed validity. It's not used for other purposes.
In particular, services and service exceptions are not dropped or reduced if
they are defined outside this valid dates range.
* extensions.googletransit.Route
- extension of transitfeed.Route as proposed in
https://sites.google.com/site/gtfschanges/spec-changes-summary#routes and
Expand All @@ -32,17 +22,6 @@ List of changes to the default behavior:
extensions.googletransit.Stop for validating field vehicle_type.
The HVT values are derived from the European TPEG standard, see discussion
at http://groups.google.com/group/gtfs-changes/msg/ed917a69cf8c5bef
* extensions.googletransit.Schedule:
- extension of transitfeed.Schedule for being able to validate
interrelationships between the new fields and data sets introduced in this
extension
- new feed_info variable and AddFeedInfoObject() method in order to be able to
register a extensions.googletransit.FeedInfo object in the Schedule
- validates FeedInfo.feed_lang against Agency.agency_lang
- validates FeedInfo.feed_timezone against Agency.agency_timezone
- checks that all Agencies have the same timezone
- overrides ValidateFeedStartAndExpirationDates() in order to take
FeedInfo.feed_valid_from and FeedInfo.feed_valid_until into account
* extensions.googletransit.Stop
- extension of transitfeed.Stop as proposed in
https://sites.google.com/site/gtfschanges/spec-changes-summary#stops
Expand Down
2 changes: 0 additions & 2 deletions extensions/googletransit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

from agency import *
from fareattribute import *
from feedinfo import *
from route import *
from schedule import *
from setup_extension import *
from stop import *
130 changes: 0 additions & 130 deletions extensions/googletransit/schedule.py

This file was deleted.

11 changes: 0 additions & 11 deletions extensions/googletransit/setup_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

import agency
import fareattribute
import feedinfo
import route
import schedule
import stop

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

# FeedInfo class
factory.AddMapping('feed_info.txt',
{'required': False, 'loading_order': 100,
'classes': ['FeedInfo']})
factory.AddClass('FeedInfo', feedinfo.FeedInfo)

# Route class extension
factory.UpdateClass('Route', route.Route)

# Schedule class extension
factory.UpdateClass('Schedule', schedule.Schedule)

# Stop class extension
factory.UpdateClass('Stop', stop.Stop)

Expand Down
Loading

0 comments on commit 01feaf9

Please sign in to comment.