# Path: urbanaccess/network.py
# class urbanaccess_network(object):
#     """
#     An urbanaccess object of pandas.DataFrames representing
#     the components of a graph network
# 
#     Parameters
#     ----------
#     transit_nodes : pandas.DataFrame
#     transit_edges : pandas.DataFrame
#     net_connector_edges : pandas.DataFrame
#     osm_nodes : pandas.DataFrame
#     osm_edges : pandas.DataFrame
#     net_nodes : pandas.DataFrame
#     net_edges : pandas.DataFrame
#     """
# 
#     def __init__(self,
#                  transit_nodes=pd.DataFrame(),
#                  transit_edges=pd.DataFrame(),
#                  net_connector_edges=pd.DataFrame(),
#                  osm_nodes=pd.DataFrame(),
#                  osm_edges=pd.DataFrame(),
#                  net_nodes=pd.DataFrame(),
#                  net_edges=pd.DataFrame()):
#         self.transit_nodes = transit_nodes
#         self.transit_edges = transit_edges
#         self.net_connector_edges = net_connector_edges
#         self.osm_nodes = osm_nodes
#         self.osm_edges = osm_edges
#         self.net_nodes = net_nodes
#         self.net_edges = net_edges
# 
# Path: urbanaccess/gtfs/gtfsfeeds_dataframe.py
# class urbanaccess_gtfs_df(object):
#     """
#     A collection of DataFrames representing the standardized and
#     merged metropolitan-wide transit network from multiple
#     GTFS feeds.
# 
#     Parameters
#     ----------
#     gtfsfeeds_dfs : object
#         processed DataFrames of corresponding GTFS feed text files
#     gtfsfeeds_dfs.stops : pandas.DataFrame
#     gtfsfeeds_dfs.routes : pandas.DataFrame
#     gtfsfeeds_dfs.trips : pandas.DataFrame
#     gtfsfeeds_dfs.stop_times : pandas.DataFrame
#     gtfsfeeds_dfs.calendar : pandas.DataFrame
#     gtfsfeeds_dfs.calendar_dates : pandas.DataFrame
#     gtfsfeeds_dfs.stop_times_int : pandas.DataFrame
#     gtfsfeeds_dfs.headways : pandas.DataFrame
#     """
# 
#     def __init__(self,
#                  stops=pd.DataFrame(),
#                  routes=pd.DataFrame(),
#                  trips=pd.DataFrame(),
#                  stop_times=pd.DataFrame(),
#                  calendar=pd.DataFrame(),
#                  calendar_dates=pd.DataFrame(),
#                  stop_times_int=pd.DataFrame(),
#                  headways=pd.DataFrame()):
#         self.stops = stops
#         self.routes = routes
#         self.trips = trips
#         self.stop_times = stop_times
#         self.calendar = calendar
#         self.calendar_dates = calendar_dates
#         self.stop_times_int = stop_times_int
#         self.headways = headways


import pytest
import os
import time
import glob
import pandas as pd
import numpy as np
import urbanaccess.gtfs.network as gtfs_network
import urbanaccess.gtfs.load as gtfs_load
from urbanaccess.network import urbanaccess_network
from urbanaccess.gtfs.gtfsfeeds_dataframe import urbanaccess_gtfs_df
    index = range(5)
    df = pd.DataFrame(data, index)
    # raw data are read as int32
    df['sequence'] = df['sequence'].astype('int32')
    return df


@pytest.fixture
def expected_transit_edge_from_feed_wo_calendar_dates_process_lvl_2_timeaware():  # noqa
    # represents df after it has been post-processed downstream
    data = {
        'node_id_from': ['1_agency_a_city_a', '2_agency_a_city_a',
                         '3_agency_a_city_a', '4_agency_a_city_a',
                         '5_agency_a_city_a'],
        'node_id_to': ['2_agency_a_city_a', '3_agency_a_city_a',
                       '4_agency_a_city_a', '5_agency_a_city_a',
                       '6_agency_a_city_a'],
        'weight': [5.0] * 5,
        'unique_agency_id': ['agency_a_city_a'] * 5,
        'unique_trip_id': ['a3_agency_a_city_a'] * 5,
        'sequence': range(1, 6),
        'id': ['a3_agency_a_city_a_1', 'a3_agency_a_city_a_2',
               'a3_agency_a_city_a_3', 'a3_agency_a_city_a_4',
               'a3_agency_a_city_a_5'],
        'route_type': [3] * 5,
        'departure_time': ['08:15:00', '08:20:00', '08:25:00', '08:30:00',
                           '08:35:00'],
        'arrival_time': ['08:20:00', '08:25:00', '08:30:00', '08:35:00',
                         '08:40:00']
    }

# Path: urbanaccess/network.py
# class urbanaccess_network(object):
#     """
#     An urbanaccess object of pandas.DataFrames representing
#     the components of a graph network
# 
#     Parameters
#     ----------
#     transit_nodes : pandas.DataFrame
#     transit_edges : pandas.DataFrame
#     net_connector_edges : pandas.DataFrame
#     osm_nodes : pandas.DataFrame
#     osm_edges : pandas.DataFrame
#     net_nodes : pandas.DataFrame
#     net_edges : pandas.DataFrame
#     """
# 
#     def __init__(self,
#                  transit_nodes=pd.DataFrame(),
#                  transit_edges=pd.DataFrame(),
#                  net_connector_edges=pd.DataFrame(),
#                  osm_nodes=pd.DataFrame(),
#                  osm_edges=pd.DataFrame(),
#                  net_nodes=pd.DataFrame(),
#                  net_edges=pd.DataFrame()):
#         self.transit_nodes = transit_nodes
#         self.transit_edges = transit_edges
#         self.net_connector_edges = net_connector_edges
#         self.osm_nodes = osm_nodes
#         self.osm_edges = osm_edges
#         self.net_nodes = net_nodes
#         self.net_edges = net_edges
# 
# Path: urbanaccess/gtfs/gtfsfeeds_dataframe.py
# class urbanaccess_gtfs_df(object):
#     """
#     A collection of DataFrames representing the standardized and
#     merged metropolitan-wide transit network from multiple
#     GTFS feeds.
# 
#     Parameters
#     ----------
#     gtfsfeeds_dfs : object
#         processed DataFrames of corresponding GTFS feed text files
#     gtfsfeeds_dfs.stops : pandas.DataFrame
#     gtfsfeeds_dfs.routes : pandas.DataFrame
#     gtfsfeeds_dfs.trips : pandas.DataFrame
#     gtfsfeeds_dfs.stop_times : pandas.DataFrame
#     gtfsfeeds_dfs.calendar : pandas.DataFrame
#     gtfsfeeds_dfs.calendar_dates : pandas.DataFrame
#     gtfsfeeds_dfs.stop_times_int : pandas.DataFrame
#     gtfsfeeds_dfs.headways : pandas.DataFrame
#     """
# 
#     def __init__(self,
#                  stops=pd.DataFrame(),
#                  routes=pd.DataFrame(),
#                  trips=pd.DataFrame(),
#                  stop_times=pd.DataFrame(),
#                  calendar=pd.DataFrame(),
#                  calendar_dates=pd.DataFrame(),
#                  stop_times_int=pd.DataFrame(),
#                  headways=pd.DataFrame()):
#         self.stops = stops
#         self.routes = routes
#         self.trips = trips
#         self.stop_times = stop_times
#         self.calendar = calendar
#         self.calendar_dates = calendar_dates
#         self.stop_times_int = stop_times_int
#         self.headways = headways


# Path: urbanaccess/tests/test_gtfs_network.py
import pytest
import os
import time
import glob
import pandas as pd
import numpy as np
import urbanaccess.gtfs.network as gtfs_network
import urbanaccess.gtfs.load as gtfs_load
from urbanaccess.network import urbanaccess_network
from urbanaccess.gtfs.gtfsfeeds_dataframe import urbanaccess_gtfs_df

    index = range(5)
    df = pd.DataFrame(data, index)
    # raw data are read as int32
    df['sequence'] = df['sequence'].astype('int32')
    return df


@pytest.fixture
def expected_transit_edge_from_feed_wo_calendar_dates_process_lvl_2_timeaware():  # noqa
    # represents df after it has been post-processed downstream
    data = {
        'node_id_from': ['1_agency_a_city_a', '2_agency_a_city_a',
                         '3_agency_a_city_a', '4_agency_a_city_a',
                         '5_agency_a_city_a'],
        'node_id_to': ['2_agency_a_city_a', '3_agency_a_city_a',
                       '4_agency_a_city_a', '5_agency_a_city_a',
                       '6_agency_a_city_a'],
        'weight': [5.0] * 5,
        'unique_agency_id': ['agency_a_city_a'] * 5,
        'unique_trip_id': ['a3_agency_a_city_a'] * 5,
        'sequence': range(1, 6),
        'id': ['a3_agency_a_city_a_1', 'a3_agency_a_city_a_2',
               'a3_agency_a_city_a_3', 'a3_agency_a_city_a_4',
               'a3_agency_a_city_a_5'],
        'route_type': [3] * 5,
        'departure_time': ['08:15:00', '08:20:00', '08:25:00', '08:30:00',
                           '08:35:00'],
        'arrival_time': ['08:20:00', '08:25:00', '08:30:00', '08:35:00',
                         '08:40:00']
    }

    index = range(5)