# Path: rvic/core/variables.py
# class Point(object):
#     '''
#     Creates a point class for intellegently storing coordinate information
#     '''
# 
#     def __init__(self, lat=-9999.9, lon=-9999.9, domx=-9999, domy=-9999,
#                  routx=-9999, routy=-9999, name=None, cell_id=-9999):
#         '''Defines x and y variables'''
#         self.lat = lat
#         self.lon = lon
#         self.domx = domx
#         self.domy = domy
#         self.routx = routx
#         self.routy = routy
#         self.cell_id = cell_id
# 
#         if name:
#             self.name = name
#         else:
#             self.name = 'outlet_{0:3.4f}_{1:3.4f}'.format(self.lat, self.lon)
# 
#         return
# 
#     def __str__(self):
#         return ('Point({0}, lat:{1:3.4f}, lon:{2:3.4f}, y:{3:d}, '
#                 'x:{4:d})'.format(self.name, self.lat, self.lon, self.domy,
#                                   self.domx))
# 
#     def __repr__(self):
#         return ('    -- Point --    \n'
#                 'name:\t{0}\n'
#                 'lat:\t{1:3.4f}\n'
#                 'lon:\t{2:3.4f}\n'
#                 'domy:\t{3:d}\n'
#                 'domx:\t{4:d}\n'
#                 'routy:\t{5:d}\n'
#                 'routx:\t{6:d}\n'.format(self.name, self.lat, self.lon,
#                                          self.domy, self.domx,
#                                          self.routy, self.routx))


import pytest
import numpy as np
from rvic.core.make_uh import (find_ts, read_direction, search_catchment,
                               make_uh, make_grid_uh_river, make_grid_uh,
                               adjust_uh_timestep)
from rvic.core.variables import Point
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 4, 5, 7, 7, 1, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
    return np.array(a, dtype=np.int)


@pytest.fixture()
def fdr_vic_small(scope='function'):
    a = [[0, 0, 0, 5, 5],
         [0, 0, 0, 4, 0],
         [0, 0, 5, 3, 5],
         [0, 0, 5, 4, 0],
         [0, 0, 5, 4, 0]]
    return np.array(a, dtype=np.int)


@pytest.fixture()
def dy_vic(scope='module'):
    dy = {1: -1, 2: -1, 3: 0, 4: 1, 5: 1, 6: 1, 7: 0, 8: -1}
    return dy


@pytest.fixture()
def dx_vic(scope='module'):
    dx = {1: 0, 2: 1, 3: 1, 4: 1, 5: 0, 6: -1, 7: -1, 8: - 1}
    return dx


@pytest.fixture()
def pour_point(scope='module'):

# Path: rvic/core/variables.py
# class Point(object):
#     '''
#     Creates a point class for intellegently storing coordinate information
#     '''
# 
#     def __init__(self, lat=-9999.9, lon=-9999.9, domx=-9999, domy=-9999,
#                  routx=-9999, routy=-9999, name=None, cell_id=-9999):
#         '''Defines x and y variables'''
#         self.lat = lat
#         self.lon = lon
#         self.domx = domx
#         self.domy = domy
#         self.routx = routx
#         self.routy = routy
#         self.cell_id = cell_id
# 
#         if name:
#             self.name = name
#         else:
#             self.name = 'outlet_{0:3.4f}_{1:3.4f}'.format(self.lat, self.lon)
# 
#         return
# 
#     def __str__(self):
#         return ('Point({0}, lat:{1:3.4f}, lon:{2:3.4f}, y:{3:d}, '
#                 'x:{4:d})'.format(self.name, self.lat, self.lon, self.domy,
#                                   self.domx))
# 
#     def __repr__(self):
#         return ('    -- Point --    \n'
#                 'name:\t{0}\n'
#                 'lat:\t{1:3.4f}\n'
#                 'lon:\t{2:3.4f}\n'
#                 'domy:\t{3:d}\n'
#                 'domx:\t{4:d}\n'
#                 'routy:\t{5:d}\n'
#                 'routx:\t{6:d}\n'.format(self.name, self.lat, self.lon,
#                                          self.domy, self.domx,
#                                          self.routy, self.routx))


# Path: tests/unit/test_make_uh.py
import pytest
import numpy as np
from rvic.core.make_uh import (find_ts, read_direction, search_catchment,
                               make_uh, make_grid_uh_river, make_grid_uh,
                               adjust_uh_timestep)
from rvic.core.variables import Point

         [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 4, 5, 7, 7, 1, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
    return np.array(a, dtype=np.int)


@pytest.fixture()
def fdr_vic_small(scope='function'):
    a = [[0, 0, 0, 5, 5],
         [0, 0, 0, 4, 0],
         [0, 0, 5, 3, 5],
         [0, 0, 5, 4, 0],
         [0, 0, 5, 4, 0]]
    return np.array(a, dtype=np.int)


@pytest.fixture()
def dy_vic(scope='module'):
    dy = {1: -1, 2: -1, 3: 0, 4: 1, 5: 1, 6: 1, 7: 0, 8: -1}
    return dy


@pytest.fixture()
def dx_vic(scope='module'):
    dx = {1: 0, 2: 1, 3: 1, 4: 1, 5: 0, 6: -1, 7: -1, 8: - 1}
    return dx


@pytest.fixture()
def pour_point(scope='module'):

    p = Point()