# Path: urbanaccess/gtfsfeeds.py
# class urbanaccess_gtfsfeeds(object):
#     def __init__(self,
#                  gtfs_feeds={}):
#     def from_yaml(cls, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                 'gtfsfeeds'),
#                   yamlname='gtfsfeeds.yaml'):
#     def to_dict(self):
#     def add_feed(self, add_dict, replace=False):
#     def remove_feed(self, del_key=None, remove_all=False):
#     def to_yaml(self, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                'gtfsfeeds'),
#                 yamlname='gtfsfeeds.yaml',
#                 overwrite=False):
# def search(api='gtfsdataexch', search_text=None, search_field=None,
#            match='contains', add_feed=False, overwrite_feed=False):
# def download(data_folder=os.path.join(config.settings.data_folder),
#              feed_name=None, feed_url=None, feed_dict=None,
#              error_pause_duration=5, delete_zips=False):
# def _unzip(zip_rootpath, delete_zips=True):
# def _zipfile_type_check(file, feed_url_value):


import os
import time
import matplotlib
import urbanaccess
from urbanaccess.gtfsfeeds import feeds

matplotlib.use('agg')


start_time = time.time()

name = 'madison'
url = 'http://www.gtfs-data-exchange.com/agency/city-of-madison/latest.zip'

print('-------------------------')
print('Starting integration test for {}...'.format(name))

new_feed = {name: url}

# Path: urbanaccess/gtfsfeeds.py
# class urbanaccess_gtfsfeeds(object):
#     def __init__(self,
#                  gtfs_feeds={}):
#     def from_yaml(cls, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                 'gtfsfeeds'),
#                   yamlname='gtfsfeeds.yaml'):
#     def to_dict(self):
#     def add_feed(self, add_dict, replace=False):
#     def remove_feed(self, del_key=None, remove_all=False):
#     def to_yaml(self, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                'gtfsfeeds'),
#                 yamlname='gtfsfeeds.yaml',
#                 overwrite=False):
# def search(api='gtfsdataexch', search_text=None, search_field=None,
#            match='contains', add_feed=False, overwrite_feed=False):
# def download(data_folder=os.path.join(config.settings.data_folder),
#              feed_name=None, feed_url=None, feed_dict=None,
#              error_pause_duration=5, delete_zips=False):
# def _unzip(zip_rootpath, delete_zips=True):
# def _zipfile_type_check(file, feed_url_value):


# Path: urbanaccess/tests/integration/integration_madison.py
import os
import time
import matplotlib
import urbanaccess
from urbanaccess.gtfsfeeds import feeds


matplotlib.use('agg')


start_time = time.time()

name = 'madison'
url = 'http://www.gtfs-data-exchange.com/agency/city-of-madison/latest.zip'

print('-------------------------')
print('Starting integration test for {}...'.format(name))

new_feed = {name: url}

feeds.add_feed(new_feed)