def setUp(self):
     cache_path = "/workspace/urbansim_cache/asu"
     self.variable_name = opus_path_for_variable_from_module_path(__file__)
     storage = file_flt_storage(cache_path)
     table_names = storage.get_table_names()
     self.dataset_pool = DatasetPool(package_order=['urbansim'],
                                     storage=storage)
     for table_name in table_names:
         dataset = self.dataset_pool.get_dataset(table_name, dataset_arguments={'id_name':[]})
Exemple #2
0
def read_dataset_from_flt(dataset_name, file_path='.'):
    """Reads a dataset from a binary storage. Return a dictionary with attribute names as keys and data arrays as values."""
    from opus_core.store.file_flt_storage import file_flt_storage
    storage = file_flt_storage(file_path)
    return storage.load_table(dataset_name)