2020-05-18 13:25:08 -04:00
|
|
|
from physics.physics_feeders.us_new_york_city_physics_parameters import UsNewYorkCityPhysicsParameters
|
|
|
|
from physics.physics_feeders.us_physics_parameters import UsPhysicsParameters
|
|
|
|
|
|
|
|
|
|
|
|
class PhysicsFactory:
|
2020-06-04 12:47:48 -04:00
|
|
|
def __init__(self, handler, city, base_path='data/physics'):
|
2020-05-18 13:25:08 -04:00
|
|
|
self._handler = handler.lower().replace(' ', '_')
|
|
|
|
self._city = city
|
2020-06-04 12:47:48 -04:00
|
|
|
self._base_path = base_path
|
2020-05-18 13:25:08 -04:00
|
|
|
self.factory()
|
|
|
|
|
|
|
|
def us_new_york_city(self):
|
2020-06-04 12:47:48 -04:00
|
|
|
UsNewYorkCityPhysicsParameters(self._city, self._base_path)
|
2020-05-18 13:25:08 -04:00
|
|
|
|
|
|
|
def us(self):
|
2020-06-04 12:47:48 -04:00
|
|
|
UsPhysicsParameters(self._city, self._base_path)
|
2020-05-18 13:25:08 -04:00
|
|
|
|
|
|
|
def ca(self):
|
|
|
|
raise Exception('Not implemented')
|
|
|
|
|
|
|
|
def de(self):
|
|
|
|
raise Exception('Not implemented')
|
|
|
|
|
|
|
|
def es(self):
|
|
|
|
raise Exception('Not implemented')
|
|
|
|
|
|
|
|
def factory(self):
|
|
|
|
getattr(self, self._handler, lambda: None)()
|