Complete rewrite of dataset class, with (all) the necessary updates
This commit is contained in:
@@ -13,8 +13,8 @@ class Project:
|
||||
self.name = name
|
||||
self.dim_names = []
|
||||
self._observers = {}
|
||||
self.current_data=None
|
||||
self.datasets=[]
|
||||
self.current_data = None
|
||||
self.datasets = []
|
||||
self.sel_obj = dataset.Selection()
|
||||
|
||||
def attach(self,observer,key):
|
||||
@@ -69,15 +69,11 @@ class Project:
|
||||
def add_dataset(self,dataset):
|
||||
"""Appends a new Dataset to the project."""
|
||||
self.datasets.append(dataset)
|
||||
for dim_name in dataset.ids.keys():
|
||||
for dim_name in dataset.get_all_dims():
|
||||
if dim_name not in self.dim_names:
|
||||
self.dim_names.append(dim_name)
|
||||
self.sel_obj.current_selection[dim_name] = set()
|
||||
|
||||
def suggest_dim_name(self,dim_name):
|
||||
"""Creates an arbitrary unique name for a new dimension."""
|
||||
while dim_name in self.dim_names:
|
||||
dim_name = dim_name + "_t"
|
||||
return dim_name
|
||||
|
||||
def object_at(self, path):
|
||||
"Returns the object at a given path in the tree."
|
||||
|
Reference in New Issue
Block a user